|
void | SetAnimationPath (vtAnimPath *path) |
| Set the animation path for this engine to use.
|
|
vtAnimPath * | GetAnimationPath () |
| Get the animation path associated with this engine.
|
|
const vtAnimPath * | GetAnimationPath () const |
| Get the animation path associated with this engine.
|
|
void | Reset () |
|
void | SetSpeed (float fSpeed) |
| Set the play speed, in time units per second. Default is 1.0.
|
|
float | GetSpeed () const |
| Get the play speed.
|
|
void | SetContinuous (bool bFlag) |
|
bool | GetContinuous () const |
| Return true if set for continuous play.
|
|
void | SetPosOnly (bool bFlag) |
|
bool | GetPosOnly () const |
| Return true if set to use position only.
|
|
virtual void | Eval () |
| Virtual handler, will be called every frame to do the work of the engine.
|
|
void | SetTime (float fTime) |
|
float | GetTime () |
|
osg::Referenced * | GetTarget (uint which=0) |
|
void | AddTarget (osg::Referenced *ptr) |
|
void | RemoveTarget (osg::Referenced *ptr) |
|
uint | NumTargets () |
| Return the number of targets for this engine.
|
|
virtual void | OnMouse (vtMouseEvent &event) |
| Virtual handler, to catch mouse events, can be overridden by your engine class.
|
|
virtual void | OnKey (int key, int flags) |
| Virtual handler, to catch keyboard events, can be overridden by your engine class.
|
|
virtual void | OnWindowSize (int width, int height) |
| Virtual handler, to catch resize events, can be overridden by your engine class.
|
|
This class connects a path (vtAnimPath) to any number of targets. The targets can be any transform (such as scene graph object or camera) which will be moved along the path based on time.
Speed is relative. For example, calling SetSpeed(2.0) means that an animation path with control points from 0 to 10 seconds will be played in 5 seconds. Default speed is 1.0.
Other aspects of playback you can control include continuous play (SetContinuous) and position only (SetPosOnly) which is useful if you want to move a camera along a path but allow the user to freely look around.