Jolt Physics
A multi core friendly Game Physics Engine
|
Resource that contains the joint hierarchy for a skeleton. More...
#include <Skeleton.h>
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 JointVector & | GetJoints () const |
JointVector & | GetJoints () |
int | GetJointCount () const |
const Joint & | GetJoint (int inJoint) const |
Joint & | GetJoint (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 |
RefTarget & | operator= (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< uint32 > | mRefCount |
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. | |
Resource that contains the joint hierarchy for a skeleton.
using Skeleton::JointVector = Array<Joint> |
using Skeleton::SkeletonResult = Result<Ref<Skeleton> > |
|
inline |
|
inline |
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.
void Skeleton::CalculateParentJointIndices | ( | ) |
Fill in parent joint indices based on name.
|
inline |
|
inline |
|
inline |
int Skeleton::GetJointIndex | ( | const string_view & | inName | ) | const |
Find joint by name.
|
inline |
|
inline |
void Skeleton::SaveBinaryState | ( | StreamOut & | inStream | ) | const |
Saves the state of this object in binary form to inStream.
|
static |
Restore the state of this object from inStream.