- Cal3D 0.9 API Reference - |
#include <mixer.h>
Inheritance diagram for CalMixer:
Public Member Functions | |
CalMixer () | |
Constructs the mixer instance. | |
virtual | ~CalMixer () |
Destructs the mixer instance. | |
virtual bool | isDefaultMixer () |
Is the object an instance of the default mixer (i.e. | |
bool | blendCycle (int id, float weight, float delay) |
Interpolates the weight of an animation cycle. | |
bool | clearCycle (int id, float delay) |
Fades an animation cycle out. | |
virtual bool | create (CalModel *pModel) |
Allocates and initializes all resources needed for the instance to operate. | |
virtual void | destroy () |
Releases all resources used by the instance and frees all allocated memory. | |
bool | executeAction (int id, float delayIn, float delayOut, float weightTarget=1.0f, bool autoLock=false) |
Executes an animation action. | |
bool | removeAction (int id) |
Clears an active animation action. | |
virtual void | updateAnimation (float deltaTime) |
Updates all active animations. | |
virtual void | updateSkeleton () |
Updates the skeleton of the corresponding CalModel (as provided to the create method) to match the current animation state (as updated by the last call to updateAnimation). | |
float | getAnimationTime () |
Returns the animation time. | |
float | getAnimationDuration () |
Returns the animation duration. | |
void | setAnimationTime (float animationTime) |
Sets the animation time. | |
void | setTimeFactor (float timeFactor) |
Set the time factor. | |
float | getTimeFactor () |
Get the time factor. | |
Public Attributes | |
CalModel * | m_pModel |
std::vector< CalAnimation * > | m_vectorAnimation |
std::list< CalAnimationAction * > | m_listAnimationAction |
std::list< CalAnimationCycle * > | m_listAnimationCycle |
float | m_animationTime |
float | m_animationDuration |
float | m_timeFactor |
|
Constructs the mixer instance. This function is the default constructor of the mixer instance. |
|
Destructs the mixer instance. This function is the destructor of the mixer instance. |
|
Interpolates the weight of an animation cycle. This function interpolates the weight of an animation cycle to a new value in a given amount of time. If the specified animation cycle is not active yet, it is activated.
|
|
Fades an animation cycle out. This function fades an animation cycle out in a given amount of time.
|
|
Allocates and initializes all resources needed for the instance to operate. When subclassing, it is recommended that the constructor does as little as possible and leaves the work to the create method. The create method must be called before any other method. It MUST support multiple calls without undesirable side effects (for instance object->create(model) called twice without a call to object->destroy() in between must not leak memory). The CalModel::setAbstractMixer method will call create. The CalModel::create method will call create if called after the instance was set using CalModel::setAbstractMixer (otherwise an instance of CalMixer is allocated and its create method is called).
Implements CalAbstractMixer. |
|
Releases all resources used by the instance and frees all allocated memory. It is recommended that the destructor of a CalAbstractMixer subclass does as little as possible and leaves the work to the destroy method. The destroy method MUST support multiple calls without undesirable side effects (such as deallocating a pointer twice). The CalModel::destroy method will call destroy if the instance was allocated by CalModel::create (in which case it is a CalMixer instance) or if the instance was set via CalModel::setAbstractMixer. Implements CalAbstractMixer. |
|
Executes an animation action. This function executes an animation action.
|
|
Returns the animation duration. This function returns the animation duration of the mixer instance.
|
|
Returns the animation time. This function returns the animation time of the mixer instance.
|
|
Get the time factor. This function return the time factor of the mixer instance. |
|
Is the object an instance of the default mixer (i.e. an instance of CalMixer) ?
Reimplemented from CalAbstractMixer. |
|
Clears an active animation action. This function removes an animation action from the blend list. This is particularly useful with auto-locked actions on their last frame.
|
|
Sets the animation time. This function sets the animation time of the mixer instance. |
|
Set the time factor. This function sets the time factor of the mixer instance. this time factor affect only sync animation |
|
Updates all active animations. This function updates all active animations of the mixer instance for a given amount of time.
Implements CalAbstractMixer. |
|
Updates the skeleton of the corresponding CalModel (as provided to the create method) to match the current animation state (as updated by the last call to updateAnimation). The tracks of each active animation are blended to compute the position and orientation of each bone of the skeleton. The updateAnimation method should be called just before calling updateSkeleton to define the set of active animations. The CalModel::update method will call updateSkeleton immediately after updateAnimation if the instance was allocated by CalModel::create (in which case it is a CalMixer instance) or if the instance was set via CalModel::setAbstractMixer. Implements CalAbstractMixer. |