Urho3D
Public Member Functions | Private Attributes
Urho3D::AnimationState Class Reference

Animation instance in an animated model. More...

#include <AnimationState.h>

Inheritance diagram for Urho3D::AnimationState:
Urho3D::RefCounted

List of all members.

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.
AnimationGetAnimation () const
 Return animation.
BoneGetStartBone () 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.
- 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.
RefCountRefCountPtr ()
 Return pointer to the reference count structure.

Private Attributes

WeakPtr< AnimatedModelmodel_
 Animated model.
SharedPtr< Animationanimation_
 Animation.
BonestartBone_
 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.

Detailed Description

Animation instance in an animated model.


The documentation for this class was generated from the following files: