-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.h
62 lines (53 loc) · 843 Bytes
/
data.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
struct Vector
{
float m_x = 0.0f;
float m_y = 0.0f;
float m_z = 0.0f;
};
struct Matrix
{
Vector m_i = { 1.0f, 0.0f, 0.0f };
Vector m_j = { 0.0f, 1.0f, 0.0f };
Vector m_k = { 0.0f, 0.0f, 1.0f };
};
struct Quaternion
{
float m_w = 1.0f;
Vector m_real;
};
struct Transform
{
Quaternion m_rotation;
Vector m_position;
};
struct Kinematic
{
Vector m_source;
Vector m_target;
float m_maxSpeed = 0.0f;
float m_maxAcceleration = 0.0f;
float m_maxRotation = 0.0f;
float m_time = 0.0f;
};
struct RigidBody
{
Vector m_position;
Vector m_linearVelocity;
Vector m_angularVelocity;
Matrix m_intertiaTensor;
Matrix m_invIntertiaTensor;
float m_mass = 0.0f;
float m_principalMomentsIntertia = 0.0f;
};
struct Health
{
float m_maxValue = 0.0f;
float m_currentValue = 0.0f;
};
struct Camera
{
};
struct Render
{
};