#include <OgreAnimationState.h>
Public Member Functions | |
AnimationState (const String &animName, AnimationStateSet *parent, Real timePos, Real length, Real weight=1.0, bool enabled=false) | |
Normal constructor with all params supplied. | |
AnimationState (AnimationStateSet *parent, const AnimationState &rhs) | |
constructor to copy from an existing state with new parent | |
virtual | ~AnimationState () |
Destructor - is here because class has virtual functions and some compilers would whine if it won't exist. | |
const String & | getAnimationName () const |
Gets the name of the animation to which this state applies. | |
Real | getTimePosition (void) const |
Gets the time position for this animation. | |
void | setTimePosition (Real timePos) |
Sets the time position for this animation. | |
Real | getLength () const |
Gets the total length of this animation (may be shorter than whole animation). | |
void | setLength (Real len) |
Sets the total length of this animation (may be shorter than whole animation). | |
Real | getWeight (void) const |
Gets the weight (influence) of this animation. | |
void | setWeight (Real weight) |
Sets the weight (influence) of this animation. | |
void | addTime (Real offset) |
Modifies the time position, adjusting for animation length. | |
bool | hasEnded (void) const |
Returns true if the animation has reached the end and is not looping. | |
bool | getEnabled (void) const |
Returns true if this animation is currently enabled. | |
void | setEnabled (bool enabled) |
Sets whether this animation is enabled. | |
bool | operator== (const AnimationState &rhs) const |
Equality operator. | |
bool | operator!= (const AnimationState &rhs) const |
void | setLoop (bool loop) |
Sets whether or not an animation loops at the start and end of the animation if the time continues to be altered. | |
bool | getLoop (void) const |
Gets whether or not this animation loops. | |
void | copyStateFrom (const AnimationState &animState) |
Copies the states from another animation state, preserving the animation name (unlike operator=) but copying everything else. | |
AnimationStateSet * | getParent (void) const |
Get the parent animation state set. | |
Protected Attributes | |
String | mAnimationName |
AnimationStateSet * | mParent |
Real | mTimePos |
Real | mLength |
Real | mWeight |
bool | mEnabled |
bool | mLoop |
Definition at line 46 of file OgreAnimationState.h.
Ogre::AnimationState::AnimationState | ( | const String & | animName, | |
AnimationStateSet * | parent, | |||
Real | timePos, | |||
Real | length, | |||
Real | weight = 1.0 , |
|||
bool | enabled = false | |||
) |
Normal constructor with all params supplied.
Ogre::AnimationState::AnimationState | ( | AnimationStateSet * | parent, | |
const AnimationState & | rhs | |||
) |
constructor to copy from an existing state with new parent
virtual Ogre::AnimationState::~AnimationState | ( | ) | [virtual] |
Destructor - is here because class has virtual functions and some compilers would whine if it won't exist.
const String& Ogre::AnimationState::getAnimationName | ( | ) | const |
Gets the name of the animation to which this state applies.
Real Ogre::AnimationState::getTimePosition | ( | void | ) | const |
Gets the time position for this animation.
void Ogre::AnimationState::setTimePosition | ( | Real | timePos | ) |
Sets the time position for this animation.
Real Ogre::AnimationState::getLength | ( | ) | const |
Gets the total length of this animation (may be shorter than whole animation).
void Ogre::AnimationState::setLength | ( | Real | len | ) |
Sets the total length of this animation (may be shorter than whole animation).
Real Ogre::AnimationState::getWeight | ( | void | ) | const |
Gets the weight (influence) of this animation.
void Ogre::AnimationState::setWeight | ( | Real | weight | ) |
Sets the weight (influence) of this animation.
void Ogre::AnimationState::addTime | ( | Real | offset | ) |
Modifies the time position, adjusting for animation length.
bool Ogre::AnimationState::hasEnded | ( | void | ) | const |
Returns true if the animation has reached the end and is not looping.
bool Ogre::AnimationState::getEnabled | ( | void | ) | const |
Returns true if this animation is currently enabled.
void Ogre::AnimationState::setEnabled | ( | bool | enabled | ) |
Sets whether this animation is enabled.
bool Ogre::AnimationState::operator== | ( | const AnimationState & | rhs | ) | const |
Equality operator.
bool Ogre::AnimationState::operator!= | ( | const AnimationState & | rhs | ) | const |
void Ogre::AnimationState::setLoop | ( | bool | loop | ) |
Sets whether or not an animation loops at the start and end of the animation if the time continues to be altered.
Definition at line 95 of file OgreAnimationState.h.
bool Ogre::AnimationState::getLoop | ( | void | ) | const |
void Ogre::AnimationState::copyStateFrom | ( | const AnimationState & | animState | ) |
Copies the states from another animation state, preserving the animation name (unlike operator=) but copying everything else.
animState | Reference to animation state which will use as source. |
AnimationStateSet* Ogre::AnimationState::getParent | ( | void | ) | const |
String Ogre::AnimationState::mAnimationName [protected] |
Definition at line 109 of file OgreAnimationState.h.
AnimationStateSet* Ogre::AnimationState::mParent [protected] |
Definition at line 110 of file OgreAnimationState.h.
Real Ogre::AnimationState::mTimePos [protected] |
Definition at line 111 of file OgreAnimationState.h.
Real Ogre::AnimationState::mLength [protected] |
Definition at line 112 of file OgreAnimationState.h.
Real Ogre::AnimationState::mWeight [protected] |
Definition at line 113 of file OgreAnimationState.h.
bool Ogre::AnimationState::mEnabled [protected] |
Definition at line 114 of file OgreAnimationState.h.
bool Ogre::AnimationState::mLoop [protected] |
Definition at line 115 of file OgreAnimationState.h.
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat May 10 16:25:14 2008