Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SUIT_CameraProperties.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 #ifndef SUIT_CAMERAPROPERITES_H
24 #define SUIT_CAMERAPROPERITES_H
25 
26 #include "SUIT.h"
27 
29 {
30 public:
31  enum Dimension { DimNone, Dim2D, Dim3D };
32  enum ViewSide { ViewNone, ViewXY, ViewXZ, ViewYZ };
33  enum Projection { PrjOrthogonal, PrjPerspective };
34 
36  virtual ~SUIT_CameraProperties();
37 
38  bool isValid() const;
39  bool isCompatible( const SUIT_CameraProperties& other );
40 
41  Dimension getDimension() const;
42  void setDimension( const Dimension theDimension );
43 
44  ViewSide getViewSide() const;
45  void setViewSide( const ViewSide theViewSide );
46 
47  Projection getProjection() const;
48  void setProjection( const Projection theProjection );
49 
50  void getViewUp(double& theX, double& theY, double& theZ) const;
51  void setViewUp(const double theX, const double theY, const double theZ);
52 
53  void getPosition(double& theX, double& theY, double& theZ) const;
54  void setPosition(const double theX, const double theY, const double theZ);
55 
56  void getFocalPoint(double& theX, double& theY, double& theZ) const;
57  void setFocalPoint(const double theX, const double theY, const double theZ);
58 
59  double getMappingScale() const;
60  void setMappingScale(const double theScale);
61 
62  void getAxialScale(double& theScaleX, double& theScaleY, double& theScaleZ);
63  void setAxialScale(const double theScaleX, const double theScaleY, const double theScaleZ);
64 
65  double getViewAngle() const;
66  void setViewAngle(const double theViewAngle);
67 
68 // common properties for all viewers
69 private:
73  double myUpDir[3];
74  double myPosition[3];
75  double myFocalPoint[3];
76  double myMappingScale;
77  double myAxialScale[3];
78  double myViewAngle;
79 };
80 
81 #endif // SUIT_CAMERAPROPERITES_H