chrono::utils::ChChaseCamera Class Reference
Description
Utility class for a generic chase camera which can be associated with any ChBody in a Chrono system.
This camera tracks a given point on the associated body (typically the chassis of a vehicle).
#include <ChUtilsChaseCamera.h>
Public Types | |
enum | State { Chase, Follow, Track, Inside, Free } |
Chase camera operation mode. More... | |
Public Member Functions | |
ChChaseCamera (std::shared_ptr< ChBody > chassis) | |
Construct a chase camera associated with the given body. | |
void | Initialize (const ChVector3d &ptOnChassis, const ChCoordsys<> &driverCoordsys, double chaseDist, double chaseHeight, const ChVector3d &up=ChVector3d(0, 0, 1), const ChVector3d &fwd=ChVector3d(1, 0, 0)) |
Initialize the chase camera. More... | |
void | Update (double step) |
Update internal dynamics. | |
void | Zoom (int val) |
Control chase distance. | |
void | Turn (int val) |
Control angle (in horizontal plane) around target point. | |
void | Raise (int val) |
Control camera height (for Free mode). | |
void | SetState (State s) |
Set the chase camera operation mode. | |
void | SetCameraPos (const ChVector3d &pos) |
Overwrite chase camera position. | |
void | SetCameraAngle (double angle) |
Overwrite chase camera angle (in horizontal plane). | |
State | GetState () const |
Get the current operation mode. | |
const std::string & | GetStateName () const |
Return a string description of the current operation mode. | |
ChVector3d | GetCameraPos () const |
Get current camera location (expressed in the world frame). | |
ChVector3d | GetTargetPos () const |
Get current location of the target point (expressed in the world frame). | |
void | SetHorizGain (double g) |
Set internal dynamics gain for camera movement in the horizontal plane. | |
void | SetVertGain (double g) |
Set internal dynamics gain for camera movement in the vertical direction. | |
void | SetMultLimits (double minMult, double maxMult) |
Set zoom limits. | |
void | SetChassis (std::shared_ptr< ChBody > chassis) |
Change the associated body. | |
void | SetTargetPoint (const ChVector3d &point) |
Set the target point on the associated body. | |
void | SetChaseDistance (double dist) |
Set the chase distance. | |
void | SetChaseHeight (double height) |
Set the chase height. | |
Member Enumeration Documentation
◆ State
Member Function Documentation
◆ Initialize()
void chrono::utils::ChChaseCamera::Initialize | ( | const ChVector3d & | ptOnChassis, |
const ChCoordsys<> & | driverCoordsys, | ||
double | chaseDist, | ||
double | chaseHeight, | ||
const ChVector3d & | up = ChVector3d(0, 0, 1) , |
||
const ChVector3d & | fwd = ChVector3d(1, 0, 0) |
||
) |
Initialize the chase camera.
- Parameters
-
ptOnChassis target point on associated body driverCoordsys local driver position (for `Inside` mode) chaseDist base value for distance behind target point on associated body chaseHeight base value for height above target point on associated body up vertical direction of the world frame fwd forward direction of the world frame
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/utils/ChUtilsChaseCamera.h
- /builds/uwsbel/chrono/src/chrono/utils/ChUtilsChaseCamera.cpp