3#include "Engine/Core/Asset.h"
4#include "Engine/Files/AssetPath.h"
8#include <glm/gtc/quaternion.hpp>
79 [[nodiscard]]
const std::string &
getName()
const
87 [[nodiscard]]
const std::vector<Engine::Animation::AnimationChannel> &
getChannels()
const
105 uint32_t channelIndex,
107 glm::vec3 & outTranslation,
108 glm::quat & outRotation,
116 std::vector<Engine::Animation::AnimationChannel>
channels_;
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of en...
A manager which is used to look up existing assets and their loading state.
AnimationAssetManager()=default
Creates an empty animation asset manager.
Animation()
Creates a loaded animation clip with no channels.
float getDuration() const
Gets the clip duration in seconds.
const std::string & getName() const
Gets the imported animation name.
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.
std::vector< Engine::Animation::AnimationChannel > channels_
Channels sampled by this clip.
const std::vector< Engine::Animation::AnimationChannel > & getChannels() const
Gets all animation channels in this clip.
std::string name_
Imported animation name.
float duration_
Clip duration in seconds.
Animation channel data and evaluation helpers.
InterpolationType
Interpolation method for animation keyframes.
@ STEP
Hold the previous keyframe value until the next keyframe.
@ LINEAR
Interpolate between neighboring keyframes.
@ CUBIC_SPLINE
Use glTF cubic spline keyframe data.
A single animation channel targeting one joint's transform property.
InterpolationType interpolation
Keyframe interpolation mode.
uint32_t jointIndex
Index of the targeted joint in the bound skeleton.
Path path
Target transform property.
std::vector< float > timestamps
Keyframe times in seconds.
Path
Transform property animated by this channel.
@ TRANSLATION
Channel animates local translation.
@ SCALE
Channel animates local scale.
@ ROTATION
Channel animates local rotation.
std::vector< glm::vec4 > values
vec3 for T/S (w unused), quat for R (xyzw)