Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SUIT_CameraProperties Class Reference

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...
 

Detailed Description

This class provides common properties that can be used for any arbitrary camera. This properties are employed by camera synchronization algorithms.

Member Enumeration Documentation

Enumerator
DimNone 
Dim2D 
Dim3D 
Enumerator
PrjOrthogonal 
PrjPerspective 
Enumerator
ViewNone 
ViewXY 
ViewXZ 
ViewYZ 

Constructor & Destructor Documentation

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.

SUIT_CameraProperties::~SUIT_CameraProperties ( )
virtual

Member Function Documentation

void SUIT_CameraProperties::getAxialScale ( double &  theScaleX,
double &  theScaleY,
double &  theScaleZ 
)
Parameters
theScaleX[out] scale by x coordinate.
theScaleY[out] scale by y coordinate.
theScaleZ[out] scale by z coordinate.
See Also
setAxialScale()

References myAxialScale.

SUIT_CameraProperties::Dimension SUIT_CameraProperties::getDimension ( ) const
Returns
dimension mode.
See Also
setDimension()

References myDimension.

void SUIT_CameraProperties::getFocalPoint ( double &  theX,
double &  theY,
double &  theZ 
) const
Parameters
theX[out] x coordinate in world-coordinates space.
theY[out] y coordinate in world-coordinates space.
theZ[out] z coordinate in world-coordinates space.
See Also
setFocalPoint()

References myFocalPoint.

double SUIT_CameraProperties::getMappingScale ( ) const

Mapping scale defines a mapping scaling factor for the height of the viewport in world-coordinate distances.

Returns
scaling value.
See Also
setMappingScale()

References myMappingScale.

void SUIT_CameraProperties::getPosition ( double &  theX,
double &  theY,
double &  theZ 
) const
Parameters
theX[out] x coordinate in world-coordinates space.
theY[out] y coordinate in world-coordinates space.
theZ[out] z coordinate in world-coordinates space.
See Also
setPosition()

References myPosition.

SUIT_CameraProperties::Projection SUIT_CameraProperties::getProjection ( ) const

For 3d viewer, projection mode can be of following values:

Returns
projection mode.
See Also
setProjection()

References myProjection.

double SUIT_CameraProperties::getViewAngle ( ) const
Returns
the angle of view.
See Also
setViewAngle()

References myViewAngle.

SUIT_CameraProperties::ViewSide SUIT_CameraProperties::getViewSide ( ) const

For 2d viewer, side view can be of following values:

Returns
side view.
See Also
setViewSide()

References myViewSide.

void SUIT_CameraProperties::getViewUp ( double &  theX,
double &  theY,
double &  theZ 
) const
Parameters
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.
See Also
setViewUp()

References myUpDir.

bool SUIT_CameraProperties::isCompatible ( const SUIT_CameraProperties other)
Parameters
otherother properties data
Returns
true if both camera properties sets are compatible

References Dim2D, Dim3D, getDimension(), getProjection(), getViewSide(), and isValid().

bool SUIT_CameraProperties::isValid ( ) const
Returns
true if camera properties data is valid.
See Also
setDimension()

References DimNone, and myDimension.

void SUIT_CameraProperties::setAxialScale ( const double  theScaleX,
const double  theScaleY,
const double  theScaleZ 
)
Parameters
theScaleX[in] scale by x coordinate.
theScaleY[in] scale by y coordinate.
theScaleZ[in] scale by z coordinate.
See Also
getAxialScale()

References myAxialScale.

void SUIT_CameraProperties::setDimension ( const Dimension  theDimension)
Parameters
theDimension[in] dimension mode.
See Also
getDimension()

References myDimension.

void SUIT_CameraProperties::setFocalPoint ( const double  theX,
const double  theY,
const double  theZ 
)
Parameters
theX[in] x coordinate in world-coordinates space.
theY[in] y coordinate in world-coordinates space.
theZ[in] z coordinate in world-coordinates space.
See Also
getFocalPoint()

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.

Parameters
theScale[in] the scaling.
See Also
getMappingScale()

References myMappingScale.

void SUIT_CameraProperties::setPosition ( const double  theX,
const double  theY,
const double  theZ 
)
Parameters
theX[in] x coordinate in world-coordinates space.
theY[in] y coordinate in world-coordinates space.
theZ[in] z coordinate in world-coordinates space.
See Also
getPosition()

References myPosition.

void SUIT_CameraProperties::setProjection ( const Projection  theProjection)

For 3d viewer, projection mode can be of following values:

Parameters
theProjection[in] projection mode.
See Also
getProjection()

References myProjection.

void SUIT_CameraProperties::setViewAngle ( const double  theViewAngle)
Parameters
theViewAngle[in] the angle of view.
See Also
getViewAngle()

References myViewAngle.

void SUIT_CameraProperties::setViewSide ( const ViewSide  theViewSide)

For 2d viewer, side view can be of following values:

Parameters
theViewSide[in] view side.
See Also
getViewSide()

References myViewSide.

void SUIT_CameraProperties::setViewUp ( const double  theX,
const double  theY,
const double  theZ 
)

It is recommended to set normalized vector coordinates for synchronization compatibility.

Parameters
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.
See Also
getViewUp()

References myUpDir.

Member Data Documentation

double SUIT_CameraProperties::myAxialScale[3]
private
Dimension SUIT_CameraProperties::myDimension
private
double SUIT_CameraProperties::myFocalPoint[3]
private
double SUIT_CameraProperties::myMappingScale
private
double SUIT_CameraProperties::myPosition[3]
private
Projection SUIT_CameraProperties::myProjection
private
double SUIT_CameraProperties::myUpDir[3]
private
double SUIT_CameraProperties::myViewAngle
private
ViewSide SUIT_CameraProperties::myViewSide
private

The documentation for this class was generated from the following files: