Version: 9.16.0
SUIT_CameraProperties.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, 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{
30public:
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
69private:
73 double myUpDir[3];
74 double myPosition[3];
75 double myFocalPoint[3];
77 double myAxialScale[3];
78 double myViewAngle;
79};
80
81#endif // SUIT_CAMERAPROPERITES_H
const QString const bool const double theScale
Definition: OCCViewer_ViewModel.cxx:975
#define SUIT_EXPORT
Definition: SUIT.h:36
bool isValid(const QPolygon *thePoints, const QPoint &theCurrent)
Definition: SVTK_InteractorStyle.cxx:1762
Base class for Camera Properties.
Definition: SUIT_CameraProperties.h:29
double myMappingScale
window mapping scale (parallel projection scale)
Definition: SUIT_CameraProperties.h:76
Projection myProjection
projection mode (for 3d viewer): orthogonal / perspective
Definition: SUIT_CameraProperties.h:72
double myViewAngle
perspective view angle in degrees
Definition: SUIT_CameraProperties.h:78
ViewSide
Definition: SUIT_CameraProperties.h:32
@ ViewNone
Definition: SUIT_CameraProperties.h:32
Dimension myDimension
dimension
Definition: SUIT_CameraProperties.h:70
Dimension
Definition: SUIT_CameraProperties.h:31
@ Dim2D
Definition: SUIT_CameraProperties.h:31
ViewSide myViewSide
side view (for 2d viewer)
Definition: SUIT_CameraProperties.h:71
Projection
Definition: SUIT_CameraProperties.h:33
@ PrjOrthogonal
Definition: SUIT_CameraProperties.h:33