Go to the documentation of this file.
29 #ifndef __AnimationSet_H__
30 #define __AnimationSet_H__
76 Real timePos,
Real length,
Real weight = 1.0,
bool enabled =
false);
169 assert(mBlendMask && mBlendMask->size() > boneHandle);
170 return (*mBlendMask)[boneHandle];
216 Real timePos,
Real length,
Real weight = 1.0,
bool enabled =
false);
281 : mTargetAnimationState(targetAnimationState) {}
AnimationState * getAnimationState(const String &name) const
Get an animation state by the name of the animation.
Can either be used as an input or output value.
float getBlendMaskEntry(size_t boneHandle) const
Get the weight for the bone identified by the given handle.
void _setBlendMask(const BoneBlendMask *blendMask)
Set the blend mask.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Real getWeight(void) const
Gets the weight (influence) of this animation.
Real getTimePosition(void) const
Gets the time position for this animation.
void _setBlendMaskData(const float *blendMaskData)
Set the blend mask data (might be dangerous)
void createBlendMask(size_t blendMaskSizeHint, float initialWeight=1.0f)
Create a new blend mask with the given number of entries.
ConstVectorIterator< EnabledAnimationStateList > ConstEnabledAnimationStateIterator
BoneBlendMask * mBlendMask
The blend mask (containing per bone weights)
void _notifyDirty(void)
Set the dirty flag and dirty frame number on this state set.
unsigned long mDirtyFrameNumber
void setEnabled(bool enabled)
Sets whether this animation is enabled.
ControllerValue wrapper class for AnimationState.
ConstAnimationStateIterator getAnimationStateIterator(void) const
Get an iterator over all the animation states in this set.
void setTimePosition(Real timePos)
Sets the time position for this animation.
void removeAllAnimationStates(void)
Remove all animation states.
void addTime(Real offset)
Modifies the time position, adjusting for animation length.
bool operator!=(const AnimationState &rhs) const
Inequality operator.
map< String, AnimationState * >::type AnimationStateMap
AnimationStateControllerValue(AnimationState *targetAnimationState)
Constructor, pass in the target animation state.
EnabledAnimationStateList mEnabledAnimationStates
Represents the state of an animation and the weight of its influence.
AnimationStateSet * getParent(void) const
Get the parent animation state set.
void setValue(Real value)
ControllerValue implementation.
void setWeight(Real weight)
Sets the weight (influence) of this animation.
bool hasBlendMask() const
Return whether there is currently a valid blend mask set.
void setLoop(bool loop)
Sets whether or not an animation loops at the start and end of the animation if the time continues to...
AnimationStateSet(const AnimationStateSet &rhs)
Create an animation set by copying the contents of another.
unsigned long getDirtyFrameNumber(void) const
Get the latest animation state been altered frame number.
bool getLoop(void) const
Gets whether or not this animation loops
void setLength(Real len)
Sets the total length of this animation (may be shorter than whole animation)
OGRE_AUTO_MUTEX
Mutex, public for external locking if needed.
vector< float >::type BoneBlendMask
Typedef for an array of float values used as a bone blend mask.
bool hasEnabledAnimationState(void) const
Tests if exists enabled animation state in this set.
void copyStateFrom(const AnimationState &animState)
Copies the states from another animation state, preserving the animation name (unlike operator=) but ...
AnimationStateMap mAnimationStates
const BoneBlendMask * getBlendMask() const
Get the current blend mask (const version, may be 0)
Real getValue(void) const
ControllerValue implementation.
bool getEnabled(void) const
Returns true if this animation is currently enabled.
MapIterator< AnimationStateMap > AnimationStateIterator
AnimationState * createAnimationState(const String &animName, Real timePos, Real length, Real weight=1.0, bool enabled=false)
Create a new AnimationState instance.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
const String & getAnimationName() const
Gets the name of the animation to which this state applies.
Class encapsulating a set of AnimationState objects.
AnimationState(const String &animName, AnimationStateSet *parent, Real timePos, Real length, Real weight=1.0, bool enabled=false)
Normal constructor with all params supplied.
void removeAnimationState(const String &name)
Remove animation state with the given name.
AnimationStateSet * mParent
~AnimationStateControllerValue()
Destructor (parent already virtual)
ConstEnabledAnimationStateIterator getEnabledAnimationStateIterator(void) const
Get an iterator over all the enabled animation states in this set.
bool hasEnded(void) const
Returns true if the animation has reached the end and is not looping.
Real getLength() const
Gets the total length of this animation (may be shorter than whole animation)
bool hasAnimationState(const String &name) const
Tests if state for the named animation is present.
virtual ~AnimationState()
void destroyBlendMask()
Destroy the currently set blend mask.
AnimationStateSet()
Create a blank animation state set.
list< AnimationState * >::type EnabledAnimationStateList
float Real
Software floating point type.
Concrete IteratorWrapper for const access to the underlying key-value container.
AnimationState(AnimationStateSet *parent, const AnimationState &rhs)
Constructor to copy from an existing state with new parent.
void _notifyAnimationStateEnabled(AnimationState *target, bool enabled)
Internal method respond to enable/disable an animation state.
AnimationState * mTargetAnimationState
void copyMatchingState(AnimationStateSet *target) const
Copy the state of any matching animation states from this to another.
bool operator==(const AnimationState &rhs) const
Equality operator.
AnimationStateIterator getAnimationStateIterator(void)
Get an iterator over all the animation states in this set.
void setBlendMaskEntry(size_t boneHandle, float weight)
Set the weight for the bone identified by the given handle.
ConstMapIterator< AnimationStateMap > ConstAnimationStateIterator
Concrete IteratorWrapper for const access to the underlying container.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.