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 ChVector<> &ptOnChassis, const ChCoordsys<> &driverCoordsys, double chaseDist, double chaseHeight, const ChVector<> &up=ChVector<>(0, 0, 1), const ChVector<> &fwd=ChVector<>(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 ChVector<> &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. | |
ChVector | GetCameraPos () const |
Get current camera location (expressed in the world frame). | |
ChVector | 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. | |
Member Enumeration Documentation
◆ State
Member Function Documentation
◆ Initialize()
void chrono::utils::ChChaseCamera::Initialize | ( | const ChVector<> & | ptOnChassis, |
const ChCoordsys<> & | driverCoordsys, | ||
double | chaseDist, | ||
double | chaseHeight, | ||
const ChVector<> & | up = ChVector<>(0, 0, 1) , |
||
const ChVector<> & | fwd = ChVector<>(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