- Cal3D 0.11 API Reference -

Public Member Functions | List of all members
CalAnimationAction Class Reference
Inheritance diagram for CalAnimationAction:
CalAnimation

Public Member Functions

 CalAnimationAction (CalCoreAnimation *pCoreAnimation)
 Constructs the animation action instance.
 
bool execute (float delayIn, float delayOut, float weightTarget=1.0f, bool autoLock=false)
 Executes the animation action instance.
 
bool update (float deltaTime)
 Updates the animation action instance.
 
bool setManual ()
 Configures the action to be a manual action, and on.
 
bool setManualAnimationActionOn (bool p)
 Sets the manual animation on or off.
 
bool setManualAnimationActionWeight (float)
 Sets the weight of the manual animation.
 
bool setScale (float)
 Sets the scale of the animation.
 
float getScale ()
 Gets the scale of the animation.
 
bool setCompositionFunction (CompositionFunction)
 Sets the composition function, which controls how animation blends with other simultaneous animations.
 
CompositionFunction getCompositionFunction ()
 Gets the CompositionFunction of the animation.
 
bool setRampValue (float)
 Sets the rampValue of the animation.
 
float getRampValue ()
 Gets the RampValue of the animation.
 
bool manual ()
 Tells you whether the animation action is configured to be manual.
 
bool on ()
 Tells you whether the animation action is on, i.e., should it apply to bones.
 
- Public Member Functions inherited from CalAnimation
CalCoreAnimationgetCoreAnimation ()
 Provides access to the core animation.
 
const CalCoreAnimationgetCoreAnimation () const
 Provides access to the core animation.
 
State getState () const
 Returns the state.
 
float getTime () const
 Returns the time.
 
Type getType () const
 Returns the type.
 
float getWeight () const
 Returns the weight.
 
void setTime (float time)
 Set the time.
 
void setTimeFactor (float timeFactor)
 Set the time factor.
 
float getTimeFactor () const
 Get the time factor.
 
void checkCallbacks (float animationTime, CalModel *model)
 
void completeCallbacks (CalModel *model)
 

Additional Inherited Members

- Public Types inherited from CalAnimation
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 }
 
- Protected Member Functions inherited from CalAnimation
 CalAnimation (CalCoreAnimation *pCoreAnimation)
 
void setType (Type type)
 
void setState (State state)
 
void setWeight (float weight)
 

Constructor & Destructor Documentation

◆ CalAnimationAction()

CalAnimationAction::CalAnimationAction ( CalCoreAnimation * pCoreAnimation)

Constructs the animation action instance.

This function is the default constructor of the animation action instance.

Member Function Documentation

◆ execute()

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.

Parameters
delayInThe time in seconds until the animation action instance reaches the full weight from the beginning of its execution.
delayOutThe time in seconds in which the animation action instance reaches zero weight at the end of its execution.
weightTargetNo doxygen comment for this. FIXME.
autoLockThis prevents the Action from being reset and removed on the last keyframe if true.
Returns
One of the following values:
  • true if successful
  • false if was manual

◆ getCompositionFunction()

CalAnimation::CompositionFunction CalAnimationAction::getCompositionFunction ( )

Gets the CompositionFunction of the animation.

Gets the CompositionFunction of the animation. See setRampValue().

Returns

◆ getRampValue()

float CalAnimationAction::getRampValue ( )

Gets the RampValue of the animation.

Gets the RampValue of the animation. See setRampValue().

Returns

◆ getScale()

float CalAnimationAction::getScale ( )

Gets the scale of the animation.

Gets the scale of the animation. See setScale().

Returns

◆ manual()

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.

Returns
One of the following values:
  • true if successful
  • false if an error happend

◆ on()

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.

Returns
One of the following values:
  • true if successful
  • false if an error happend

◆ setCompositionFunction()

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.

Returns
One of the following values:
  • true if not setting to CompositionFunctionNull
  • false if setting to CompositionFunctionNull

◆ setManual()

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.

Returns
One of the following values:
  • true if successful
  • false if an error happend

◆ setManualAnimationActionOn()

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.

Returns
One of the following values:
  • true if manual
  • false if not manual

◆ setManualAnimationActionWeight()

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.

Returns
One of the following values:
  • true if manual
  • false if not manual

◆ setRampValue()

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.

Returns
  • true always.

◆ setScale()

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.

Returns
One of the following values:
  • true if manual
  • false if not manual

◆ update()

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.

Parameters
deltaTimeThe elapsed time in seconds since the last update.
Returns
One of the following values:
  • true if the animation action instance is still active or is manual
  • false if the execution of the animation action instance has ended

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

Generated by The Cal3D Team with Doxygen 1.10.0