Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
SkeletalAnimation Class Reference

Resource for a skinned animation. More...

#include <SkeletalAnimation.h>

Inheritance diagram for SkeletalAnimation:
RefTarget< SkeletalAnimation >

Classes

class  AnimatedJoint
 Contains the animation for a single joint. More...
 
class  JointState
 Contains the current state of a joint, a local space transformation relative to its parent joint. More...
 
class  Keyframe
 Contains the state of a single joint at a particular time. More...
 

Public Types

using KeyframeVector = Array< Keyframe >
 
using AnimatedJointVector = Array< AnimatedJoint >
 
using AnimationResult = Result< Ref< SkeletalAnimation > >
 

Public Member Functions

float GetDuration () const
 Get the length (in seconds) of this animation.
 
void ScaleJoints (float inScale)
 Scale the size of all joints by inScale.
 
void SetIsLooping (bool inIsLooping)
 If the animation is looping or not. If an animation is looping, the animation will continue playing after completion.
 
bool IsLooping () const
 
void Sample (float inTime, SkeletonPose &ioPose) const
 Get the (interpolated) joint transforms at time inTime.
 
const AnimatedJointVectorGetAnimatedJoints () const
 Get joint samples.
 
AnimatedJointVectorGetAnimatedJoints ()
 
void SaveBinaryState (StreamOut &inStream) const
 Saves the state of this animation in binary form to inStream.
 
- Public Member Functions inherited from RefTarget< SkeletalAnimation >
 RefTarget ()=default
 Constructor.
 
 RefTarget (const RefTarget &)
 
 ~RefTarget ()
 assert no one is referencing us
 
void SetEmbedded () const
 
RefTargetoperator= (const RefTarget &)
 Assignment operator.
 
uint32 GetRefCount () const
 Get current refcount of this object.
 
void AddRef () const
 Add or release a reference to this object.
 
void Release () const
 

Static Public Member Functions

static AnimationResult sRestoreFromBinaryState (StreamIn &inStream)
 Restore a saved ragdoll from inStream.
 
- Static Public Member Functions inherited from RefTarget< SkeletalAnimation >
static int sInternalGetRefCountOffset ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION.
 

Additional Inherited Members

- Protected Attributes inherited from RefTarget< SkeletalAnimation >
atomic< uint32mRefCount
 Current reference count.
 
- Static Protected Attributes inherited from RefTarget< SkeletalAnimation >
static constexpr uint32 cEmbedded
 A large value that gets added to the refcount to mark the object as embedded.
 

Detailed Description

Resource for a skinned animation.

Member Typedef Documentation

◆ AnimatedJointVector

◆ AnimationResult

◆ KeyframeVector

Member Function Documentation

◆ GetAnimatedJoints() [1/2]

AnimatedJointVector & SkeletalAnimation::GetAnimatedJoints ( )
inline

◆ GetAnimatedJoints() [2/2]

const AnimatedJointVector & SkeletalAnimation::GetAnimatedJoints ( ) const
inline

Get joint samples.

◆ GetDuration()

float SkeletalAnimation::GetDuration ( ) const

Get the length (in seconds) of this animation.

◆ IsLooping()

bool SkeletalAnimation::IsLooping ( ) const
inline

◆ Sample()

void SkeletalAnimation::Sample ( float  inTime,
SkeletonPose ioPose 
) const

Get the (interpolated) joint transforms at time inTime.

◆ SaveBinaryState()

void SkeletalAnimation::SaveBinaryState ( StreamOut inStream) const

Saves the state of this animation in binary form to inStream.

◆ ScaleJoints()

void SkeletalAnimation::ScaleJoints ( float  inScale)

Scale the size of all joints by inScale.

◆ SetIsLooping()

void SkeletalAnimation::SetIsLooping ( bool  inIsLooping)
inline

If the animation is looping or not. If an animation is looping, the animation will continue playing after completion.

◆ sRestoreFromBinaryState()

SkeletalAnimation::AnimationResult SkeletalAnimation::sRestoreFromBinaryState ( StreamIn inStream)
static

Restore a saved ragdoll from inStream.


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