Documentation
Urho3D::AnimationState Class Reference
Animation instance. More...
#include <AnimationState.h>
Inheritance diagram for Urho3D::AnimationState:
Collaboration diagram for Urho3D::AnimationState:
Public Member Functions | |
| AnimationState (AnimatedModel *model, Animation *animation) | |
| Construct with animated model and animation pointers. | |
| AnimationState (Node *node, Animation *animation) | |
| Construct with root scene node and animation pointers. | |
| ~AnimationState () | |
| Destruct. | |
| void | SetStartBone (Bone *bone) |
| Set start bone. Not supported in node animation mode. Resets any assigned per-bone weights. | |
| 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 | SetBoneWeight (unsigned index, float weight, bool recursive=false) |
| Set per-bone blending weight by track index. Default is 1.0 (full), is multiplied with the state's blending weight when applying the animation. Optionally recurses to child bones. | |
| void | SetBoneWeight (const String &name, float weight, bool recursive=false) |
| Set per-bone blending weight by name. | |
| void | SetBoneWeight (StringHash nameHash, float weight, bool recursive=false) |
| Set per-bone blending weight by name hash. | |
| 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. | |
| AnimatedModel * | GetModel () const |
| Return animated model this state belongs to (model mode.) | |
| Node * | GetNode () const |
| Return root scene node this state controls (node hierarchy mode.) | |
| Bone * | GetStartBone () const |
| Return start bone. | |
| float | GetBoneWeight (unsigned index) const |
| Return per-bone blending weight by track index. | |
| float | GetBoneWeight (const String &name) const |
| Return per-bone blending weight by name. | |
| float | GetBoneWeight (StringHash nameHash) const |
| Return per-bone blending weight by name. | |
| unsigned | GetTrackIndex (Node *node) const |
| Return track index with matching bone node, or M_MAX_UNSIGNED if not found. | |
| unsigned | GetTrackIndex (const String &name) const |
| Return track index by bone name, or M_MAX_UNSIGNED if not found. | |
| unsigned | GetTrackIndex (StringHash nameHash) const |
| Return track index by bone name hash, or M_MAX_UNSIGNED if not found. | |
| 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 the animation at the current time position. | |
Public Member Functions inherited from Urho3D::RefCounted | |
| 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 Member Functions | |
| void | ApplyToModel () |
| Apply animation to a skeleton. Transform changes are applied silently, so the model needs to dirty its root model afterward. | |
| void | ApplyToNodes () |
| Apply animation to a scene node hierarchy. | |
| void | ApplyTrackFullWeight (AnimationStateTrack &stateTrack) |
| Apply animation track to a scene node, full weight. | |
| void | ApplyTrackFullWeightSilent (AnimationStateTrack &stateTrack) |
| Apply animation track to a scene node, full weight. Apply transform changes silently without marking the node dirty. | |
| void | ApplyTrackBlendedSilent (AnimationStateTrack &stateTrack, float weight) |
| Apply animation track to a scene node, blended with current node transform. Apply transform changes silently without marking the node dirty. | |
Private Attributes | |
| WeakPtr< AnimatedModel > | model_ |
| Animated model (model mode.) | |
| WeakPtr< Node > | node_ |
| Root scene node (node hierarchy mode.) | |
| SharedPtr< Animation > | animation_ |
| Animation. | |
| Bone * | startBone_ |
| Start bone. | |
| Vector< AnimationStateTrack > | stateTracks_ |
| Per-track data. | |
| bool | looped_ |
| Looped flag. | |
| float | weight_ |
| Blending weight. | |
| float | time_ |
| Time position. | |
| unsigned char | layer_ |
| Blending layer. | |
Detailed Description
Animation instance.
The documentation for this class was generated from the following files:
- /home/travis/build/urho3d/Urho3D/Source/Urho3D/Graphics/AnimationState.h
- /home/travis/build/urho3d/Urho3D/Source/Urho3D/Graphics/AnimationState.cpp

Public Member Functions inherited from