dtAnim::AnimationSequence Class Reference

AnimationSequence derives from Animatable and contains a child list of animations to play. More...

#include <animationsequence.h>

Inheritance diagram for dtAnim::AnimationSequence:

dtAnim::Animatable

List of all members.

Public Types

typedef std::list
< dtCore::RefPtr< Animatable > > 
AnimationContainer
typedef
AnimationContainer::allocator_type::value_type 
ContainerType

Public Member Functions

 AnimationSequence ()
 AnimationSequence (AnimationController *)
void AddAnimation (Animatable *pAnimation)
 Add an animation as a child of this sequence.
void ClearAnimation (const std::string &pAnimName, float fadeTime)
 Fade out an animation by name.
AnimatableGetAnimation (const std::string &pAnimName)
 Get a child animation by name.
const AnimatableGetAnimation (const std::string &pAnimName) const
AnimationControllerGetController ()
 Get the controller for this sequence.
const AnimationControllerGetController () const
void SetController (AnimationController *pController)
 Override the default controller.
AnimationContainerGetChildAnimations ()
 Get a reference to the child animations.
const AnimationContainerGetChildAnimations () const
void Update (float dt)
 Our virtual update function.
void Prune ()
 Prune is called before the animation is deleted.
virtual dtCore::RefPtr
< Animatable
Clone (Cal3DModelWrapper *modelWrapper) const
 This function copies sequence and all child Animatables.
void Recalculate ()
 Recalculate is called on PlayAnimation() it calculates the start and end times of our animation.
void ForceFadeOut (float time)
 Force fade out will make this animation and all child animations fade out over time.

Protected Member Functions

 ~AnimationSequence ()
 AnimationSequence (const AnimationSequence &, Cal3DModelWrapper *wrapper)
 No one should be calling the copy canstructor except the clone method.
AnimationSequenceoperator= (const AnimationSequence &)
 Hide this to prevent assigning.

Classes

class  AnimationController
 AnimationController is responsible for updating the sequences child Animatables. More...


Detailed Description

AnimationSequence derives from Animatable and contains a child list of animations to play.

The animations can be AnimationChannels or other AnimationSequences.


Member Typedef Documentation

typedef std::list<dtCore::RefPtr<Animatable> > dtAnim::AnimationSequence::AnimationContainer

typedef AnimationContainer::allocator_type::value_type dtAnim::AnimationSequence::ContainerType


Constructor & Destructor Documentation

dtAnim::AnimationSequence::AnimationSequence (  ) 

dtAnim::AnimationSequence::AnimationSequence ( AnimationController pController  ) 

dtAnim::AnimationSequence::~AnimationSequence (  )  [protected]

dtAnim::AnimationSequence::AnimationSequence ( const AnimationSequence pSeq,
Cal3DModelWrapper wrapper 
) [protected]

No one should be calling the copy canstructor except the clone method.


Member Function Documentation

void dtAnim::AnimationSequence::AddAnimation ( Animatable pAnimation  ) 

Add an animation as a child of this sequence.

Parameters:
the child animatable

void dtAnim::AnimationSequence::ClearAnimation ( const std::string &  pAnimName,
float  fadeTime 
)

Fade out an animation by name.

Parameters:
time in seconds to fade out over

Animatable * dtAnim::AnimationSequence::GetAnimation ( const std::string &  pAnimName  ) 

Get a child animation by name.

Returns:
the child animation, or 0 if it isnt a child

const Animatable * dtAnim::AnimationSequence::GetAnimation ( const std::string &  pAnimName  )  const

AnimationSequence::AnimationController * dtAnim::AnimationSequence::GetController (  ) 

Get the controller for this sequence.

Returns:
the controller for this sequence

const AnimationSequence::AnimationController * dtAnim::AnimationSequence::GetController (  )  const

void dtAnim::AnimationSequence::SetController ( AnimationController pController  ) 

Override the default controller.

Parameters:
the new controller to use

AnimationSequence::AnimationContainer & dtAnim::AnimationSequence::GetChildAnimations (  ) 

Get a reference to the child animations.

Returns:
the container of child animations

const AnimationSequence::AnimationContainer & dtAnim::AnimationSequence::GetChildAnimations (  )  const

void dtAnim::AnimationSequence::Update ( float  dt  )  [virtual]

Our virtual update function.

Parameters:
delta time

Implements dtAnim::Animatable.

void dtAnim::AnimationSequence::Prune (  )  [virtual]

Prune is called before the animation is deleted.

Implements dtAnim::Animatable.

dtCore::RefPtr< Animatable > dtAnim::AnimationSequence::Clone ( Cal3DModelWrapper modelWrapper  )  const [virtual]

This function copies sequence and all child Animatables.

Implements dtAnim::Animatable.

void dtAnim::AnimationSequence::Recalculate (  )  [virtual]

Recalculate is called on PlayAnimation() it calculates the start and end times of our animation.

Implements dtAnim::Animatable.

void dtAnim::AnimationSequence::ForceFadeOut ( float  time  )  [virtual]

Force fade out will make this animation and all child animations fade out over time.

Parameters:
the time to fade out over

Implements dtAnim::Animatable.

AnimationSequence& dtAnim::AnimationSequence::operator= ( const AnimationSequence  )  [protected]

Hide this to prevent assigning.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008