29 #ifndef __AnimationSet_H__
30 #define __AnimationSet_H__
61 Real timePos,
Real length,
Real weight = 1.0,
bool enabled =
false);
70 const String& getAnimationName()
const;
72 Real getTimePosition(
void)
const;
74 void setTimePosition(
Real timePos);
76 Real getLength()
const;
78 void setLength(
Real len);
80 Real getWeight(
void)
const;
82 void setWeight(
Real weight);
87 void addTime(
Real offset);
90 bool hasEnded(
void)
const;
93 bool getEnabled(
void)
const;
95 void setEnabled(
bool enabled);
128 void createBlendMask(
size_t blendMaskSizeHint,
float initialWeight = 1.0f);
130 void destroyBlendMask();
138 void _setBlendMaskData(
const float* blendMaskData);
146 void _setBlendMask(
const BoneBlendMask* blendMask);
152 void setBlendMaskEntry(
size_t boneHandle,
float weight);
156 assert(mBlendMask && mBlendMask->size() > boneHandle);
157 return (*mBlendMask)[boneHandle];
191 AnimationStateSet(
const AnimationStateSet& rhs);
193 ~AnimationStateSet();
203 Real timePos,
Real length,
Real weight = 1.0,
bool enabled =
false);
207 bool hasAnimationState(
const String& name)
const;
209 void removeAnimationState(
const String& name);
211 void removeAllAnimationStates(
void);
228 void copyMatchingState(AnimationStateSet* target)
const;
230 void _notifyDirty(
void);
235 void _notifyAnimationStateEnabled(
AnimationState* target,
bool enabled);
268 : mTargetAnimationState(targetAnimationState) {}
272 Real getValue(
void)
const;
275 void setValue(
Real value);
Class encapsulating a set of AnimationState objects.
float Real
Software floating point type.
MapIterator< AnimationStateMap > AnimationStateIterator
float getBlendMaskEntry(size_t boneHandle) const
get the weight for the bone identified by the given handle
list< AnimationState * >::type EnabledAnimationStateList
void setLoop(bool loop)
Sets whether or not an animation loops at the start and end of the animation if the time continues to...
EnabledAnimationStateList mEnabledAnimationStates
bool hasBlendMask() const
return whether there is currently a valid blend mask set
map< String, AnimationState * >::type AnimationStateMap
Represents the state of an animation and the weight of it's influence.
AnimationState * mTargetAnimationState
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
BoneBlendMask * mBlendMask
the blend mask (containing per bone weights)
const BoneBlendMask * getBlendMask() const
get the current blend mask (const version, may be 0)
AnimationStateSet * mParent
Can either be used as an input or output value.
AnimationStateControllerValue(AnimationState *targetAnimationState)
Constructor, pass in the target animation state.
ConstVectorIterator< EnabledAnimationStateList > ConstEnabledAnimationStateIterator
~AnimationStateControllerValue()
Destructor (parent already virtual)
unsigned long mDirtyFrameNumber
Concrete IteratorWrapper for const access to the underlying container.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
ControllerValue wrapper class for AnimationState.
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.
AnimationStateMap mAnimationStates
Concrete IteratorWrapper for const access to the underlying key-value container.
ConstMapIterator< AnimationStateMap > ConstAnimationStateIterator
bool hasEnabledAnimationState(void) const
Tests if exists enabled animation state in this set.
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.
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator, (ISO C++)