Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
AnimationAsset.h
Go to the documentation of this file.
1#pragma once
2
3#include "Engine/Core/Asset.h"
5
6#include <cstdint>
7#include <glm/glm.hpp>
8#include <glm/gtc/quaternion.hpp>
9#include <string>
10#include <vector>
11
16namespace Engine::Animation
17{
18
28
45} // namespace Engine::Animation
46
48{
57 {
58 public:
60
61 [[nodiscard]] float getDuration() const
62 {
63 return duration_;
64 }
65
66 [[nodiscard]] const std::string & getName() const
67 {
68 return name_;
69 }
70
71 [[nodiscard]] const std::vector<Engine::Animation::AnimationChannel> & getChannels() const
72 {
73 return channels_;
74 }
75
88 void sample(
89 uint32_t channelIndex,
90 float time,
91 glm::vec3 & outTranslation,
92 glm::quat & outRotation,
93 glm::vec3 & outScale
94 ) const;
95
96 // TODO: check if these variables need to be public
97 std::string name_;
98 float duration_ = 0.0f;
99
100 std::vector<Engine::Animation::AnimationChannel> channels_;
101 };
102
103 class AnimationAssetManager : public Asset::AssetManager<Asset::MeshPath, Animation>
104 {
105 public:
107 };
108} // namespace Engine::Assets
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of en...
Definition Asset.h:282
A manager which is used to look up existing assets and their loading state.
Definition Asset.h:332
const std::string & getName() 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.
std::vector< Engine::Animation::AnimationChannel > channels_
const std::vector< Engine::Animation::AnimationChannel > & getChannels() const
Animation channel data and evaluation helpers.
InterpolationType
Interpolation method for animation keyframes.
A single animation channel targeting one joint's transform property.
enum Engine::Animation::AnimationChannel::Path path
std::vector< glm::vec4 > values
vec3 for T/S (w unused), quat for R (xyzw)