dtAnim::AnimationChannel Class Reference

AnimationChannel derives from Animatable and holds an AnimationWrapper, and contains semantics for playing an animation using the Cal3DModelWrapper API. More...

#include <animationchannel.h>

Inheritance diagram for dtAnim::AnimationChannel:

dtAnim::Animatable

List of all members.

Public Member Functions

 AnimationChannel ()
 If you use the default constructor you must call SetAnimation, and SetModel.
 AnimationChannel (Cal3DModelWrapper *pModelWrapper, AnimationWrapper *pAnimationWrapper)
 
Parameters:
the model wrapper used to play animations with

void SetAnimation (AnimationWrapper *pAnimation)
 This function associates this channel with the supplied animation wrapper.
AnimationWrapperGetAnimation ()
const AnimationWrapperGetAnimation () const
Cal3DModelWrapperGetModel ()
 
Returns:
the model wrapper assigned to this channel.

const Cal3DModelWrapperGetModel () const
 
Returns:
the const model wrapper assigned to this channel.

void SetModel (Cal3DModelWrapper *pWrapper)
 This function sets the model wrapper used to make the calls to play the animation.
virtual dtCore::RefPtr
< Animatable
Clone (Cal3DModelWrapper *wrapper) const
 This function copies the animation channel.
bool IsLooping () const
 If an animation is not looping then it will be considered an action and the blend weights will be ignored.
void SetLooping (bool b)
bool IsAction () const
 If an animation is an action it will play once and automatically delete itself it will also be weighted to override all other conflicting animations.
void SetAction (bool b)
float GetMaxDuration () const
 The Max Duration will allow a user to set the amount of time this animation will play in seconds.
void SetMaxDuration (float b)
void Update (float dt)
 The per frame update function.
void Recalculate ()
 Recalculate is called on PlayAnimation() it calculates the start and end times of our animation.
void Prune ()
 Prune is called before the animation is deleted.
void ForceFadeOut (float time)
 ForceFadeOut will ignore the EndTime and automatically fade out this animation over the time specified.

Protected Member Functions

 ~AnimationChannel ()
 AnimationChannel (const AnimationChannel &)
 Copy Constructor Only clone should call this.
AnimationChanneloperator= (const AnimationChannel &)
 Operator Equal Hide this to prevent assigning.


Detailed Description

AnimationChannel derives from Animatable and holds an AnimationWrapper, and contains semantics for playing an animation using the Cal3DModelWrapper API.

Constructor & Destructor Documentation

dtAnim::AnimationChannel::AnimationChannel (  ) 

If you use the default constructor you must call SetAnimation, and SetModel.

dtAnim::AnimationChannel::AnimationChannel ( Cal3DModelWrapper pModelWrapper,
AnimationWrapper pAnimationWrapper 
)

Parameters:
the model wrapper used to play animations with

Parameters:
the animation wrapper to specify which animation to play

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

dtAnim::AnimationChannel::AnimationChannel ( const AnimationChannel pChannel  )  [protected]

Copy Constructor Only clone should call this.


Member Function Documentation

void dtAnim::AnimationChannel::SetAnimation ( AnimationWrapper pAnimation  ) 

This function associates this channel with the supplied animation wrapper.

Parameters:
the animation wrapper this channel will play

AnimationWrapper * dtAnim::AnimationChannel::GetAnimation (  ) 

const AnimationWrapper * dtAnim::AnimationChannel::GetAnimation (  )  const

Cal3DModelWrapper * dtAnim::AnimationChannel::GetModel (  ) 

Returns:
the model wrapper assigned to this channel.

const Cal3DModelWrapper * dtAnim::AnimationChannel::GetModel (  )  const

Returns:
the const model wrapper assigned to this channel.

void dtAnim::AnimationChannel::SetModel ( Cal3DModelWrapper pWrapper  ) 

This function sets the model wrapper used to make the calls to play the animation.

Parameters:
the associated model wrapper

dtCore::RefPtr< Animatable > dtAnim::AnimationChannel::Clone ( Cal3DModelWrapper wrapper  )  const [virtual]

This function copies the animation channel.

Parameters:
 

Implements dtAnim::Animatable.

bool dtAnim::AnimationChannel::IsLooping (  )  const

If an animation is not looping then it will be considered an action and the blend weights will be ignored.

void dtAnim::AnimationChannel::SetLooping ( bool  b  ) 

bool dtAnim::AnimationChannel::IsAction (  )  const

If an animation is an action it will play once and automatically delete itself it will also be weighted to override all other conflicting animations.

void dtAnim::AnimationChannel::SetAction ( bool  b  ) 

float dtAnim::AnimationChannel::GetMaxDuration (  )  const

The Max Duration will allow a user to set the amount of time this animation will play in seconds.

void dtAnim::AnimationChannel::SetMaxDuration ( float  b  ) 

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

The per frame update function.

Parameters:
delta time

Implements dtAnim::Animatable.

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

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

Implements dtAnim::Animatable.

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

Prune is called before the animation is deleted.

Implements dtAnim::Animatable.

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

ForceFadeOut will ignore the EndTime and automatically fade out this animation over the time specified.

Parameters:
the time to fade out over

Implements dtAnim::Animatable.

AnimationChannel & dtAnim::AnimationChannel::operator= ( const AnimationChannel pChannel  )  [protected]

Operator Equal Hide this to prevent assigning.


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