Urho3D
|
Animation instance in an animated model. More...
#include <AnimationState.h>
Public Member Functions | |
AnimationState (AnimatedModel *model, Animation *animation) | |
Construct with animated model and animation pointers. | |
~AnimationState () | |
Destruct. | |
void | SetStartBone (Bone *bone) |
Set start bone. | |
void | SetLooped (bool looped) |
Set looping enabled/disabled. | |
void | SetWeight (float weight) |
Set blending weight. | |
void | SetTime (float time) |
Set time position. Does not fire animation triggers. | |
void | AddWeight (float delta) |
Modify blending weight. | |
void | AddTime (float delta) |
Modify time position. Animation triggers will be fired. | |
void | SetLayer (unsigned char layer) |
Set blending layer. | |
Animation * | GetAnimation () const |
Return animation. | |
Bone * | GetStartBone () const |
Return start bone. | |
bool | IsEnabled () const |
Return whether weight is nonzero. | |
bool | IsLooped () const |
Return whether looped. | |
float | GetWeight () const |
Return blending weight. | |
float | GetTime () const |
Return time position. | |
float | GetLength () const |
Return animation length. | |
unsigned char | GetLayer () const |
Return blending layer. | |
void | Apply () |
Apply to the animated model's skeleton. Called by AnimatedModel. | |
![]() | |
RefCounted () | |
Construct. Allocate the reference count structure and set an initial self weak reference. | |
virtual | ~RefCounted () |
Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist. | |
void | AddRef () |
Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting. | |
void | ReleaseRef () |
Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting. | |
int | Refs () const |
Return reference count. | |
int | WeakRefs () const |
Return weak reference count. | |
RefCount * | RefCountPtr () |
Return pointer to the reference count structure. |
Private Attributes | |
WeakPtr< AnimatedModel > | model_ |
Animated model. | |
SharedPtr< Animation > | animation_ |
Animation. | |
Bone * | startBone_ |
Start bone. | |
HashMap< unsigned, Bone * > | trackToBoneMap_ |
Mapping of animation track indices to bones. | |
PODVector< unsigned > | lastKeyFrame_ |
Last keyframe on each animation track for optimized keyframe search. | |
bool | looped_ |
Looped flag. | |
float | weight_ |
Blending weight. | |
float | time_ |
Time position. | |
unsigned char | layer_ |
Blending layer. |
Animation instance in an animated model.