Base class for Camera Properties. More...
#include <SUIT_CameraProperties.h>
Public Types | |
enum | Dimension { DimNone, Dim2D, Dim3D } |
enum | ViewSide { ViewNone, ViewXY, ViewXZ, ViewYZ } |
enum | Projection { PrjOrthogonal, PrjPerspective } |
Public Member Functions | |
SUIT_CameraProperties () | |
Default constructor. More... | |
virtual | ~SUIT_CameraProperties () |
Destructor. More... | |
bool | isValid () const |
Check if camera properties are valid. More... | |
bool | isCompatible (const SUIT_CameraProperties &other) |
Check if this camera properties data is compatible with other camera properties. More... | |
Dimension | getDimension () const |
get dimension supported by camera. More... | |
void | setDimension (const Dimension theDimension) |
set dimension supported by camera. More... | |
ViewSide | getViewSide () const |
get side view supported by camera (for 2d viewer). More... | |
void | setViewSide (const ViewSide theViewSide) |
set side view supported by camera (for 2d viewer). More... | |
Projection | getProjection () const |
get projection mode supported by camera (for 3d viewer). More... | |
void | setProjection (const Projection theProjection) |
set projection mode supported by camera (for 3d viewer). More... | |
void | getViewUp (double &theX, double &theY, double &theZ) const |
get camera up direction vector. More... | |
void | setViewUp (const double theX, const double theY, const double theZ) |
set camera up direction vector. More... | |
void | getPosition (double &theX, double &theY, double &theZ) const |
get camera's position (eye). More... | |
void | setPosition (const double theX, const double theY, const double theZ) |
get camera's position (eye). More... | |
void | getFocalPoint (double &theX, double &theY, double &theZ) const |
get camera's focal point (look point). More... | |
void | setFocalPoint (const double theX, const double theY, const double theZ) |
set camera's focal point (look point). More... | |
double | getMappingScale () const |
get window mapping scale (parallel scale). More... | |
void | setMappingScale (const double theScale) |
set window mapping scale (parallel scale). More... | |
void | getAxialScale (double &theScaleX, double &theScaleY, double &theScaleZ) |
get scaling factors for world-coordinate space axes. More... | |
void | setAxialScale (const double theScaleX, const double theScaleY, const double theScaleZ) |
set scaling factors for world-coordinate space axes. More... | |
double | getViewAngle () const |
get angle (typically in degrees) of view for perpective projection mode. More... | |
void | setViewAngle (const double theViewAngle) |
set angle (typically in degrees) of view for perpective projection mode. More... | |
Private Attributes | |
Dimension | myDimension |
dimension More... | |
ViewSide | myViewSide |
side view (for 2d viewer) More... | |
Projection | myProjection |
projection mode (for 3d viewer): orthogonal / perspective More... | |
double | myUpDir [3] |
camera up vector More... | |
double | myPosition [3] |
camera position (eye). More... | |
double | myFocalPoint [3] |
focal point position in world-space coordinates More... | |
double | myMappingScale |
window mapping scale (parallel projection scale) More... | |
double | myAxialScale [3] |
scaling factors for world axes More... | |
double | myViewAngle |
perspective view angle in degrees More... | |
This class provides common properties that can be used for any arbitrary camera. This properties are employed by camera synchronization algorithms.
SUIT_CameraProperties::SUIT_CameraProperties | ( | ) |
Creates invalid camera properties data, i.e. IsValid() returns false
.
References DimNone, myAxialScale, myDimension, myFocalPoint, myMappingScale, myPosition, myProjection, myUpDir, myViewAngle, myViewSide, PrjOrthogonal, and ViewNone.
|
virtual |
void SUIT_CameraProperties::getAxialScale | ( | double & | theScaleX, |
double & | theScaleY, | ||
double & | theScaleZ | ||
) |
theScaleX | [out] scale by x coordinate. |
theScaleY | [out] scale by y coordinate. |
theScaleZ | [out] scale by z coordinate. |
References myAxialScale.
SUIT_CameraProperties::Dimension SUIT_CameraProperties::getDimension | ( | ) | const |
void SUIT_CameraProperties::getFocalPoint | ( | double & | theX, |
double & | theY, | ||
double & | theZ | ||
) | const |
theX | [out] x coordinate in world-coordinates space. |
theY | [out] y coordinate in world-coordinates space. |
theZ | [out] z coordinate in world-coordinates space. |
References myFocalPoint.
double SUIT_CameraProperties::getMappingScale | ( | ) | const |
Mapping scale defines a mapping scaling factor for the height of the viewport in world-coordinate distances.
References myMappingScale.
void SUIT_CameraProperties::getPosition | ( | double & | theX, |
double & | theY, | ||
double & | theZ | ||
) | const |
theX | [out] x coordinate in world-coordinates space. |
theY | [out] y coordinate in world-coordinates space. |
theZ | [out] z coordinate in world-coordinates space. |
References myPosition.
SUIT_CameraProperties::Projection SUIT_CameraProperties::getProjection | ( | ) | const |
For 3d viewer, projection mode can be of following values:
References myProjection.
double SUIT_CameraProperties::getViewAngle | ( | ) | const |
SUIT_CameraProperties::ViewSide SUIT_CameraProperties::getViewSide | ( | ) | const |
For 2d viewer, side view can be of following values:
References myViewSide.
void SUIT_CameraProperties::getViewUp | ( | double & | theX, |
double & | theY, | ||
double & | theZ | ||
) | const |
theX | [out] vector's x coordinate in world-coordinates space. |
theY | [out] vector's y coordinate in world-coordinates space. |
theZ | [out] vector's z coordinate in world-coordinates space. |
References myUpDir.
bool SUIT_CameraProperties::isCompatible | ( | const SUIT_CameraProperties & | other | ) |
other | other properties data |
true
if both camera properties sets are compatible References Dim2D, Dim3D, getDimension(), getProjection(), getViewSide(), and isValid().
bool SUIT_CameraProperties::isValid | ( | ) | const |
true
if camera properties data is valid. References DimNone, and myDimension.
void SUIT_CameraProperties::setAxialScale | ( | const double | theScaleX, |
const double | theScaleY, | ||
const double | theScaleZ | ||
) |
theScaleX | [in] scale by x coordinate. |
theScaleY | [in] scale by y coordinate. |
theScaleZ | [in] scale by z coordinate. |
References myAxialScale.
void SUIT_CameraProperties::setFocalPoint | ( | const double | theX, |
const double | theY, | ||
const double | theZ | ||
) |
theX | [in] x coordinate in world-coordinates space. |
theY | [in] y coordinate in world-coordinates space. |
theZ | [in] z coordinate in world-coordinates space. |
References myFocalPoint.
void SUIT_CameraProperties::setMappingScale | ( | const double | theScale | ) |
Mapping scale defines a mapping scaling factor for the height of the viewport in world-coordinate distances.
theScale | [in] the scaling. |
References myMappingScale.
theX | [in] x coordinate in world-coordinates space. |
theY | [in] y coordinate in world-coordinates space. |
theZ | [in] z coordinate in world-coordinates space. |
References myPosition.
void SUIT_CameraProperties::setProjection | ( | const Projection | theProjection | ) |
For 3d viewer, projection mode can be of following values:
theProjection | [in] projection mode. |
References myProjection.
void SUIT_CameraProperties::setViewAngle | ( | const double | theViewAngle | ) |
For 2d viewer, side view can be of following values:
theViewSide | [in] view side. |
References myViewSide.
It is recommended to set normalized vector coordinates for synchronization compatibility.
theX | [in] vector's x coordinate in world-coordinates space. |
theY | [in] vector's y coordinate in world-coordinates space. |
theZ | [in] vector's z coordinate in world-coordinates space. |
References myUpDir.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |