-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentity_components.hpp
More file actions
55 lines (29 loc) · 921 Bytes
/
Copy pathentity_components.hpp
File metadata and controls
55 lines (29 loc) · 921 Bytes
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
#pragma once
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "dependencies/imgui.h"
namespace lve {
struct TransformComponent {
glm::vec3 translation{0.f,0.f,0.f};
glm::vec3 scale{ 1.f, 1.f, 1.f };
glm::vec3 rotation{};
// Matrix corrsponds to Translate * Ry * Rx * Rz * Scale
// Rotations correspond to Tait-bryan angles of Y(1), X(2), Z(3)
// https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix
glm::mat4 mat4();
glm::mat3 normalMatrix();
void imgui_editor();
};
struct PointLightComponent {
float lightIntensity = 1.0f;
void imgui_editor();
};
struct ColorComponent{
glm::vec3 color{};
void imgui_editor();
};
struct CameraComponent {
//for now I won't use this
bool useProsective = true;
};
}