RigsofRods
Soft-body Physics Simulation
Public Member Functions
AngelOgre::AnimationState Class Reference

Represents a single named skeletal animation track present in the mesh. More...

#include <AngelOgre_AnimationState.h>

Public Member Functions

const string & getAnimationName () const
 Gets the name of the animation to which this state applies. More...
 
float getTimePosition (void) const
 Gets the time position for this animation. More...
 
void setTimePosition (float timePos)
 Sets the time position for this animation. More...
 
float getLength () const
 Gets the total length of this animation (may be shorter than whole animation) More...
 
void setLength (float len)
 Sets the total length of this animation (may be shorter than whole animation) More...
 
float getWeight (void) const
 Gets the weight (influence) of this animation. More...
 
void setWeight (float weight)
 Sets the weight (influence) of this animation. More...
 
void addTime (float offset)
 Modifies the time position, adjusting for animation length. More...
 
bool hasEnded (void) const
 Returns true if the animation has reached the end and is not looping. More...
 
bool getEnabled (void) const
 Returns true if this animation is currently enabled. More...
 
void setEnabled (bool enabled)
 Sets whether this animation is enabled. More...
 
void setLoop (bool loop)
 Sets whether or not an animation loops at the start and end of the animation if the time continues to be altered. More...
 
bool getLoop (void) const
 Gets whether or not this animation loops
More...
 
AnimationStateSetgetParent (void) const
 Get the parent animation state set. More...
 
void createBlendMask (uint64 blendMaskSizeHint, float initialWeight=1.0f)
 Create a new blend mask with the given number of entries. More...
 
void destroyBlendMask ()
 Destroy the currently set blend mask. More...
 
bool hasBlendMask () const
 Return whether there is currently a valid blend mask set. More...
 
void setBlendMaskEntry (uint64 boneHandle, float weight)
 Set the weight for the bone identified by the given handle. More...
 
float getBlendMaskEntry (uint64 boneHandle) const
 Get the weight for the bone identified by the given handle. More...
 

Detailed Description

Represents a single named skeletal animation track present in the mesh.

Definition at line 15 of file AngelOgre_AnimationState.h.

Member Function Documentation

◆ addTime()

void AngelOgre::AnimationState::addTime ( float  offset)

Modifies the time position, adjusting for animation length.

Parameters
offsetThe amount of time, in seconds, to extend the animation.
Remarks
This method loops at the edges if animation looping is enabled.

◆ createBlendMask()

void AngelOgre::AnimationState::createBlendMask ( uint64  blendMaskSizeHint,
float  initialWeight = 1.0f 
)

Create a new blend mask with the given number of entries.

In addition to assigning a single weight value to a skeletal animation, it may be desirable to assign animation weights per bone using a 'blend mask'.

Parameters
blendMaskSizeHintThe number of bones of the skeleton owning this AnimationState.
initialWeightThe value all the blend mask entries will be initialised with (negative to skip initialisation)

◆ destroyBlendMask()

void AngelOgre::AnimationState::destroyBlendMask ( )

Destroy the currently set blend mask.

◆ getAnimationName()

const string& AngelOgre::AnimationState::getAnimationName ( ) const

Gets the name of the animation to which this state applies.

◆ getBlendMaskEntry()

float AngelOgre::AnimationState::getBlendMaskEntry ( uint64  boneHandle) const

Get the weight for the bone identified by the given handle.

◆ getEnabled()

bool AngelOgre::AnimationState::getEnabled ( void  ) const

Returns true if this animation is currently enabled.

◆ getLength()

float AngelOgre::AnimationState::getLength ( ) const

Gets the total length of this animation (may be shorter than whole animation)

◆ getLoop()

bool AngelOgre::AnimationState::getLoop ( void  ) const

Gets whether or not this animation loops

◆ getParent()

AnimationStateSet* AngelOgre::AnimationState::getParent ( void  ) const

Get the parent animation state set.

◆ getTimePosition()

float AngelOgre::AnimationState::getTimePosition ( void  ) const

Gets the time position for this animation.

◆ getWeight()

float AngelOgre::AnimationState::getWeight ( void  ) const

Gets the weight (influence) of this animation.

◆ hasBlendMask()

bool AngelOgre::AnimationState::hasBlendMask ( ) const

Return whether there is currently a valid blend mask set.

◆ hasEnded()

bool AngelOgre::AnimationState::hasEnded ( void  ) const

Returns true if the animation has reached the end and is not looping.

◆ setBlendMaskEntry()

void AngelOgre::AnimationState::setBlendMaskEntry ( uint64  boneHandle,
float  weight 
)

Set the weight for the bone identified by the given handle.

◆ setEnabled()

void AngelOgre::AnimationState::setEnabled ( bool  enabled)

Sets whether this animation is enabled.

◆ setLength()

void AngelOgre::AnimationState::setLength ( float  len)

Sets the total length of this animation (may be shorter than whole animation)

◆ setLoop()

void AngelOgre::AnimationState::setLoop ( bool  loop)

Sets whether or not an animation loops at the start and end of the animation if the time continues to be altered.

◆ setTimePosition()

void AngelOgre::AnimationState::setTimePosition ( float  timePos)

Sets the time position for this animation.

◆ setWeight()

void AngelOgre::AnimationState::setWeight ( float  weight)

Sets the weight (influence) of this animation.


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