|
Motive Animation System
An open source project by
FPL.
|
Public Member Functions | |
| MotivatorNf () | |
| MotivatorNf (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions) | |
| MotivatorNf (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions, const MotiveTarget1f *ts) | |
| void | Initialize (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions) |
| void | InitializeWithTargets (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions, const MotiveTarget1f *targets) |
| void | InitializeWithTargetShape (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions, const MotiveCurveShape &shape, const float *target_values, const float *target_velocities) |
| void | InitializeWithSplines (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions, const CompactSpline *splines, const SplinePlayback &playback) |
| const float * | Values () const |
| void | Velocities (float *out) const |
| void | Directions (float *out) const |
| void | TargetValues (float *out) const |
| void | TargetVelocities (float *out) const |
| void | Differences (float *out) const |
| MotiveTime | TargetTime () const |
| MotiveCurveShape | MotiveShape () const |
| Returns the shape of the current curve. | |
| MotiveTime | SplineTime () const |
| void | Splines (const CompactSpline **splines) const |
| void | SetSpline (const CompactSpline &spline, const SplinePlayback &playback) |
| void | SetSplines (const CompactSpline *splines, const SplinePlayback &playback) |
| void | SetSplineTime (MotiveTime time) |
| void | SetSplinePlaybackRate (float playback_rate) |
| void | SetTargets (const MotiveTarget1f *targets) |
| void | SetTargetWithShape (const float *target_values, const float *target_velocities, const MotiveCurveShape &shape) |
| void | SetSplinesAndTargets (const CompactSpline *const *splines, const SplinePlayback &playback, const MotiveTarget1f *targets) |
Public Member Functions inherited from motive::Motivator | |
| Motivator (const Motivator &original) | |
| Motivator & | operator= (const Motivator &original) |
| ~Motivator () | |
| Remove ourselves from the MotiveProcessor when we're deleted. | |
| void | Invalidate () |
| bool | Valid () const |
| bool | Sane () const |
| MotivatorType | Type () const |
| MotiveDimension | Dimensions () const |
Protected Member Functions | |
| MotiveProcessorNf & | Processor () |
| const MotiveProcessorNf & | Processor () const |
Protected Member Functions inherited from motive::Motivator | |
| Motivator (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions) | |
| void | InitializeWithDimension (const MotivatorInit &init, MotiveEngine *engine, MotiveDimension dimensions) |
| void | Init (MotiveProcessor *processor, MotiveIndex index) |
| These should only be called by MotiveProcessor! | |
| void | Reset () |
| const MotiveProcessor * | Processor () const |
Additional Inherited Members | |
Protected Attributes inherited from motive::Motivator | |
| MotiveProcessor * | processor_ |
| MotiveIndex | index_ |
|
inline |
Motivator is created in a reset state. When in the reset state, it is not being driven, and Value(), Velocity(), etc. cannot be called.
|
inline |
Initialize to the motion algorithm specified by init. Current and target values are not set.
|
inline |
Initialize to the motion algorithm specified by init. Set current and target values as specified by ts.
|
inline |
Initialize this Motivator to the type specified in init.type.
|
inline |
Initialize to the motion algorithm specified by init. Set movement to follow the curves specified in splines, an array of length dimensions, and modified byplayback`.
|
inline |
Initialize to the motion algorithm specified by init. Set current and target values as specified by targets, an array of length dimensions.
|
inline |
Initialize to the motion algorithm specified by init. Set target values and velocities as specified by 'target_values' and 'target_velocities', arrays of length dimensions, with shape specified by 'shape'.
|
inline |
Follow the curve specified in spline. Overrides the existing current value.
| spline | The spline to follow. Array of length Dimensions(). |
| playback | The time into the splines to initiate playback, the blend time to the splines, and whether to repeat from the beginning after the end of the spline is reached. |
|
inline |
Set rate at which we consume the spline set in SetSpline(). 0 ==> paused 0.5 ==> half speed (slow motion) 1 ==> authored speed 2 ==> double speed (fast forward)
|
inline |
Follow the curves specified in splines. Overrides the existing current value.
| splines | The splines that the curves should follow. Array of length Dimensions(). |
| playback | The time into the splines to initiate playback, the blend time to the splines, and whether to repeat from the beginning after the end of the spline is reached. |
|
inline |
Drive some channels with splines and others with targets. For i between 0 and Dimensions()-1, if splines[i] != NULL drive channel i with splines[i]. Otherwise, drive channel i with targets[i].
| splines | Array of pointers to splines, length Dimensions(). Pointers can be NULL. |
| playback | Various parameters for splines. |
| targets | Array of targets that are used when splines are not specified. Length Dimensions(). |
|
inline |
Seek to a specific time in the spline.
| time | The time (in the spline's x-axis) to seek to. |
|
inline |
Set the target and (optionally the current) motivator values. Use this call to procedurally drive the Motivator towards a specific target. The Motivator will transition smoothly to the new target.
| targets | The targets that each value should achieve. An array of length Dimensions(). |
|
inline |
Set the target values, velocities, and curve shape for the motivator. Procedurally drive the Motivator to 'target_values' and 'target_velocities' following a curve defined by 'shape'. Setting the target with the shape makes it so that a time does not need to be specified, as it will be calculated. In contrast, if the time needed to achieve a value is to be user-provided, SetTarget should be used instead.
| target_value | Array of target values with length Dimensions. |
| target_velocity | Array of target velocities with length Dimensions. |
| shape | The shape of the curve we'll create, as determined by the curve's typical delta value, typical total time, and bias. |
|
inline |
Gather pointers to the splines currently being played, on each dimension.
| splines | Output array of length Dimensions(). |
|
inline |
Returns the current time (i.e. the x-value) in the current spline. If Motivator is not being driven by a spline, returns 0. Whenever SetSpline() is called, this value will be reset to the start_time specified in SplinePlayback. Every time MotiveEngine::AdvanceFrame() is called, it will increment by delta_time * playback_rate. If the SplinePlayback has repeat=true, then SplineTime() will periodically loop back to time 0.
|
inline |
Returns time remaining until target is reached. The unit of time is determined by the calling program.