They are useful to animated characters as well as other types of objects in your scenes that require deformation. The API interface below allows you to gain full control over the Bone created upon association with a Skeleton, as well the Pose and support Action re-targeting.
Name | Description |
SetSkeleton | Connect an existing Skeleton to the current SkeletalMesh. |
Declaration void SetSkeleton( Skeleton *skeleton ) Parameters
skeleton : Reference to an existing Skeleton Asset; to disconnect the reference pass nil .
|
SetMaterial | Assign an existing Material to the current SkeletalMesh. |
Declaration bool SetMaterial( unsigned short lod_index, int renderlayer_cap, unsigned short primitive_index, Material *material ) Parameters
lod_index : The level of detail index to connect the Material too.
renderlayer_cap : Specify the cap of an existing RenderLayer to draw the Material too.
primitive_index : The primitive index of the Mesh connected to the SkeletalMesh.
material : The Material asset reference to use for the active parameters; to disconnect a Material pass nil .
Return Value
true on success; false if the lod_index or the primitive_index is invalid.
|
CopyMaterials | Copy the current Material configuration from a RenderLayer to another. |
Declaration bool CopyMaterials( unsigned short lod_index, int from_renderlayer_cap, int to_renderlayer_cap ) Parameters
lod_index : The level of detail index to copy.
from_renderlayer_cap : The RenderLayer slot to copy.
to_renderlayer_cap : An existing RenderLayer cap to copy to.
Return Value
true on success; false if the lod_index is invalid or if the from_renderlayer_cap does not exist.
|
GetMaterial | Retrieve the Material reference associated with a RenderLayer configuration for a specific primitive. |
Declaration Material *GetMaterial( unsigned short lod_index, int renderlayer_cap, unsigned short primitive_index ) Parameters
lod_index : The level of detail index of the slot to retrieve.
renderlayer_cap : The RenderLayer cap assigned to the slot.
primitive_index : The primitive index used by the slot.
Return Value
A Material reference; nil if no slot match the parameters or if the slot does not have any Material connected to it.
|
GetBone | Manually set the list index of an existing RenderLayer. |
Declaration Bone *GetBone( const char *name ) Parameters
name : Name of the Bone to retrieve.
Return Value
nil if the name received in parameter does not match any Bone contained in the active SkeletalMesh; else return the Bone reference.
|
GetBoneIndex | Return the index of a specific Bone reference associated to the current SkeletalMesh. |
Declaration int GetBoneIndex( const Bone *bone ) Parameters
Return Value
-1 if the Bone reference is not part of the active SkeletalMesh; else return its active list index.
|
GetBoneAt | Helper function that returns the Bone reference using its index as key. |
Declaration Bone *GetBoneAt( unsigned short index ) Parameters
index : Index of the Bone to retrieve.
Return Value
nil if the index provided is out of scope; else return the Bone reference associated to the index received in parameter.
|
SetBindPose | Reset the SkeletalMesh bones back to the default position of its connected Skeleton. |
Declaration Return Value
true on success; false if the current SkeletalMesh does not have any Skeleton attached to it.
|
CalculatePose | Manually force to recalculate vertex data of the SkeletalMesh driven by its connected Skeleton. |
Declaration bool CalculatePose( void ) Return Value
true if the SkeletalMesh have a Skeleton connected so the vertex data update can be calculated; else return false in the event the active SkeletalMesh have no Skeleton attached to it.
|
UpdatePose | Manually force an update of all Bone pose matrix and optionally update the physic bounds connected to them. |
Declaration bool UpdatePose( bool physics ) Parameters
physics : Optionally update the physic data associated to the Bone of the SkeletalMesh.
Return Value
true if at least one Bone was update due to a change in the Skeleton joints transformation change; else return false .
|
HaveSelection | Helper to determine of the active SkeletalMesh have some Bone selected. |
Declaration bool HaveSelection( void ) Return Value
true if at least one of the current SkeletalMesh Bone is selected else return false .
|
RetargetAction | Retarget an existing Action from the active SkeletalMesh to another. |
Declaration int RetargetAction( const SkeletalMesh *source, const char *name ) Parameters
Return Value
Upon success return the amount of Channel that has been retargeted. -1 if an invalid source reference has been provided to the function or if the active SkeletalMesh is not associated with any Skeleton. -2 if no Action can be found using the name received in parameter.
|
GetPose | Helper to retrieve the active Pose of the current SkeletalMesh. |
Declaration bool GetPose( Pose *pose ) Parameters
pose : A valid Pose reference ready to receive the one of the active SkeletalMesh.
Return Value
true on success; false if an invalid Pose reference is provided or if the active SkeletalMesh does not contain any Bone.
|
SetPose | Transfer an existing Pose to the active SkeletalMesh. |
Declaration bool SetPose( const Pose *pose ) Parameters
pose : Reference to the Pose to transfer.
Return Value
false Pose reference is invalid or if active bone count of the Pose and the active SkeletalMesh does not match; else return true .
|