Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Animation.hpp
1
#pragma once
2
3
#include <stdint.h>
4
#include <string>
5
#include <vector>
6
#include "../Math.hpp"
7
8
namespace
Grindstone {
9
namespace
Formats {
10
namespace
Animation {
11
namespace
V1 {
12
struct
Header
{
13
uint32_t totalFileSize = 0;
14
uint32_t version = 1;
15
double
animationDuration = 1.f;
16
double
ticksPerSecond = 0.25f;
17
uint16_t channelCount = 0;
18
};
19
20
struct
Channel
{
21
uint16_t boneIndex;
22
uint16_t positionCount;
23
uint16_t scaleCount;
24
uint16_t rotationCount;
25
};
26
27
struct
PositionKeyframe {
28
double
time;
29
Math::Float3 value;
30
31
PositionKeyframe(
double
time, Math::Float3 value) {
32
this->time = time;
33
this->value = value;
34
}
35
};
36
37
struct
ScaleKeyframe {
38
double
time;
39
Math::Float3 value;
40
41
ScaleKeyframe(
double
time, Math::Float3 value) {
42
this->time = time;
43
this->value = value;
44
}
45
};
46
47
struct
RotationKeyframe {
48
double
time;
49
Math::Quaternion value;
50
51
RotationKeyframe(
double
time, Math::Quaternion value) {
52
this->time = time;
53
this->value = value;
54
}
55
};
56
57
struct
ChannelData
{
58
std::vector<PositionKeyframe> positions;
59
std::vector<ScaleKeyframe> scales;
60
std::vector<RotationKeyframe> rotations;
61
};
62
}
63
}
64
}
65
}
Grindstone::Formats::Animation::V1::ChannelData
Definition
Animation.hpp:57
Grindstone::Formats::Animation::V1::Channel
Definition
Animation.hpp:20
Grindstone::Formats::Animation::V1::Header
Definition
Animation.hpp:12
sources
code
Common
Formats
Animation.hpp
Generated by
1.13.2