Project Chrono: chrono::ChCamera Class Reference

Public Member Functions | Friends | List of all members
chrono::ChCamera Class Reference
Chrono::Engine » Visual asset objects

## Description

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

`#include <ChCamera.h>`

## Public Member Functions
void | SetPosition (const ChVector3d &pos)
| Sets the position of the observer (eye point).
const ChVector3d & | GetPosition () const
| Gets the position of the observer (eye point).
void | SetAimPoint (const ChVector3d &point)
| Sets the position of the target point (aim point).
const ChVector3d & | GetAimPoint () const
| Gets the position of the target point (aim point).
void | SetUpVector (const ChVector3d &up)
| Sets the position of the 'up' direction of the camera (default is vertical, VECT_Y).
const ChVector3d & | GetUpVector () const
| Gets the position of the 'up' direction of the camera (default is vertical, VECT_Y).
void | SetAngle (double deg)
| Sets the opening angle of the lenses, in degrees, on horizontal direction.
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.
double | GetHVratio () const
| Gets the Horizontal/Vertical size ratio.
void | SetOrthographic (bool mode)
| Set to 'true' if you want to disable perspective and get a 'flat' view.
bool | IsOrthographic () const
| If 'true' it means that perspective projection is disabled and you get a 'flat' view.
virtual void | Update ()
| Update the camera state.
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 ChVector3d & 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 ChVector3d & chrono::ChCamera::GetPosition | ( |  | ) | const
| inline

Gets the position of the observer (eye point).

Expressed in the local coordinate system.

## ◆ GetUpVector()

const ChVector3d & 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 ChVector3d & | 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 ChVector3d & | pos | ) |
| inline

Sets the position of the observer (eye point).

Expressed in the local coordinate system.

## ◆ SetUpVector()

void chrono::ChCamera::SetUpVector | ( | const ChVector3d & | 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:

- D:/W/B/src/chrono-9.0.1/src/chrono/assets/ChCamera.h
- D:/W/B/src/chrono-9.0.1/src/chrono/assets/ChCamera.cpp