29 #ifndef __AnimationSet_H__
30 #define __AnimationSet_H__
75 Real timePos,
Real length,
Real weight = 1.0,
bool enabled =
false);
81 const String& getAnimationName()
const;
83 Real getTimePosition(
void)
const;
85 void setTimePosition(
Real timePos);
87 Real getLength()
const;
89 void setLength(
Real len);
91 Real getWeight(
void)
const;
93 void setWeight(
Real weight);
99 void addTime(
Real offset);
102 bool hasEnded(
void)
const;
105 bool getEnabled(
void)
const;
107 void setEnabled(
bool enabled);
140 void createBlendMask(
size_t blendMaskSizeHint,
float initialWeight = 1.0f);
142 void destroyBlendMask();
150 void _setBlendMaskData(
const float* blendMaskData);
158 void _setBlendMask(
const BoneBlendMask* blendMask);
164 void setBlendMaskEntry(
size_t boneHandle,
float weight);
168 assert(mBlendMask && mBlendMask->size() > boneHandle);
169 return (*mBlendMask)[boneHandle];
203 AnimationStateSet(
const AnimationStateSet& rhs);
205 ~AnimationStateSet();
215 Real timePos,
Real length,
Real weight = 1.0,
bool enabled =
false);
219 bool hasAnimationState(
const String& name)
const;
221 void removeAnimationState(
const String& name);
223 void removeAllAnimationStates(
void);
240 void copyMatchingState(AnimationStateSet* target)
const;
242 void _notifyDirty(
void);
247 void _notifyAnimationStateEnabled(
AnimationState* target,
bool enabled);
280 : mTargetAnimationState(targetAnimationState) {}
284 Real getValue(
void)
const;
287 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 its 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++)