IDefaultSkeleton

IDefaultSkeletonabstract

Represents the skeleton tied to a character, and all the default properties it contains. More...

#include

Public Member Functions

virtual uint32 GetJointCount () const =0
virtual int32 GetJointParentIDByID (int32 id) const =0
virtual int32 GetControllerIDByID (int32 id) const =0
virtual int32 GetJointChildrenCountByID (int32 id) const =0
virtual int32 GetJointChildIDAtIndexByID (int32 id, uint32 childIndex) const =0
virtual int32 GetJointIDByCRC32 (uint32 crc32) const =0
virtual uint32 GetJointCRC32ByID (int32 id) const =0
virtual const char * GetJointNameByID (int32 id) const =0
virtual int32 GetJointIDByName (const char *name) const =0
virtual const QuatT & GetDefaultAbsJointByID (uint32 nJointIdx) const =0
virtual const QuatT & GetDefaultRelJointByID (uint32 nJointIdx) const =0
virtual const char * GetModelFilePath () const =0
virtual const phys_geometry * GetJointPhysGeom (uint32 jointIndex) const =0
just for statistics of physics proxies.
virtual CryBonePhysics * GetJointPhysInfo (uint32 jointIndex)=0
virtual int32 GetLimbDefinitionIdx (LimbIKDefinitionHandle handle) const =0
virtual void PrecacheMesh (bool bFullUpdate, int nRoundId, int nLod)=0
virtual IRenderMesh * GetIRenderMesh () const =0
virtual Vec3 GetRenderMeshOffset () const =0
virtual uint32 GetTextureMemoryUsage2 (ICrySizer *pSizer=0) const =0
virtual uint32 GetMeshMemoryUsage (ICrySizer *pSizer=0) const =0
virtual const DynArray< SBoneShadowCapsule > & GetShadowCapsules () const =0
Retrieves list of shadow capsules for soft indirect shadows.

Detailed Description

Represents the skeleton tied to a character, and all the default properties it contains.

Member Function Documentation

◆ GetJointChildIDAtIndexByID()

virtual int32 IDefaultSkeleton::GetJointChildIDAtIndexByID ( int32 id,
uint32 childIndex
) const
pure virtual

Retrieves the ID of the Child Joint at index childIndex for parent joint id. If parent joint had less children than childIndex, or if the id is invalid in any way then it will return -1 to indicate child is not-found.

◆ GetJointIDByName()

virtual int32 IDefaultSkeleton::GetJointIDByName ( const char * name) const
pure virtual

Gets the identifier of a joint from the name specified in DCC

Returns
A non-positive number on failure.
#include 

// Basic example of how the absolute joint orientation can be retrieved from a character's current pose
void GetJointOrientation(ICharacterInstance& character)
{
    // Get the default skeleton, a read-only construct in which we can get joint identifiers from names
    const IDefaultSkeleton& defaultSkeleton = character.GetIDefaultSkeleton();
    // Get the internal identifier of our joint, labeled in the DCC (Max / Maya for example)
    const int32 jointId = defaultSkeleton.GetJointIDByName("Bip 01 Head");

    // Get the orientation of the joint in world coordinates
    const QuatT& jointOrientation = character.GetISkeletonPose()->GetAbsJointByID(jointId);
    // jointOrientation.q contains a quaternion with the world-space rotation of the joint
    const Quat& jointRotation = jointOrientation.q;
    // jointOrientation.t contains a vector with the world-space position of the joint
    const Vec3& jointPosition = jointOrientation.t;
}

◆ GetModelFilePath()

virtual const char* IDefaultSkeleton::GetModelFilePath ( ) const
pure virtual
Returns
File-path for this model.