|
Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
|
System that processes active skeletal animations, interpolating poses and resolving joint trees. More...
#include <AnimationSystem.hpp>
Classes | |
| struct | JointPose |
| Updates skeletal poses for all animated entities. More... | |
Public Member Functions | |
| AnimationSystem (Registry ®, VulkanRenderer &renderer, EditorModeState &editorMode) | |
| void | update (float dt) override |
| Updates skeletal poses for all animated entities. | |
| Public Member Functions inherited from System | |
| virtual | ~System ()=default |
| Virtual destructor. | |
| void | addEntity (Entity e) |
| Adds an entity to the system tracking list. | |
| void | removeEntity (Entity e) |
| Removes an entity from system tracking. | |
Private Member Functions | |
| void | updateController (AnimationControllerComponent &controller, AnimatorComponent &animator, float dt) |
| Updates high-level state machine progression and checks transitions. | |
| const AnimationClip * | findClip (const AnimatorComponent &animator, const std::string &name) |
| void | sampleClip (const AnimationClip &clip, float time, const SkeletonComponent &skeleton, std::vector< JointPose > &outPose) |
| void | blendPoses (const std::vector< JointPose > &poseA, const std::vector< JointPose > &poseB, float weight, std::vector< JointPose > &outPose) |
| void | evaluateStatePose (const AnimationControllerComponent &controller, const AnimationState &state, float stateTime, const AnimatorComponent &animator, const SkeletonComponent &skeleton, std::vector< JointPose > &outPose) |
| int | findJointIndex (const SkeletonComponent &skeleton, const std::string &name) |
| glm::quat | rotationBetweenVectors (glm::vec3 u, glm::vec3 v) |
| void | solve2BoneIK (SkeletonComponent &skeleton, const IKSolverComponent &ik, std::vector< glm::mat4 > &globalTransforms) |
| void | solveFABRIK (SkeletonComponent &skeleton, const IKSolverComponent &ik, std::vector< glm::mat4 > &globalTransforms) |
| void | updateEntityAnimation (Entity entity, SkeletonComponent &skeleton, AnimatorComponent &animator, float dt) |
| Updates the animation timing and calculates local/global joint matrices for an entity. | |
| glm::vec3 | interpolateTranslation (const std::vector< Keyframe > &keys, float time, const glm::vec3 &defaultValue) |
| glm::quat | interpolateRotation (const std::vector< KeyframeRot > &keys, float time, const glm::quat &defaultValue) |
| glm::vec3 | interpolateScale (const std::vector< Keyframe > &keys, float time, const glm::vec3 &defaultValue) |
| glm::vec4 | interpolateProperty (const std::vector< PropertyKeyframe > &keys, float time, const glm::vec4 &defaultValue) |
| std::string | sampleStringProperty (const std::vector< PropertyKeyframe > &keys, float time) |
| void | sampleAndApplyProperties (Entity entity, AnimatorComponent &animator) |
| void | updateGenericAnimation (Entity entity, AnimatorComponent &animator, float dt) |
Private Attributes | |
| Registry & | registry |
| VulkanRenderer & | renderer |
| EditorModeState & | editorMode |
| std::vector< Entity > | controllerEntities |
| std::vector< Entity > | animatedEntities |
| std::vector< Entity > | genericAnimatedEntities |
Additional Inherited Members | |
| Protected Attributes inherited from System | |
| std::vector< Entity > | entities |
| List of entities tracked by this system. | |
System that processes active skeletal animations, interpolating poses and resolving joint trees.
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineoverridevirtual |
Updates skeletal poses for all animated entities.
| dt | Delta time in seconds. |
Implements System.
|
inlineprivate |
Updates high-level state machine progression and checks transitions.
|
inlineprivate |
Updates the animation timing and calculates local/global joint matrices for an entity.
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |