chrono::ChCamera Class Reference

Description

Class for defining a camera point of view with basic settings.

#include <ChCamera.h>

Public Member Functions

void SetPosition (const ChVector<> &pos)
 Sets the position of the observer (eye point). More...
 
const ChVectorGetPosition () const
 Gets the position of the observer (eye point). More...
 
void SetAimPoint (const ChVector<> &point)
 Sets the position of the target point (aim point). More...
 
const ChVectorGetAimPoint () const
 Gets the position of the target point (aim point). More...
 
void SetUpVector (const ChVector<> &up)
 Sets the position of the 'up' direction of the camera (default is vertical, VECT_Y). More...
 
const ChVectorGetUpVector () const
 Gets the position of the 'up' direction of the camera (default is vertical, VECT_Y). More...
 
void SetAngle (double deg)
 Sets the opening angle of the lenses, in degrees, on horizontal direction. More...
 
double GetAngle () const
 Gets the opening angle of the lenses, in degrees, on horizontal direction.
 
void SetFOV (double f)
 Sets the Field Of View, if the visualization supports focusing.
 
double GetFOV () const
 Gets the Field Of View, if the visualization supports focusing.
 
void SetHVratio (double mf)
 Sets the Horizontal/Vertical size ratio. More...
 
double GetHVratio () const
 Gets the Horizontal/Vertical size ratio. More...
 
void SetOrthographic (bool mode)
 Set to 'true' if you want to disable perspective and get a 'flat' view. More...
 
bool IsOrthographic () const
 If 'true' it means that perspective projection is disabled and you get a 'flat' view. More...
 
virtual void Update ()
 Update the camera state. More...
 
virtual void ArchiveOUT (ChArchiveOut &archive)
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &archive)
 Method to allow de-serialization of transient data from archives.
 

Friends

class ChPhysicsItem
 

Member Function Documentation

◆ GetAimPoint()

const ChVector& chrono::ChCamera::GetAimPoint ( ) const
inline

Gets the position of the target point (aim point).

Expressed in the local coordinate system.

◆ GetHVratio()

double chrono::ChCamera::GetHVratio ( ) const
inline

Gets the Horizontal/Vertical size ratio.

Default = 4/3. For instance, 4/3 can be used if rendering to 800x600 images with square pixels.

◆ GetPosition()

const ChVector& chrono::ChCamera::GetPosition ( ) const
inline

Gets the position of the observer (eye point).

Expressed in the local coordinate system.

◆ GetUpVector()

const ChVector& chrono::ChCamera::GetUpVector ( ) const
inline

Gets the position of the 'up' direction of the camera (default is vertical, VECT_Y).

Expressed in the local coordinate system.

◆ IsOrthographic()

bool chrono::ChCamera::IsOrthographic ( ) const
inline

If 'true' it means that perspective projection is disabled and you get a 'flat' view.

This must be supported by the visualization system. By default is 'false'.

◆ SetAimPoint()

void chrono::ChCamera::SetAimPoint ( const ChVector<> &  point)
inline

Sets the position of the target point (aim point).

Expressed in the local coordinate system.

◆ SetAngle()

void chrono::ChCamera::SetAngle ( double  deg)
inline

Sets the opening angle of the lenses, in degrees, on horizontal direction.

E.g., 60=wide angle, 30=tele, etc.

◆ SetHVratio()

void chrono::ChCamera::SetHVratio ( double  mf)
inline

Sets the Horizontal/Vertical size ratio.

Default = 4/3. For instance, 4/3 can be used if rendering to 800x600 images with square pixels.

◆ SetOrthographic()

void chrono::ChCamera::SetOrthographic ( bool  mode)
inline

Set to 'true' if you want to disable perspective and get a 'flat' view.

This must be supported by the visualization system. By default is 'false'.

◆ SetPosition()

void chrono::ChCamera::SetPosition ( const ChVector<> &  pos)
inline

Sets the position of the observer (eye point).

Expressed in the local coordinate system.

◆ SetUpVector()

void chrono::ChCamera::SetUpVector ( const ChVector<> &  up)
inline

Sets the position of the 'up' direction of the camera (default is vertical, VECT_Y).

Expressed in the local coordinate system.

◆ Update()

virtual void chrono::ChCamera::Update ( )
inlinevirtual

Update the camera state.

This function is automatically called by the owner physics item.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/assets/ChCamera.h
  • /builds/uwsbel/chrono/src/chrono/assets/ChCamera.cpp