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

## ◆ GetAimPoint()

 ChVector chrono::ChCamera::GetAimPoint ( )
inline

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

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

## ◆ GetHVratio()

 double chrono::ChCamera::GetHVratio ( )
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.

## ◆ GetOrthographic()

 bool chrono::ChCamera::GetOrthographic ( )
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'.

## ◆ GetPosition()

 ChVector chrono::ChCamera::GetPosition ( )
inline

Gets the position of the observer (eye point).

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

## ◆ GetUpVector()

 ChVector chrono::ChCamera::GetUpVector ( )
inline

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

## ◆ SetAimPoint()

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

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

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

## ◆ SetAngle()

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

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

Ex. 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 mb )
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 ( ChVector<> mv )
inline

Sets the position of the observer (eye point).

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

## ◆ SetUpVector()

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

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

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