Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Animator.hpp
Go to the documentation of this file.
1#pragma once
3
9 float time = 0.0f;
10 glm::vec4 value = glm::vec4(0.0f);
11 std::string stringValue;
12};
13
19 std::string componentName;
20 std::string fieldName;
22 std::vector<PropertyKeyframe> keys;
23};
24
29struct Keyframe {
31 float time = 0.0f;
33 glm::vec3 value = glm::vec3(0.0f);
34};
35
42 float time = 0.0f;
44 glm::quat value = glm::quat(1.0f, 0.0f, 0.0f, 0.0f);
45};
46
53 int jointIndex = -1;
55 std::string jointName;
57 std::vector<Keyframe> translationKeys;
59 std::vector<KeyframeRot> rotationKeys;
61 std::vector<Keyframe> scaleKeys;
62};
63
70 std::string name;
72 float duration = 0.0f;
74 std::vector<AnimationChannel> channels;
76 std::vector<PropertyChannel> propertyChannels;
77};
78
83// [ReflectClass]
86 std::vector<AnimationClip> animations;
90 float currentTime = 0.0f;
91 // [ReflectField]
92 float playbackSpeed = 1.0f;
93 // [ReflectField]
94 bool loop = true;
95 // [ReflectField]
96 bool isPreviewing = false;
97 // [ReflectField]
98 std::string loadedAnimPath;
99};
100
101
103
104
#define REGISTER_COMPONENT(Type, MenuPath)
Definition ComponentReflection.hpp:156
FieldType
Supported field types for component reflection.
Definition ComponentReflection.hpp:16
Tracks keyframe sequences (translation, rotation, scale) affecting a specific joint node.
Definition Animator.hpp:51
std::string jointName
Target joint name identifier.
Definition Animator.hpp:55
std::vector< Keyframe > translationKeys
List of translation keyframes.
Definition Animator.hpp:57
int jointIndex
Target joint index in the SkeletonComponent.
Definition Animator.hpp:53
std::vector< Keyframe > scaleKeys
List of scale keyframes.
Definition Animator.hpp:61
std::vector< KeyframeRot > rotationKeys
List of rotation keyframes.
Definition Animator.hpp:59
Collection of channels representing a single skeletal animation state.
Definition Animator.hpp:68
std::vector< AnimationChannel > channels
Bone channels mapping keyframe states.
Definition Animator.hpp:74
std::string name
Name of the clip (e.g. "Walk", "Run").
Definition Animator.hpp:70
float duration
Total duration of the animation in seconds.
Definition Animator.hpp:72
std::vector< PropertyChannel > propertyChannels
Reflected component field channels.
Definition Animator.hpp:76
Animator controller managing active clips and tracking playback timing.
Definition Animator.hpp:84
float currentTime
Current playback time offset in seconds.
Definition Animator.hpp:90
bool isPreviewing
Definition Animator.hpp:96
float playbackSpeed
Definition Animator.hpp:92
bool loop
Definition Animator.hpp:94
int activeAnimationIndex
Index of the active clip in playback.
Definition Animator.hpp:88
std::vector< AnimationClip > animations
List of all clips loaded from the model asset.
Definition Animator.hpp:86
std::string loadedAnimPath
Definition Animator.hpp:98
Keyframe storing a 3D vector (translation or scale) at a specific timestamp.
Definition Animator.hpp:29
float time
Time offset in seconds.
Definition Animator.hpp:31
glm::vec3 value
Vector value.
Definition Animator.hpp:33
Keyframe storing a quaternion rotation at a specific timestamp.
Definition Animator.hpp:40
glm::quat value
Quaternion rotation value.
Definition Animator.hpp:44
float time
Time offset in seconds.
Definition Animator.hpp:42
Tracks keyframe sequences affecting a specific reflected component field.
Definition Animator.hpp:18
std::string fieldName
Definition Animator.hpp:20
std::string componentName
Definition Animator.hpp:19
std::vector< PropertyKeyframe > keys
Definition Animator.hpp:22
Engine::FieldType type
Definition Animator.hpp:21
Keyframe storing a reflected field value (up to 4 floats, e.g. float, bool, vec2, vec3,...
Definition Animator.hpp:8
glm::vec4 value
Definition Animator.hpp:10
std::string stringValue
Definition Animator.hpp:11
float time
Definition Animator.hpp:9