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

Resource that contains the joint hierarchy for a skeleton. More...

#include <Skeleton.h>

Inheritance diagram for Skeleton:
RefTarget< Skeleton >

Classes

class  Joint
 Declare internal structure for a joint. More...
 

Public Types

using SkeletonResult = Result< Ref< Skeleton > >
 
using JointVector = Array< Joint >
 

Public Member Functions

int GetJointIndex (const string_view &inName) const
 Find joint by name.
 
void CalculateParentJointIndices ()
 Fill in parent joint indices based on name.
 
bool AreJointsCorrectlyOrdered () const
 
void SaveBinaryState (StreamOut &inStream) const
 Saves the state of this object in binary form to inStream.
 
Access to the joints
const JointVectorGetJoints () const
 
JointVectorGetJoints ()
 
int GetJointCount () const
 
const JointGetJoint (int inJoint) const
 
JointGetJoint (int inJoint)
 
uint AddJoint (const string_view &inName, const string_view &inParentName=string_view())
 
uint AddJoint (const string_view &inName, int inParentIndex)
 
- Public Member Functions inherited from RefTarget< Skeleton >
 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 SkeletonResult sRestoreFromBinaryState (StreamIn &inStream)
 Restore the state of this object from inStream.
 
- Static Public Member Functions inherited from RefTarget< Skeleton >
static int sInternalGetRefCountOffset ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION.
 

Additional Inherited Members

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

Detailed Description

Resource that contains the joint hierarchy for a skeleton.

Member Typedef Documentation

◆ JointVector

◆ SkeletonResult

Member Function Documentation

◆ AddJoint() [1/2]

uint Skeleton::AddJoint ( const string_view &  inName,
const string_view &  inParentName = string_view() 
)
inline

◆ AddJoint() [2/2]

uint Skeleton::AddJoint ( const string_view &  inName,
int  inParentIndex 
)
inline

◆ AreJointsCorrectlyOrdered()

bool Skeleton::AreJointsCorrectlyOrdered ( ) const

Many of the algorithms that use the Skeleton class require that parent joints are in the mJoints array before their children. This function returns true if this is the case, false if not.

◆ CalculateParentJointIndices()

void Skeleton::CalculateParentJointIndices ( )

Fill in parent joint indices based on name.

◆ GetJoint() [1/2]

Joint & Skeleton::GetJoint ( int  inJoint)
inline

◆ GetJoint() [2/2]

const Joint & Skeleton::GetJoint ( int  inJoint) const
inline

◆ GetJointCount()

int Skeleton::GetJointCount ( ) const
inline

◆ GetJointIndex()

int Skeleton::GetJointIndex ( const string_view &  inName) const

Find joint by name.

◆ GetJoints() [1/2]

JointVector & Skeleton::GetJoints ( )
inline

◆ GetJoints() [2/2]

const JointVector & Skeleton::GetJoints ( ) const
inline

◆ SaveBinaryState()

void Skeleton::SaveBinaryState ( StreamOut inStream) const

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

◆ sRestoreFromBinaryState()

Skeleton::SkeletonResult Skeleton::sRestoreFromBinaryState ( StreamIn inStream)
static

Restore the state of this object from inStream.


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