OGRE
1.9.0
|
Represents the state of an animation and the weight of its influence. More...
#include <OgreAnimationState.h>
Public Types | |
typedef vector< float >::type | BoneBlendMask |
Typedef for an array of float values used as a bone blend mask. | |
Public Member Functions | |
AnimationState (AnimationStateSet *parent, const AnimationState &rhs) | |
Constructor to copy from an existing state with new parent. | |
AnimationState (const String &animName, AnimationStateSet *parent, Real timePos, Real length, Real weight=1.0, bool enabled=false) | |
Normal constructor with all params supplied. | |
virtual | ~AnimationState () |
void | _setBlendMask (const BoneBlendMask *blendMask) |
Set the blend mask. | |
void | _setBlendMaskData (const float *blendMaskData) |
Set the blend mask data (might be dangerous) | |
void | addTime (Real offset) |
Modifies the time position, adjusting for animation length. | |
void | copyStateFrom (const AnimationState &animState) |
Copies the states from another animation state, preserving the animation name (unlike operator=) but copying everything else. | |
void | createBlendMask (size_t blendMaskSizeHint, float initialWeight=1.0f) |
Create a new blend mask with the given number of entries. | |
void | destroyBlendMask () |
Destroy the currently set blend mask. | |
const String & | getAnimationName () const |
Gets the name of the animation to which this state applies. | |
const BoneBlendMask * | getBlendMask () const |
Get the current blend mask (const version, may be 0) | |
float | getBlendMaskEntry (size_t boneHandle) const |
Get the weight for the bone identified by the given handle. | |
bool | getEnabled (void) const |
Returns true if this animation is currently enabled. | |
Real | getLength () const |
Gets the total length of this animation (may be shorter than whole animation) | |
bool | getLoop (void) const |
Gets whether or not this animation loops. | |
AnimationStateSet * | getParent (void) const |
Get the parent animation state set. | |
Real | getTimePosition (void) const |
Gets the time position for this animation. | |
Real | getWeight (void) const |
Gets the weight (influence) of this animation. | |
bool | hasBlendMask () const |
Return whether there is currently a valid blend mask set. | |
bool | hasEnded (void) const |
Returns true if the animation has reached the end and is not looping. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
bool | operator!= (const AnimationState &rhs) const |
Inequality operator. | |
bool | operator== (const AnimationState &rhs) const |
Equality operator. | |
void | setBlendMaskEntry (size_t boneHandle, float weight) |
Set the weight for the bone identified by the given handle. | |
void | setEnabled (bool enabled) |
Sets whether this animation is enabled. | |
void | setLength (Real len) |
Sets the total length of this animation (may be shorter than whole animation) | |
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. | |
void | setTimePosition (Real timePos) |
Sets the time position for this animation. | |
void | setWeight (Real weight) |
Sets the weight (influence) of this animation. | |
Protected Attributes | |
String | mAnimationName |
BoneBlendMask * | mBlendMask |
The blend mask (containing per bone weights) | |
bool | mEnabled |
Real | mLength |
bool | mLoop |
AnimationStateSet * | mParent |
Real | mTimePos |
Real | mWeight |
Represents the state of an animation and the weight of its influence.
Definition at line 54 of file OgreAnimationState.h.
typedef vector<float>::type Ogre::AnimationState::BoneBlendMask |
Typedef for an array of float values used as a bone blend mask.
Definition at line 59 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.
animName | The name of this state. |
parent | The parent AnimationStateSet that this state will belong to. |
timePos | The position, in seconds, where this state will begin. |
length | The length, in seconds, of this animation state. |
weight | Weight to apply the animation state with. |
enabled | Whether the animation state is enabled. |
Referenced by AnimationState(), copyStateFrom(), operator!=(), and operator==().
Ogre::AnimationState::AnimationState | ( | AnimationStateSet * | parent, |
const AnimationState & | rhs ) |
Constructor to copy from an existing state with new parent.
References AnimationState().
|
virtual |
void Ogre::AnimationState::_setBlendMask | ( | const BoneBlendMask * | blendMask | ) |
Set the blend mask.
void Ogre::AnimationState::_setBlendMaskData | ( | const float * | blendMaskData | ) |
Set the blend mask data (might be dangerous)
void Ogre::AnimationState::addTime | ( | Real | offset | ) |
Modifies the time position, adjusting for animation length.
offset | The amount of time, in seconds, to extend the animation. |
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. |
References AnimationState().
void Ogre::AnimationState::createBlendMask | ( | size_t | blendMaskSizeHint, |
float | initialWeight = 1.0f ) |
Create a new blend mask with the given number of entries.
In addition to assigning a single weight value to a skeletal animation, it may be desirable to assign animation weights per bone using a 'blend mask'.
blendMaskSizeHint | The number of bones of the skeleton owning this AnimationState. |
initialWeight | The value all the blend mask entries will be initialised with (negative to skip initialisation) |
void Ogre::AnimationState::destroyBlendMask | ( | ) |
Destroy the currently set blend mask.
const String & Ogre::AnimationState::getAnimationName | ( | ) | const |
Gets the name of the animation to which this state applies.
const BoneBlendMask * Ogre::AnimationState::getBlendMask | ( | ) | const |
Get the current blend mask (const version, may be 0)
Definition at line 161 of file OgreAnimationState.h.
References mBlendMask.
float Ogre::AnimationState::getBlendMaskEntry | ( | size_t | boneHandle | ) | const |
Get the weight for the bone identified by the given handle.
Definition at line 167 of file OgreAnimationState.h.
References mBlendMask.
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)
bool Ogre::AnimationState::getLoop | ( | void | ) | const |
Gets whether or not this animation loops.
Definition at line 120 of file OgreAnimationState.h.
References mLoop.
AnimationStateSet * Ogre::AnimationState::getParent | ( | void | ) | const |
Get the parent animation state set.
Definition at line 129 of file OgreAnimationState.h.
References mParent.
Real Ogre::AnimationState::getTimePosition | ( | void | ) | const |
Gets the time position for this animation.
Real Ogre::AnimationState::getWeight | ( | void | ) | const |
Gets the weight (influence) of this animation.
bool Ogre::AnimationState::hasBlendMask | ( | ) | const |
Return whether there is currently a valid blend mask set.
Definition at line 163 of file OgreAnimationState.h.
References mBlendMask.
bool Ogre::AnimationState::hasEnded | ( | void | ) | const |
Returns true if the animation has reached the end and is not looping.
|
inherited |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
|
inherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
|
inherited |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
|
inherited |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
|
inherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
|
inherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
bool Ogre::AnimationState::operator!= | ( | const AnimationState & | rhs | ) | const |
Inequality operator.
References AnimationState().
bool Ogre::AnimationState::operator== | ( | const AnimationState & | rhs | ) | const |
Equality operator.
References AnimationState().
void Ogre::AnimationState::setBlendMaskEntry | ( | size_t | boneHandle, |
float | weight ) |
Set the weight for the bone identified by the given handle.
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::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 118 of file OgreAnimationState.h.
References mLoop.
void Ogre::AnimationState::setTimePosition | ( | Real | timePos | ) |
Sets the time position for this animation.
void Ogre::AnimationState::setWeight | ( | Real | weight | ) |
Sets the weight (influence) of this animation.
|
protected |
Definition at line 176 of file OgreAnimationState.h.
|
protected |
The blend mask (containing per bone weights)
Definition at line 174 of file OgreAnimationState.h.
Referenced by getBlendMask(), getBlendMaskEntry(), and hasBlendMask().
|
protected |
Definition at line 181 of file OgreAnimationState.h.
|
protected |
Definition at line 179 of file OgreAnimationState.h.
|
protected |
Definition at line 182 of file OgreAnimationState.h.
|
protected |
Definition at line 177 of file OgreAnimationState.h.
Referenced by getParent().
|
protected |
Definition at line 178 of file OgreAnimationState.h.
|
protected |
Definition at line 180 of file OgreAnimationState.h.