RavEngine
Loading...
Searching...
No Matches
Animation.hpp
1
#pragma once
2
#include "Vector.hpp"
3
#include "mathtypes.hpp"
4
#include "Array.hpp"
5
6
namespace
RavEngine
{
7
8
template
<
typename
T>
9
struct
TKey
{
10
T value;
11
float
time = 0;
12
};
13
14
using
TranslationKey
=
TKey<glm::vec3>
;
15
using
ScaleKey
=
TranslationKey
;
16
using
RotationKey
=
TKey<glm::quat>
;
17
18
struct
JointAnimationTrack
{
19
Vector<TranslationKey>
translations;
20
Vector<RotationKey>
rotations;
21
Vector<ScaleKey>
scales;
22
};
23
24
struct
JointAnimation
{
25
Vector<JointAnimationTrack>
tracks;
26
std::string name;
27
float
duration = 0;
28
float
ticksPerSecond = 0;
29
};
30
31
struct
SerializedJointAnimationHeader
{
32
const
Array<char, 4>
header = {
'r'
,
'v'
,
'e'
,
'a'
};
33
float
duration = 0;
34
float
ticksPerSecond = 0;
35
uint32_t numTracks = 0;
36
uint16_t nameLength = 0;
37
};
38
39
struct
SerializedJointAnimationTrackHeader
{
40
uint32_t numTranslations = 0;
41
uint32_t numRotations = 0;
42
uint32_t numScales = 0;
43
};
44
}
moodycamel::ConcurrentQueue
Definition
concurrentqueue.h:747
RavEngine
Definition
Animation.hpp:6
RavEngine::JointAnimationTrack
Definition
Animation.hpp:18
RavEngine::JointAnimation
Definition
Animation.hpp:24
RavEngine::SerializedJointAnimationHeader
Definition
Animation.hpp:31
RavEngine::SerializedJointAnimationTrackHeader
Definition
Animation.hpp:39
RavEngine::TKey
Definition
Animation.hpp:9
RavEngine
include
RavEngine
Animation.hpp
Generated by
1.9.8