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