Vulkan Schnee
0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
AnimationEvaluator.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
AnimationAsset.h
"
4
5
#include <glm/glm.hpp>
6
#include <glm/gtc/quaternion.hpp>
7
#include <vector>
8
9
namespace
Engine::Animation
10
{
17
class
AnimationEvaluator
18
{
19
public
:
23
struct
JointPose
24
{
28
glm::vec3
translation
= glm::vec3( 0.0f );
29
33
glm::quat
rotation
= glm::quat( 1.0f, 0.0f, 0.0f, 0.0f );
34
38
glm::vec3
scale
= glm::vec3( 1.0f );
39
};
40
48
static
void
49
evaluate
(
const
Assets::Animation
& animation,
float
time, std::vector<JointPose> & outPoses );
50
};
51
}
// namespace Engine::Animation
AnimationAsset.h
Engine::Animation::AnimationEvaluator
Evaluates animation keyframes at a given time.
Definition
AnimationEvaluator.h:18
Engine::Animation::AnimationEvaluator::evaluate
static void evaluate(const Assets::Animation &animation, float time, std::vector< JointPose > &outPoses)
Evaluate all channels at given time, output one JointPose per joint.
Engine::Assets::Animation
Animation clip loaded from glTF animation data.
Definition
AnimationAsset.h:57
Engine::Animation
Animation channel data and evaluation helpers.
Engine::Animation::AnimationEvaluator::JointPose
Local-space transform sampled for one joint.
Definition
AnimationEvaluator.h:24
Engine::Animation::AnimationEvaluator::JointPose::translation
glm::vec3 translation
Local translation.
Definition
AnimationEvaluator.h:28
Engine::Animation::AnimationEvaluator::JointPose::scale
glm::vec3 scale
Local scale.
Definition
AnimationEvaluator.h:38
Engine::Animation::AnimationEvaluator::JointPose::rotation
glm::quat rotation
Local rotation.
Definition
AnimationEvaluator.h:33
Engine
include
Engine
Animation
AnimationEvaluator.h
Generated by
1.14.0