Cogs.Core
Source
Resources
Skeleton.h
1
#pragma once
2
3
#include <vector>
4
#include <string>
5
#include <unordered_map>
6
7
#include <glm/vec3.hpp>
8
#include <glm/mat4x4.hpp>
9
#include <glm/ext/quaternion_float.hpp>
10
11
namespace
Cogs
12
{
13
namespace
Core
14
{
15
struct
Bone
16
{
17
std::string name;
18
19
size_t
parentBone;
20
21
glm::vec3 pos;
// Almost not used, 'relative' is usually used, see comment in AnimationSystem
22
glm::vec3 scale;
// Almost not used, 'relative' is usually used, see comment in AnimationSystem
23
glm::quat rot;
// Almost not used, 'relative' is usually used, see comment in AnimationSystem
24
25
glm::mat4 relative;
26
glm::mat4 absolute;
27
28
glm::mat4 inverseBindPose;
29
bool
hasOffset;
30
31
bool
used;
32
bool
animated;
33
};
34
35
struct
Skeleton
36
{
37
std::vector<Bone> bones;
38
39
glm::mat4 bindPose;
40
41
std::unordered_map<std::string, uint32_t> bonesByName;
42
};
43
44
// Defined in AnimationSystem.cpp
45
void
updateSkeletonPose(
Skeleton
& skeleton);
46
}
47
}
Cogs
Contains all Cogs related functionality.
Definition:
FieldSetter.h:23
Cogs::Core::Bone
Definition:
Skeleton.h:16
Cogs::Core::Skeleton
Definition:
Skeleton.h:36
Generated by
1.9.6