SCENE C++ API  2.0.22
Public Types | Public Member Functions | List of all members
LSCamera Class Reference

The LSCamera class is the representation of a camera object within SCENE. More...

#include <lscamera.h>

+ Inheritance diagram for LSCamera:

Public Types

enum  CameraMode
 The list of supported camera types. More...
 

Public Member Functions

CameraMode getCameraMode () const
 Get the camera mode. More...
 
void setCameraMode (CameraMode mode)
 Set the camera mode. More...
 
Eigen::Vector3d getCamPosition () const
 Get the camera position. More...
 
void setCamPosition (const Eigen::Vector3d &pos)
 Set the camera position. More...
 
Eigen::Vector3d getCamDirection () const
 Get the camera direction. More...
 
void setCamDirection (const Eigen::Vector3d &dir)
 Set the camera direction. More...
 
Eigen::Vector3d getCamDirUp () const
 Get camera up direction. More...
 
void setCamDirUp (const Eigen::Vector3d &dir) const
 Set camera up direction. More...
 
float getCamPitch () const
 Get the camera pitch. More...
 
void setCamPitch (float pitch)
 Sets the camera pitch. More...
 
float getCamYaw () const
 Get the camera yaw. More...
 
void setCamYaw (float yaw)
 Set the camera yaw. More...
 
float getCamRoll () const
 Get the camera roll. More...
 
void setCamRoll (float roll)
 Set the camera roll. More...
 
double getCamAspectRatio () const
 Get the camera aspect ratio. More...
 
void setCamAspectRatio (double aspectRatio)
 Set the camera aspect ratio. More...
 
float getWidth (float distance) const
 Get the width of the viewing frustum at a given distance. More...
 
void setWidth (float width, float distance)
 Set the width of the viewing frustum at a given distance. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LSRefType
void ref () const
 Increments the internal reference counter. More...
 
void unref () const
 Decrements the internal reference counter. More...
 

Detailed Description

The LSCamera class is the representation of a camera object within SCENE.

Version
SCENE API Version 2.0.0.

Member Enumeration Documentation

◆ CameraMode

enum CameraMode

The list of supported camera types.

Version
SCENE API Version 2.0.0.

Member Function Documentation

◆ getCameraMode()

CameraMode getCameraMode ( ) const

Get the camera mode.

Returns
The camera mode.
Version
SCENE API Version 2.0.0.

◆ setCameraMode()

void setCameraMode ( CameraMode  mode)

Set the camera mode.

Parameters
modeThe camera mode which will be activated.
Version
SCENE API Version 2.0.0.

◆ getCamPosition()

Eigen::Vector3d getCamPosition ( ) const

Get the camera position.

Returns
The camera position.
Version
SCENE API Version 2.0.0.

◆ setCamPosition()

void setCamPosition ( const Eigen::Vector3d &  pos)

Set the camera position.

This is broken in older API versions before and including 2.0.21.3610!

Parameters
posThe camera position.

◆ getCamDirection()

Eigen::Vector3d getCamDirection ( ) const

Get the camera direction.

Returns
The camera direction.
Version
SCENE API Version 2.0.0.

◆ setCamDirection()

void setCamDirection ( const Eigen::Vector3d &  dir)

Set the camera direction.

Parameters
dirThe camera direction.
Version
SCENE API Version 2.0.0.

◆ getCamDirUp()

Eigen::Vector3d getCamDirUp ( ) const

Get camera up direction.

Returns
The camera up direction.
Version
SCENE API Version 2.0.0.

◆ setCamDirUp()

void setCamDirUp ( const Eigen::Vector3d &  dir) const

Set camera up direction.

Parameters
dirThe camera up direction.
Version
SCENE API Version 2.0.0.

◆ getCamPitch()

float getCamPitch ( ) const

Get the camera pitch.

Returns
The camera pitch.
Version
SCENE API Version 2.0.0.

◆ setCamPitch()

void setCamPitch ( float  pitch)

Sets the camera pitch.

Parameters
pitchThe camera pitch.
Version
SCENE API Version 2.0.0.

◆ getCamYaw()

float getCamYaw ( ) const

Get the camera yaw.

Returns
The camera yaw.
Version
SCENE API Version 2.0.0.

◆ setCamYaw()

void setCamYaw ( float  yaw)

Set the camera yaw.

Parameters
yawThe camera yaw.
Version
SCENE API Version 2.0.0.

◆ getCamRoll()

float getCamRoll ( ) const

Get the camera roll.

Returns
The camera roll.
Version
SCENE API Version 2.0.0.

◆ setCamRoll()

void setCamRoll ( float  roll)

Set the camera roll.

Parameters
rollThe camera roll.
Version
SCENE API Version 2.0.0.

◆ getCamAspectRatio()

double getCamAspectRatio ( ) const

Get the camera aspect ratio.

Returns
The camera aspect ratio.
Version
SCENE API Version 2.0.0.

◆ setCamAspectRatio()

void setCamAspectRatio ( double  aspectRatio)

Set the camera aspect ratio.

Parameters
aspectRatioThe camera aspect ratio.
Version
SCENE API Version 2.0.0.

◆ getWidth()

float getWidth ( float  distance) const

Get the width of the viewing frustum at a given distance.

For orthographic cameras the distance input is discarded.

Parameters
distanceThe distance at which to calculate the width.
Returns
The width of the viewing frustum.
Version
SCENE API Version 2.0.0.

◆ setWidth()

void setWidth ( float  width,
float  distance 
)

Set the width of the viewing frustum at a given distance.

For orthographic cameras the distance input is discarded.

Parameters
widthThe width of the viewing frustum.
distanceThe distance at which to calculate the width.
Version
SCENE API Version 2.0.0.