|
Kemena3D
|
A single skeletal animation clip (bone channels + node hierarchy). More...
#include <kskelanimation.h>
Public Member Functions | |
| kSkeletalAnimation (const kString &animationPath, kMesh *setMesh) | |
| Loads an animation clip from an asset file (Assimp) and binds it to a mesh. | |
| kSkeletalAnimation () | |
| Default constructor — leaves the clip empty until populated. | |
| kBone * | findBone (const kString &name) |
| Finds the kBone with the given name in this clip. | |
| float | getTicksPerSecond () const |
| Tick rate of this animation (as specified in the asset). | |
| float | getDuration () const |
| Total duration of this animation in ticks. | |
| const kNodeData & | getRootNode () const |
| Root of the bone hierarchy. | |
| std::vector< kMesh * > | getMeshes () |
| All meshes this animation has been bound to. | |
| void | setSpeed (float newSpeed) |
| Set the playback speed multiplier (1.0 = normal). | |
| float | getSpeed () const |
| Current playback speed multiplier. | |
A single skeletal animation clip (bone channels + node hierarchy).
Loaded via kAssetManager::loadAnimation(). The clip stores a list of kBone objects (one per animated joint) and the root of the bone hierarchy (kNodeData) used by kAnimator to propagate transforms.
Playback speed can be scaled with setSpeed(); the kAnimator queries getDuration() and getTicksPerSecond() to advance time correctly.
Loads an animation clip from an asset file (Assimp) and binds it to a mesh.
| animationPath | Path to the animation asset. |
| setMesh | Mesh whose bone map resolves bone indices. |
Available only in editor-style builds. Slim runtime builds load glTF animations through the tinygltf path on kAssetManager.
| kemena::kSkeletalAnimation::kSkeletalAnimation | ( | ) |
Default constructor — leaves the clip empty until populated.
Finds the kBone with the given name in this clip.
| float kemena::kSkeletalAnimation::getDuration | ( | ) | const |
Total duration of this animation in ticks.
| std::vector< kMesh * > kemena::kSkeletalAnimation::getMeshes | ( | ) |
All meshes this animation has been bound to.
| const kNodeData & kemena::kSkeletalAnimation::getRootNode | ( | ) | const |
Root of the bone hierarchy.
| float kemena::kSkeletalAnimation::getSpeed | ( | ) | const |
Current playback speed multiplier.
| float kemena::kSkeletalAnimation::getTicksPerSecond | ( | ) | const |
Tick rate of this animation (as specified in the asset).
| void kemena::kSkeletalAnimation::setSpeed | ( | float | newSpeed | ) |
Set the playback speed multiplier (1.0 = normal).