- Cal3D 0.11 API Reference - |
Public Member Functions | |
CalAnimationAction (CalCoreAnimation *pCoreAnimation) | |
Constructs the animation action instance. More... | |
bool | execute (float delayIn, float delayOut, float weightTarget=1.0f, bool autoLock=false) |
Executes the animation action instance. More... | |
bool | update (float deltaTime) |
Updates the animation action instance. More... | |
bool | setManual () |
Configures the action to be a manual action, and on. More... | |
bool | setManualAnimationActionOn (bool p) |
Sets the manual animation on or off. More... | |
bool | setManualAnimationActionWeight (float) |
Sets the weight of the manual animation. More... | |
bool | setScale (float) |
Sets the scale of the animation. More... | |
float | getScale () |
Gets the scale of the animation. More... | |
bool | setCompositionFunction (CompositionFunction) |
Sets the composition function, which controls how animation blends with other simultaneous animations. More... | |
CompositionFunction | getCompositionFunction () |
Gets the CompositionFunction of the animation. More... | |
bool | setRampValue (float) |
Sets the rampValue of the animation. More... | |
float | getRampValue () |
Gets the RampValue of the animation. More... | |
bool | manual () |
Tells you whether the animation action is configured to be manual. More... | |
bool | on () |
Tells you whether the animation action is on, i.e., should it apply to bones. More... | |
![]() | |
CalCoreAnimation * | getCoreAnimation () |
Provides access to the core animation. More... | |
const CalCoreAnimation * | getCoreAnimation () const |
Provides access to the core animation. More... | |
State | getState () const |
Returns the state. More... | |
float | getTime () const |
Returns the time. More... | |
Type | getType () const |
Returns the type. More... | |
float | getWeight () const |
Returns the weight. More... | |
void | setTime (float time) |
Set the time. More... | |
void | setTimeFactor (float timeFactor) |
Set the time factor. More... | |
float | getTimeFactor () const |
Get the time factor. More... | |
void | checkCallbacks (float animationTime, CalModel *model) |
void | completeCallbacks (CalModel *model) |
Additional Inherited Members | |
![]() | |
enum | Type { TYPE_NONE = 0, TYPE_CYCLE, TYPE_POSE, TYPE_ACTION } |
enum | State { STATE_NONE = 0, STATE_SYNC, STATE_ASYNC, STATE_IN, STATE_STEADY, STATE_OUT, STATE_STOPPED } |
enum | CompositionFunction { CompositionFunctionNull = 0, CompositionFunctionReplace, CompositionFunctionAverage, CompositionFunctionCrossFade } |
![]() | |
CalAnimation (CalCoreAnimation *pCoreAnimation) | |
void | setType (Type type) |
void | setState (State state) |
void | setWeight (float weight) |
CalAnimationAction::CalAnimationAction | ( | CalCoreAnimation * | pCoreAnimation | ) |
Constructs the animation action instance.
This function is the default constructor of the animation action instance.
bool CalAnimationAction::execute | ( | float | delayIn, |
float | delayOut, | ||
float | weightTarget = 1.0f , |
||
bool | autoLock = false |
||
) |
Executes the animation action instance.
This function executes the animation action instance. You cannot execute a manual action.
delayIn | The time in seconds until the animation action instance reaches the full weight from the beginning of its execution. |
delayOut | The time in seconds in which the animation action instance reaches zero weight at the end of its execution. |
weightTarget | No doxygen comment for this. FIXME. |
autoLock | This prevents the Action from being reset and removed on the last keyframe if true. |
CalAnimation::CompositionFunction CalAnimationAction::getCompositionFunction | ( | ) |
Gets the CompositionFunction of the animation.
Gets the CompositionFunction of the animation. See setRampValue().
float CalAnimationAction::getRampValue | ( | ) |
Gets the RampValue of the animation.
Gets the RampValue of the animation. See setRampValue().
float CalAnimationAction::getScale | ( | ) |
Gets the scale of the animation.
Gets the scale of the animation. See setScale().
bool CalAnimationAction::manual | ( | ) |
Tells you whether the animation action is configured to be manual.
Tells you whether the animation action is configured to be manual. Call setManual() to configure it to be manual.
bool CalAnimationAction::on | ( | ) |
Tells you whether the animation action is on, i.e., should it apply to bones.
Tells you whether the animation action is on, i.e., should it apply to bones. All actions are on unless they are both manual and explicitly turned off.
bool CalAnimationAction::setCompositionFunction | ( | CompositionFunction | p | ) |
Sets the composition function, which controls how animation blends with other simultaneous animations.
If you set it to Replace, then when the animation is fully ramped on, all non-Replace and lower priority Replace animations will have zero influence. This factor does not apply to cycling animations. The priority of animations is, firstly whether they are Replace or not, and secondly how recently the animations were added, the most recently added animations having higher priority.
bool CalAnimationAction::setManual | ( | ) |
Configures the action to be a manual action, and on.
Configures the action to be a manual action, which the mixer does not call update() on. Once configuring an animation to be manual, you cannot change it back to non-manual.
bool CalAnimationAction::setManualAnimationActionOn | ( | bool | p | ) |
Sets the manual animation on or off.
If off, has no effect but retains
Sets the manual animation on or off. If off, has no effect but retains state.
bool CalAnimationAction::setManualAnimationActionWeight | ( | float | p | ) |
Sets the weight of the manual animation.
Sets the weight of the manual animation. Manual animations do not blend toward a weight target, so you set the weight directly, not a weight target.
bool CalAnimationAction::setRampValue | ( | float | p | ) |
Sets the rampValue of the animation.
The rampValue, from 0-1, scales the blend weight. If the blending function is Replace, the rampValue also scales the blend weight of non-Replace and lower priority animations by 1 - rampValue. Default should be 1.0.
bool CalAnimationAction::setScale | ( | float | p | ) |
Sets the scale of the animation.
Sets the scale of the animation. Scale is different from weight. Weight is really relative weight. All the weights are combined into a sum, and each animation contributes according to the ratio of its weight to the sum. In other words, the total influence of the weights is normalized to 1.0. In contrast, scale factors apply to animation actions independently. Scaling one animation action up does not decrease the scale of other actions applying to the same bones. Whereas the weights are used to compose animations onto a skeleton, scales are used to adjust the absolute, non-relative magnitude of an animation.
bool CalAnimationAction::update | ( | float | deltaTime | ) |
Updates the animation action instance.
This function updates the animation action instance for a given amount of time. It has no effect on manual actions.
deltaTime | The elapsed time in seconds since the last update. |