Manages a hierarchy of animated entities, handling keyframe updates and animation blending.
More...
|
|
| CSkeleton (int id) |
| void | initSkeleton (core::array< CEntity * > &entities) |
| | Initializes the skeleton hierarchy from a list of world entities.
|
|
void | releaseAllEntities () |
| | Releases all bone entities.
|
|
void | update () |
| | Updates the animation state.
|
|
void | updateActivateEntities () |
| | Filters and caches bones that are currently contributing to the animation.
|
| int | simulateTransform (float timeSecond, core::matrix4 origin, core::matrix4 *transforms, int numTransform) |
| | Simulates the skeleton at a specific time and returns world matrices.
|
| void | getBoneIdMap (std::map< std::string, int > &bones) |
| | Builds a map from bone names to bone IDs.
|
|
void | applyTransform () |
| | Applies calculated local PRS to the relative matrices of bones.
|
|
void | syncAnimationByTimeScale () |
| | Synchronizes time across multiple blended layers based on the highest weight.
|
| void | setAnimation (CAnimationClip *clip, bool loop, bool pause=false) |
| | Sets an animation clip to play on this skeleton.
|
| void | setAnimation (CAnimationClip *clip, bool loop, float from, float duration, bool pause=false) |
| | Sets an animation clip with a specific range.
|
| void | setJointWeights (float weight) |
| | Sets the blending weight for ALL joints in the skeleton.
|
| void | setJointWeights (const char *name, float weight, bool includeChild=true) |
| | Sets the blending weight for a specific joint and its children.
|
| void | getJoints (const char *name, std::vector< CAnimationTransformData * > &joints) |
| | Gets a list of joint data pointers starting from a named joint.
|
| void | setJointWeights (std::vector< CAnimationTransformData * > &joints, float weight) |
| | Sets blending weights for a provided list of joints.
|
| CAnimationTransformData * | getJoint (const char *name) |
| | Gets the joint data for a specific bone name.
|
| std::vector< CAnimationTransformData * > & | getJoints () |
| | Gets the list of all joint data in the skeleton.
|
| CAnimationClip * | getCurrentAnimation () |
| | Gets the currently assigned animation clip.
|
| int | getID () |
| | Gets the skeleton ID.
|
| bool | isEnable () |
| | Checks if the skeleton is enabled.
|
| void | setEnable (bool b) |
| | Sets whether the skeleton is enabled.
|
| CAnimationTimeline & | getTimeline () |
| | Gets the animation timeline for this skeleton.
|
| void | setAnimationType (EAnimationType type) |
| | Sets the operating mode of the skeleton.
|
| EAnimationType | getAnimationType () |
| | Gets the current operating mode.
|
| void | setLayerType (EAnimationLayerType type) |
| | Sets the blending algorithm (Replace, Addtive, etc.) for this skeleton layer.
|
| EAnimationLayerType | getLayerType () |
| | Gets the layer blending type.
|
|
void | notifyUpdateActivateEntities () |
| | Manually notifies the skeleton to refresh its active joint list.
|
| void | setTarget (CSkeleton *skeleton) |
| | Sets the target skeleton that this skeleton will blend into.
|
| CSkeleton * | getTarget () |
| | Gets the target skeleton.
|
| std::vector< CSkeleton * > & | getBlending () |
| | Gets the list of layers (sub-skeletons) blending into this skeleton.
|
| void | addBlending (CSkeleton *skeleton) |
| | Adds a layer to blend into this skeleton.
|
| void | removeBlending (CSkeleton *skeleton) |
| | Removes a blended layer.
|
| void | drawDebug (const core::matrix4 &transform, const SColor &c) |
| | Draws the skeleton hierarchy for debugging.
|
| void | drawDebugDefaultSkeleton (const core::matrix4 &transform, const SColor &c) |
| | Draws the default pose of the skeleton.
|
|
|
void | setAnimationData () |
| | Internal helper to set up keyframe data for each joint from the current clip.
|
|
void | updateTrackKeyFrame () |
| | Evaluates current keyframes and interpolates PRS data for all active joints.
|
|
void | updateBlending () |
| | Orchestrates the blending of all attached layers.
|
|
void | doBlending (CSkeleton *skeleton, bool first) |
| | Performs standard linear blending from a source layer.
|
|
void | doAddtive (CSkeleton *skeleton, bool first) |
| | Performs additive blending from a source layer.
|
|
void | doReplace (CSkeleton *skeleton, bool first) |
| | Performs override (replace) blending from a source layer.
|
|
|
CEntityPrefab | m_entities |
| | Collection of entities (bones) in this skeleton.
|
|
std::vector< CAnimationTransformData * > | m_entitiesData |
| | List of internal animation data for each bone.
|
|
core::array< CAnimationTransformData * > | m_entitiesActivated |
| | List of bones that are currently active (weight > 0).
|
|
CAnimationTransformData * | m_root |
| | Pointer to the root bone data.
|
|
int | m_id |
| | Unique ID of the skeleton.
|
|
bool | m_enable |
| | Whether this skeleton is enabled.
|
|
bool | m_needUpdateActivateEntities |
| | Flag to trigger update of activated entities.
|
|
CAnimationTimeline | m_timeline |
| | Playback state for this skeleton.
|
|
EAnimationType | m_animationType |
| | Current operating mode.
|
|
CAnimationClip * | m_clip |
| | Currently assigned animation clip.
|
|
EAnimationLayerType | m_layerType |
| | Blending type for this skeleton (when used as a layer).
|
|
CSkeleton * | m_target |
| | For blending: the skeleton that this layer blends into.
|
|
std::vector< CSkeleton * > | m_blending |
| | List of sub-skeletons (layers) that blend into this skeleton.
|
Manages a hierarchy of animated entities, handling keyframe updates and animation blending.
Example of setting up blending
CSkeleton* baseSkeleton = animController->createSkeleton();
Manages a hierarchy of animated entities, handling keyframe updates and animation blending.
Definition CSkeleton.h:50
void setTarget(CSkeleton *skeleton)
Sets the target skeleton that this skeleton will blend into.
void setAnimation(CAnimationClip *clip, bool loop, bool pause=false)
Sets an animation clip to play on this skeleton.
void initSkeleton(core::array< CEntity * > &entities)
Initializes the skeleton hierarchy from a list of world entities.
@ Blending
Standard mode: plays a single animation clip.
Definition CSkeleton.h:58
void setAnimationType(EAnimationType type)
Sets the operating mode of the skeleton.
Definition CSkeleton.h:276