chrono::ChCamera Class Reference

## Description

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

#include <ChCamera.h>

Inheritance diagram for chrono::ChCamera:
Collaboration diagram for chrono::ChCamera:

## Public Member Functions

void SetPosition (ChVector<> mv)
Sets the position of the observer (eye point). More...

ChVector GetPosition ()
Gets the position of the observer (eye point). More...

void SetAimPoint (ChVector<> mv)
Sets the position of the target point (aim point). More...

ChVector GetAimPoint ()
Gets the position of the target point (aim point). More...

void SetUpVector (ChVector<> mv)
Sets the position of the 'up' direction of the camera (default is vertical, VECT_Y) Expressed in the local coordinate system (ex. More...

ChVector GetUpVector ()
Gets the position of the 'up' direction of the camera (default is vertical, VECT_Y) Expressed in the local coordinate system (ex. More...

void SetAngle (double mdeg)
Sets the opening angle of the lenses, in degrees, on horizontal direction. More...

double GetAngle ()
Gets the opening angle of the lenses, in degrees, on horizontal direction.

void SetFOV (double mf)
Sets the Field Of View, if the visualization supports focusing.

double GetFOV ()
Gets the Field Of View, if the visualization supports focusing.

void SetHVratio (double mf)
Sets the Horizontal/Vertical size ratio. More...

double GetHVratio ()
Gets the Horizontal/Vertical size ratio. More...

void SetOrthographic (bool mb)
Set to 'true' if you want to disable perspective and get a 'flat' view. More...

bool GetOrthographic ()
If 'true' it means that perspective projection is disabled and you get a 'flat' view. More...

virtual void ArchiveOUT (ChArchiveOut &marchive) override
Method to allow serialization of transient data to archives.

virtual void ArchiveIN (ChArchiveIn &marchive) override
Method to allow de-serialization of transient data from archives.

Public Member Functions inherited from chrono::ChAsset
virtual void Update (ChPhysicsItem *updater, const ChCoordsys<> &coords)
This is called by the owner, i.e. More...

## Member Function Documentation

 ChVector chrono::ChCamera::GetAimPoint ( )

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

Expressed in the local coordinate system (ex. of the owner ChBody, of ChAssetLevel,..)

 double chrono::ChCamera::GetHVratio ( )

Gets the Horizontal/Vertical size ratio.

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

 bool chrono::ChCamera::GetOrthographic ( )

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

 ChVector chrono::ChCamera::GetPosition ( )

Gets the position of the observer (eye point).

Expressed in the local coordinate system (ex. of the owner ChBody, of ChAssetLevel,..)

 ChVector chrono::ChCamera::GetUpVector ( )

Gets the position of the 'up' direction of the camera (default is vertical, VECT_Y) Expressed in the local coordinate system (ex.

of the owner ChBody, of ChAssetLevel,..)

 void chrono::ChCamera::SetAimPoint ( ChVector<> mv )

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

Expressed in the local coordinate system (ex. of the owner ChBody, of ChAssetLevel,..)

 void chrono::ChCamera::SetAngle ( double mdeg )

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

Ex. 60=wide angle, 30=tele, etc.

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

Sets the Horizontal/Vertical size ratio.

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

 void chrono::ChCamera::SetOrthographic ( bool mb )

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

 void chrono::ChCamera::SetPosition ( ChVector<> mv )

Sets the position of the observer (eye point).

Expressed in the local coordinate system (ex. of the owner ChBody, of ChAssetLevel,..)

 void chrono::ChCamera::SetUpVector ( ChVector<> mv )

Sets the position of the 'up' direction of the camera (default is vertical, VECT_Y) Expressed in the local coordinate system (ex.

of the owner ChBody, of ChAssetLevel,..)