Version: 9.15.0
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

Base class for Camera Properties.

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

Member Enumeration Documentation

◆ Dimension

Enumerator
DimNone 
Dim2D 
Dim3D 

◆ Projection

Enumerator
PrjOrthogonal 
PrjPerspective 

◆ ViewSide

Enumerator
ViewNone 
ViewXY 
ViewXZ 
ViewYZ 

Constructor & Destructor Documentation

◆ SUIT_CameraProperties()

SUIT_CameraProperties::SUIT_CameraProperties ( )

Default constructor.

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::~SUIT_CameraProperties ( )
virtual

Destructor.

Member Function Documentation

◆ getAxialScale()

void SUIT_CameraProperties::getAxialScale ( double &  theScaleX,
double &  theScaleY,
double &  theScaleZ 
)

get scaling factors for world-coordinate space axes.

Parameters
theScaleX[out] scale by x coordinate.
theScaleY[out] scale by y coordinate.
theScaleZ[out] scale by z coordinate.
See also
setAxialScale()

References myAxialScale.

◆ getDimension()

SUIT_CameraProperties::Dimension SUIT_CameraProperties::getDimension ( ) const

get dimension supported by camera.

Returns
dimension mode.
See also
setDimension()

References myDimension.

◆ getFocalPoint()

void SUIT_CameraProperties::getFocalPoint ( double &  theX,
double &  theY,
double &  theZ 
) const

get camera's focal point (look point).

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.

◆ getMappingScale()

double SUIT_CameraProperties::getMappingScale ( ) const

get window mapping scale (parallel scale).

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.

◆ getPosition()

void SUIT_CameraProperties::getPosition ( double &  theX,
double &  theY,
double &  theZ 
) const

get camera's position (eye).

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.

◆ getProjection()

SUIT_CameraProperties::Projection SUIT_CameraProperties::getProjection ( ) const

get projection mode supported by camera (for 3d viewer).

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

Returns
projection mode.
See also
setProjection()

References myProjection.

◆ getViewAngle()

double SUIT_CameraProperties::getViewAngle ( ) const

get angle (typically in degrees) of view for perpective projection mode.

Returns
the angle of view.
See also
setViewAngle()

References myViewAngle.

◆ getViewSide()

SUIT_CameraProperties::ViewSide SUIT_CameraProperties::getViewSide ( ) const

get side view supported by camera (for 2d viewer).

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

Returns
side view.
See also
setViewSide()

References myViewSide.

◆ getViewUp()

void SUIT_CameraProperties::getViewUp ( double &  theX,
double &  theY,
double &  theZ 
) const

get camera up direction vector.

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.

◆ isCompatible()

bool SUIT_CameraProperties::isCompatible ( const SUIT_CameraProperties other)

Check if this camera properties data is compatible with other camera properties.

Parameters
otherother properties data
Returns
true if both camera properties sets are compatible

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

◆ isValid()

bool SUIT_CameraProperties::isValid ( ) const

Check if camera properties are valid.

Returns
true if camera properties data is valid.
See also
setDimension()

References DimNone, and myDimension.

◆ setAxialScale()

void SUIT_CameraProperties::setAxialScale ( const double  theScaleX,
const double  theScaleY,
const double  theScaleZ 
)

set scaling factors for world-coordinate space axes.

Parameters
theScaleX[in] scale by x coordinate.
theScaleY[in] scale by y coordinate.
theScaleZ[in] scale by z coordinate.
See also
getAxialScale()

References myAxialScale.

◆ setDimension()

void SUIT_CameraProperties::setDimension ( const Dimension  theDimension)

set dimension supported by camera.

Parameters
theDimension[in] dimension mode.
See also
getDimension()

References myDimension.

◆ setFocalPoint()

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

set camera's focal point (look point).

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.

◆ setMappingScale()

void SUIT_CameraProperties::setMappingScale ( const double  theScale)

set window mapping scale (parallel scale).

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, and theScale.

◆ setPosition()

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

get camera's position (eye).

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.

◆ setProjection()

void SUIT_CameraProperties::setProjection ( const Projection  theProjection)

set projection mode supported by camera (for 3d viewer).

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

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

References myProjection.

◆ setViewAngle()

void SUIT_CameraProperties::setViewAngle ( const double  theViewAngle)

set angle (typically in degrees) of view for perpective projection mode.

Parameters
theViewAngle[in] the angle of view.
See also
getViewAngle()

References myViewAngle.

◆ setViewSide()

void SUIT_CameraProperties::setViewSide ( const ViewSide  theViewSide)

set side view supported by camera (for 2d viewer).

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

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

References myViewSide.

◆ setViewUp()

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

set camera up direction vector.

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

◆ myAxialScale

double SUIT_CameraProperties::myAxialScale[3]
private

scaling factors for world axes

◆ myDimension

Dimension SUIT_CameraProperties::myDimension
private

dimension

◆ myFocalPoint

double SUIT_CameraProperties::myFocalPoint[3]
private

focal point position in world-space coordinates

◆ myMappingScale

double SUIT_CameraProperties::myMappingScale
private

window mapping scale (parallel projection scale)

◆ myPosition

double SUIT_CameraProperties::myPosition[3]
private

camera position (eye).

◆ myProjection

Projection SUIT_CameraProperties::myProjection
private

projection mode (for 3d viewer): orthogonal / perspective

◆ myUpDir

double SUIT_CameraProperties::myUpDir[3]
private

camera up vector

◆ myViewAngle

double SUIT_CameraProperties::myViewAngle
private

perspective view angle in degrees

◆ myViewSide

ViewSide SUIT_CameraProperties::myViewSide
private

side view (for 2d viewer)


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