Simbody  3.7
SimTK::Visualizer::BodyFollower Class Reference

Causes the camera to point at and follow a point fixed on a body (a station). More...

+ Inheritance diagram for SimTK::Visualizer::BodyFollower:

Public Member Functions

 BodyFollower (const MobilizedBody &mobodB, const Vec3 &stationPinB=Vec3(0, 0, 0), const Vec3 &offset=Vec3(NaN), const UnitVec3 &upDirection=UnitVec3())
 
More...
 
void generateControls (const Visualizer &viz, const State &state, Array_< DecorativeGeometry > &geometry) override
 The Visualizer is just about to generate and render a frame corresponding to the given State. More...
 
- Public Member Functions inherited from SimTK::Visualizer::FrameController
virtual ~FrameController ()
 Destructor is virtual; be sure to override it if you have something to clean up at the end. More...
 

Detailed Description

Causes the camera to point at and follow a point fixed on a body (a station).

This might be useful if your system translates substantially and would thus leave the field of view of a stationary camera.

Constructor & Destructor Documentation

◆ BodyFollower()

SimTK::Visualizer::BodyFollower::BodyFollower ( const MobilizedBody mobodB,
const Vec3 stationPinB = Vec3(0, 0, 0),
const Vec3 offset = Vec3(NaN),
const UnitVec3 upDirection = UnitVec3() 
)


Parameters
[in]mobodBThe MobilizedBody to follow, designated as B.
[in]stationPinBThe location of the station P on the body to follow, expressed in B. By default, P is the origin of the MobilizedBody.
[in]offsetPosition of the camera from P, expressed in ground. Cannot be the zero vector. By default, this is (1, 1, 1) + h * u, where h is Visualizer::getGroundHeight() and u is Visualizer::getSystemUpDirection().
[in]upDirectionControls the rotation of the camera about the offset vector. The camera's up (+y) direction will be aligned with this vector as best as is possible. Expressed in ground. By default, this is Visualizer::getSystemUpDirection(); it's unlikely that you want something other than the default.

Member Function Documentation

◆ generateControls()

void SimTK::Visualizer::BodyFollower::generateControls ( const Visualizer viz,
const State state,
Array_< DecorativeGeometry > &  geometry 
)
overridevirtual

The Visualizer is just about to generate and render a frame corresponding to the given State.

Parameters
[in]viz
The Visualizer that is doing the rendering.
[in]state
The State that is being used to generate the frame about to be rendered by viz.
[in,out]geometryDecorativeGeometry being accumulated for rendering in this frame; be sure to append if you have anything to add.

Implements SimTK::Visualizer::FrameController.


The documentation for this class was generated from the following file: