|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
Animation clip loaded from glTF animation data. More...
#include <AnimationAsset.h>
Public Member Functions | |
| Animation () | |
| float | getDuration () const |
| const std::string & | getName () const |
| const std::vector< Engine::Animation::AnimationChannel > & | getChannels () const |
| void | sample (uint32_t channelIndex, float time, glm::vec3 &outTranslation, glm::quat &outRotation, glm::vec3 &outScale) const |
| Sample a specific channel at the given time. | |
| Public Member Functions inherited from Asset::AssetBase | |
| AssetBase (bool initializeDefaultEntity=false) | |
| virtual | ~AssetBase () |
| CpuLoadingState | getLoadingState () |
| Gets the loading state of this asset. | |
| void | requestLoad () |
| If this asset is in the UNLOADED state it will get added to the assets to load. | |
| virtual void | unload () |
| Base function for unloading the ecs data. | |
| entt::entity | getEntity () const |
| Getter for data. | |
Public Attributes | |
| std::string | name_ |
| float | duration_ = 0.0f |
| std::vector< Engine::Animation::AnimationChannel > | channels_ |
Additional Inherited Members | |
| Protected Member Functions inherited from Asset::AssetBase | |
| virtual void | updateLoadingState () |
| Protected Attributes inherited from Asset::AssetBase | |
| CpuLoadingState | loadingState = UNLOADED |
| entt::registry & | mainRegistry |
| entt::entity | data |
Animation clip loaded from glTF animation data.
Contains keyframe tracks for joint transforms. Supports linear, step, and cubic spline interpolation. One AnimationAsset can be shared by multiple entity instances.
Definition at line 56 of file AnimationAsset.h.
| Engine::Assets::Animation::Animation | ( | ) |
|
inlinenodiscard |
Definition at line 71 of file AnimationAsset.h.
References channels_.
|
inlinenodiscard |
Definition at line 61 of file AnimationAsset.h.
References duration_.
|
inlinenodiscard |
Definition at line 66 of file AnimationAsset.h.
References name_.
| void Engine::Assets::Animation::sample | ( | uint32_t | channelIndex, |
| float | time, | ||
| glm::vec3 & | outTranslation, | ||
| glm::quat & | outRotation, | ||
| glm::vec3 & | outScale ) const |
Sample a specific channel at the given time.
Performs binary search on keyframes and interpolates based on the channel's interpolation type.
| channelIndex | Index into the channels vector |
| time | Playback time in seconds |
| outTranslation | Output translation (only valid for Translation channels) |
| outRotation | Output rotation (only valid for Rotation channels) |
| outScale | Output scale (only valid for Scale channels) |
| std::vector<Engine::Animation::AnimationChannel> Engine::Assets::Animation::channels_ |
Definition at line 100 of file AnimationAsset.h.
Referenced by getChannels().
| float Engine::Assets::Animation::duration_ = 0.0f |
Definition at line 98 of file AnimationAsset.h.
Referenced by getDuration().
| std::string Engine::Assets::Animation::name_ |
Definition at line 97 of file AnimationAsset.h.
Referenced by getName().