#include <animationhelper.h>
Public Member Functions | |
| AnimationHelper () | |
| The constructor constructs a default AnimNodeBuilder, the Cal3DModelWrapper, and AnimationController are created on LoadModel(). | |
| virtual void | Update (float dt) |
| The user should call Update() on a per frame basis this function updates the sequence mixer and the Cal3DAnimator. | |
| bool | LoadModel (const std::string &pFilename) |
| This function loads a character XML file from string, on loading it creates a Cal3DAnimator with the Cal3DModelWrapper and then calls CreateGeode() on the AnimNodeBuilder. | |
| void | PlayAnimation (const std::string &pAnim) |
| This function plays the specified animation defined within the character XML. | |
| void | ClearAnimation (const std::string &pAnim, float fadeOutTime) |
| This function stops playing an animation by name over the course of time specified by fade out. | |
| void | ClearAll (float fadeOutTime) |
| This function stops playing all currently active animations over the time specified by fade out. | |
| osg::Node * | GetNode () |
| |
| const osg::Node * | GetNode () const |
| |
| Cal3DAnimator * | GetAnimator () |
| |
| const Cal3DAnimator * | GetAnimator () const |
| |
| Cal3DModelWrapper * | GetModelWrapper () |
| |
| const Cal3DModelWrapper * | GetModelWrapper () const |
| |
| SequenceMixer & | GetSequenceMixer () |
| |
| const SequenceMixer & | GetSequenceMixer () const |
| |
| virtual void | GetActorProperties (dtDAL::ActorProxy &pProxy, std::vector< dtCore::RefPtr< dtDAL::ActorProperty > > &pFillVector) |
| This function is used to create the proper actor properties for an animated entity after calling this function the user must iterate through the vector and add each property to its proxy. | |
| bool | GetGroundClamp () const |
| This flag is used by the AnimationComponent to determine if this entity should be ground clamped. | |
| void | SetGroundClamp (bool b) |
| Set whether or not this entity should be ground clamped. | |
| AttachmentController & | GetAttachmentController () |
| The animation helper has an attachment controller that moves the Transformable attachments to match up to the bones. | |
| void | SetAttachmentController (AttachmentController &newController) |
| Assigns a new AttachmentController. | |
Static Public Attributes | |
| static const std::string | PROPERTY_SKELETAL_MESH |
Protected Member Functions | |
| virtual | ~AnimationHelper () |
The constructor takes an AnimNodeBuilder which will create an osg::Geode given a Cal3DModelWrapper. The builder will be used to create the geode on LoadModel(), after that call GetGeode() and add this as a child of your actor's osg::Node
| dtAnim::AnimationHelper::AnimationHelper | ( | ) |
The constructor constructs a default AnimNodeBuilder, the Cal3DModelWrapper, and AnimationController are created on LoadModel().
| dtAnim::AnimationHelper::~AnimationHelper | ( | ) | [protected, virtual] |
| void dtAnim::AnimationHelper::Update | ( | float | dt | ) | [virtual] |
The user should call Update() on a per frame basis this function updates the sequence mixer and the Cal3DAnimator.
| bool dtAnim::AnimationHelper::LoadModel | ( | const std::string & | pFilename | ) |
This function loads a character XML file from string, on loading it creates a Cal3DAnimator with the Cal3DModelWrapper and then calls CreateGeode() on the AnimNodeBuilder.
| the | name of the file to load |
| void dtAnim::AnimationHelper::PlayAnimation | ( | const std::string & | pAnim | ) |
This function plays the specified animation defined within the character XML.
| The | name of the animation to play |
| void dtAnim::AnimationHelper::ClearAnimation | ( | const std::string & | pAnim, | |
| float | fadeOutTime | |||
| ) |
This function stops playing an animation by name over the course of time specified by fade out.
| The | name of the animation to clear | |
| The | amount of time to fade out over |
| void dtAnim::AnimationHelper::ClearAll | ( | float | fadeOutTime | ) |
This function stops playing all currently active animations over the time specified by fade out.
| The | amount of time to fade out over |
| osg::Node * dtAnim::AnimationHelper::GetNode | ( | ) |
| const osg::Node * dtAnim::AnimationHelper::GetNode | ( | ) | const |
| Cal3DAnimator * dtAnim::AnimationHelper::GetAnimator | ( | ) |
| const Cal3DAnimator * dtAnim::AnimationHelper::GetAnimator | ( | ) | const |
| Cal3DModelWrapper * dtAnim::AnimationHelper::GetModelWrapper | ( | ) |
| const Cal3DModelWrapper * dtAnim::AnimationHelper::GetModelWrapper | ( | ) | const |
| SequenceMixer & dtAnim::AnimationHelper::GetSequenceMixer | ( | ) |
| const SequenceMixer & dtAnim::AnimationHelper::GetSequenceMixer | ( | ) | const |
| void dtAnim::AnimationHelper::GetActorProperties | ( | dtDAL::ActorProxy & | pProxy, | |
| std::vector< dtCore::RefPtr< dtDAL::ActorProperty > > & | pFillVector | |||
| ) | [virtual] |
This function is used to create the proper actor properties for an animated entity after calling this function the user must iterate through the vector and add each property to its proxy.
| the | actor proxy | |
| an | empty vector to fill of actor properties |
| bool dtAnim::AnimationHelper::GetGroundClamp | ( | ) | const |
This flag is used by the AnimationComponent to determine if this entity should be ground clamped.
| void dtAnim::AnimationHelper::SetGroundClamp | ( | bool | b | ) |
Set whether or not this entity should be ground clamped.
| AttachmentController & dtAnim::AnimationHelper::GetAttachmentController | ( | ) |
The animation helper has an attachment controller that moves the Transformable attachments to match up to the bones.
| void dtAnim::AnimationHelper::SetAttachmentController | ( | AttachmentController & | newController | ) |
Assigns a new AttachmentController.
One is created by default, so this is provided to allow a developer to subclass the controller and assign the new one to the helper.
const std::string dtAnim::AnimationHelper::PROPERTY_SKELETAL_MESH [static] |