]> git.localhorst.tv Git - blank.git/blob - src/model.cpp
7335ed9a5c3ec35a91219180e6105d8436f4a2d3
[blank.git] / src / model.cpp
1 #include "model.hpp"
2
3 #include <glm/gtc/matrix_transform.hpp>
4 #include <glm/gtx/euler_angles.hpp>
5 #include <glm/gtx/transform.hpp>
6
7
8 namespace blank {
9
10 Model::Model()
11 : velocity(0, 0, 0)
12 , position(0, 0, 0)
13 , pitch(0)
14 , yaw(0) {
15
16 }
17
18 Model::~Model() {
19
20 }
21
22
23 glm::mat4 Model::Transform() const {
24         return glm::translate(position) * glm::eulerAngleYX(yaw, pitch);
25 }
26
27
28 void Model::Update(int dt) {
29         position += velocity * float(dt);
30 }
31
32 }