-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntity.hpp
51 lines (34 loc) · 1.03 KB
/
Entity.hpp
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
#ifndef ENTITY_H
#define ENTITY_H
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/glm.hpp>
#include "TextureModel.h"
// Instance of TexturedModel, has position, rotateion and scale of Textured Model
class Entity {
public:
TexturedModel texturedModel = TexturedModel();
glm::vec3 position;
float rotX, rotY, rotZ;
float scale;
Entity(TexturedModel texturedModel, glm::vec3 position, float rotX, float rotY, float rotZ, float scale) {
this->texturedModel = texturedModel;
this->position = position;
this->rotX = rotX;
this->rotY = rotY;
this->rotZ = rotZ;
this->scale = scale;
}
// Move Enrity in our Worl
void inceasePosition(float dx, float dy, float dz) {
this->position.x += dx;
this->position.y += dy;
this->position.z += dz;
}
void inceaseRotation(float dx, float dy, float dz) {
this->rotX += dx;
this->rotY += dy;
this->rotZ += dz;
}
};
#endif // ENTITY_H