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. More...
 
void CalculateParentJointIndices ()
 Fill in parent joint indices based on name. More...
 
bool AreJointsCorrectlyOrdered () const
 
void SaveBinaryState (StreamOut &inStream) const
 Saves the state of this object in binary form to inStream. More...
 
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. More...
 
 RefTarget (const RefTarget &)
 
 ~RefTarget ()
 assert no one is referencing us More...
 
void SetEmbedded () const
 
RefTargetoperator= (const RefTarget &)
 Assignment operator. More...
 
uint32 GetRefCount () const
 Get current refcount of this object. More...
 
void AddRef () const
 Add or release a reference to this object. More...
 
void Release () const
 

Static Public Member Functions

static SkeletonResult sRestoreFromBinaryState (StreamIn &inStream)
 Restore the state of this object from inStream. More...
 
- Static Public Member Functions inherited from RefTarget< Skeleton >
static int sInternalGetRefCountOffset ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION. More...
 

Additional Inherited Members

- Protected Attributes inherited from RefTarget< Skeleton >
atomic< uint32mRefCount
 Current reference count. More...
 
- 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. More...
 

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: