Rebel Fork Framework
Urho3D::AnimationParameters Class Reference

State and parameters of playing Animation. More...

#include <Urho3D/Graphics/AnimationController.h>

Public Member Functions

 AnimationParameters (Animation *animation)
 
 AnimationParameters (Animation *animation, float minTime, float maxTime)
 
 AnimationParameters (Context *context, const ea::string &animationName)
 
 AnimationParameters (Context *context, const ea::string &animationName, float minTime, float maxTime)
 
bool RemoveDelayed (float fadeTime)
 Helper utility to fade animation out and remove it later.
 
AnimationParametersLooped (bool value=true)
 
AnimationParametersStartBone (ea::string_view startBone)
 
AnimationParametersLayer (unsigned layer)
 
AnimationParametersTime (float time)
 
AnimationParametersTimeRange (float minTime, float maxTime)
 
AnimationParametersAdditive (bool value=true)
 
AnimationParametersWeight (float weight)
 
AnimationParametersSpeed (float speed)
 
AnimationParametersAutoFadeOut (float fadeOut)
 
AnimationParametersKeepOnCompletion (bool value=true)
 
AnimationParametersKeepOnZeroWeight (bool value=true)
 
AnimationGetAnimation () const
 
StringHash GetAnimationName () const
 
const WrappedScalar< float > & GetAnimationTime () const
 
float GetTime () const
 
void SetTime (float time)
 
void SetTimeRange (float minTime, float maxTime)
 
void SetDefaultTimeRange ()
 
WrappedScalarRange< float > Update (float scaledTimeStep)
 

Public Attributes

unsigned instanceIndex_ {}
 
bool removed_ {}
 Internal flags for easier algorithms. Never stored between API calls.
 
bool merged_ {}
 
bool looped_ {}
 
bool removeOnCompletion_ {true}
 
unsigned layer_ {}
 
AnimationBlendMode blendMode_ {}
 
ea::string startBone_
 
float autoFadeOutTime_ {}
 
float speed_ {1.0f}
 
bool removeOnZeroWeight_ {}
 
float weight_ {1.0f}
 
float targetWeight_ {1.0f}
 
float targetWeightDelay_ {}
 

Static Public Attributes

static const AnimationParameters EMPTY {}
 Empty AnimationParameters.
 

Private Attributes

Animationanimation_ {}
 
StringHash animationName_
 
WrappedScalar< float > time_ {0.0f, 0.0f, M_LARGE_VALUE}
 
static constexpr unsigned NumVariants = 15
 
void ToVariantSpan (ea::span< Variant > variants) const
 
void Serialize (Serializer &dest) const
 
bool IsMergeableWith (const AnimationParameters &rhs) const
 
bool operator== (const AnimationParameters &rhs) const
 
bool operator!= (const AnimationParameters &rhs) const
 
static AnimationParameters FromVariantSpan (Context *context, ea::span< const Variant > variants)
 
static AnimationParameters Deserialize (Animation *animation, Deserializer &src)
 

Detailed Description

State and parameters of playing Animation.

Member Function Documentation

◆ GetAnimation()

Animation * Urho3D::AnimationParameters::GetAnimation ( ) const
inline

Getters for read-only properties. Use constructor to set Animation to the parameters.

◆ GetTime()

float Urho3D::AnimationParameters::GetTime ( ) const
inline

Time operations.

◆ Looped()

AnimationParameters & Urho3D::AnimationParameters::Looped ( bool  value = true)

Factory helpers.

Member Data Documentation

◆ animation_

Animation* Urho3D::AnimationParameters::animation_ {}
private

Animation to be played. Animation can be replicated over network only if is exists as named Resource on all machines.

◆ looped_

bool Urho3D::AnimationParameters::looped_ {}

Static animation parameters that change rarely.

◆ NumVariants

constexpr unsigned Urho3D::AnimationParameters::NumVariants = 15
staticconstexpr

Serialization, test and misc utilities.

◆ speed_

float Urho3D::AnimationParameters::speed_ {1.0f}

Dynamic animation parameters that change often.


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