Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::AnimationState Class Reference

Represents the state of an animation and the weight of it's influence. More...

#include <OgreAnimationState.h>

Inheritance diagram for Ogre::AnimationState:

Ogre::ControllerValue List of all members.

Public Methods

 AnimationState ()
 Default constructor for STL only. More...

virtual ~AnimationState ()
 Destructor - is here because class has virtual functions and some compilers would whine if it won't exist. More...

 AnimationState (const String &animName, Real timePos, Real length, Real weight=1.0, bool enabled=false)
 Normal constructor with all params supplied. More...

String getAnimationName () const
 Gets the name of the animation to which this state applies. More...

void setAnimationName (const String &name)
 Sets the name of the animation to which this state applies. More...

Real getTimePosition (void) const
 Gets the time position for this animation. More...

void setTimePosition (Real timePos)
 Sets the time position for this animation. More...

Real getLength () const
 Gets the total length of this animation (may be shorter than whole animation). More...

void setLength (Real len)
 Sets the total length of this animation (may be shorter than whole animation). More...

Real getWeight (void) const
 Gets the weight (influence) of this animation. More...

void setWeight (Real weight)
 Sets the weight (influence) of this animation. More...

void addTime (Real offset)
 Modifies the time position, adjusting for animation length. More...

bool getEnabled (void) const
 Returns true if this animation is currently enabled. More...

void setEnabled (bool enabled)
 Sets whether this animation is enabled. More...

bool operator== (const AnimationState &rhs) const
 Equality operator. More...

bool operator!= (const AnimationState &rhs) const
Real getValue (void)
 ControllerValue implementation. More...

void setValue (Real value)
 ControllerValue implementation. More...


Protected Attributes

String mAnimationName
Real mTimePos
Real mLength
Real mInvLength
Real mWeight
bool mEnabled

Detailed Description

Represents the state of an animation and the weight of it's influence.

Remarks:
Other classes can hold instances of this class to store the state of any animations they are using. This class implements the ControllerValue interface to enable automatic update of animation state through controllers.


Constructor & Destructor Documentation

Ogre::AnimationState::AnimationState  
 

Default constructor for STL only.

Ogre::AnimationState::~AnimationState   [virtual]
 

Destructor - is here because class has virtual functions and some compilers would whine if it won't exist.

Ogre::AnimationState::AnimationState const String   animName,
Real    timePos,
Real    length,
Real    weight = 1.0,
bool    enabled = false
 

Normal constructor with all params supplied.


Member Function Documentation

void Ogre::AnimationState::addTime Real    offset
 

Modifies the time position, adjusting for animation length.

String Ogre::AnimationState::getAnimationName   const
 

Gets the name of the animation to which this state applies.

bool Ogre::AnimationState::getEnabled void    const
 

Returns true if this animation is currently enabled.

Real Ogre::AnimationState::getLength   const
 

Gets the total length of this animation (may be shorter than whole animation).

Real Ogre::AnimationState::getTimePosition void    const
 

Gets the time position for this animation.

Real Ogre::AnimationState::getValue void    [virtual]
 

ControllerValue implementation.

Implements Ogre::ControllerValue.

Real Ogre::AnimationState::getWeight void    const
 

Gets the weight (influence) of this animation.

bool Ogre::AnimationState::operator!= const AnimationState &    rhs const
 

bool Ogre::AnimationState::operator== const AnimationState &    rhs const
 

Equality operator.

void Ogre::AnimationState::setAnimationName const String   name
 

Sets the name of the animation to which this state applies.

void Ogre::AnimationState::setEnabled bool    enabled
 

Sets whether this animation is enabled.

void Ogre::AnimationState::setLength Real    len
 

Sets the total length of this animation (may be shorter than whole animation).

void Ogre::AnimationState::setTimePosition Real    timePos
 

Sets the time position for this animation.

void Ogre::AnimationState::setValue Real    value [virtual]
 

ControllerValue implementation.

Implements Ogre::ControllerValue.

void Ogre::AnimationState::setWeight Real    weight
 

Sets the weight (influence) of this animation.


Member Data Documentation

String Ogre::AnimationState::mAnimationName [protected]
 

bool Ogre::AnimationState::mEnabled [protected]
 

Real Ogre::AnimationState::mInvLength [protected]
 

Real Ogre::AnimationState::mLength [protected]
 

Real Ogre::AnimationState::mTimePos [protected]
 

Real Ogre::AnimationState::mWeight [protected]
 

Copyright © 2002 by The OGRE Team