-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTransformation.h
49 lines (36 loc) · 869 Bytes
/
Transformation.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
#include <glm\glm.hpp>
#include "Def.h"
#include "EngineObject.h"
NSP_GLM
#pragma once
class Transformation : public EngineObject
{
public:
Transformation();
Transformation(unsigned int);
Transformation(vec3, vec3, vec3);
Transformation(unsigned int, vec3, vec3, vec3);
void setTranslation(vec3 trans);
vec3 getTranslation();
void translate(vec3 trans);
void setRotation(vec3 rot);
vec3 getRotation();
void rotate(vec3 rot);
void setScale(vec3 scale);
vec3 getScale();
void scale(vec3);
void init(Screen&);
void update(ThreadManager& mgr) { EngineObject::update(mgr); }
void render(Shader&, RenderingEngine::RenderState);
~Transformation();
private:
mat4 getTransMat();
mat4 getRotMat();
mat4 getScaleMat();
mat4 getMatrix();
vec3 _translation;
vec3 _rotation;
vec3 _scale;
const string TransformationMatrix;
unsigned int _ID;
};