]> git.localhorst.tv Git - blank.git/blob - src/model.hpp
lousy implementation of camera movement
[blank.git] / src / model.hpp
1 #ifndef BLANK_MODEL_HPP_
2 #define BLANK_MODEL_HPP_
3
4 #include <glm/glm.hpp>
5
6
7 namespace blank {
8
9 class Model {
10
11 public:
12         Model();
13         ~Model();
14
15         glm::mat4 Transform() const;
16
17         void Velocity(glm::vec3 vel) { velocity = vel; }
18         void Position(glm::vec3 pos) { position = pos; }
19         void Move(glm::vec3 delta) { position += delta; }
20
21         // all angles in radians (full circle = 2π)
22         float Pitch() const { return pitch; }
23         void Pitch(float p) { pitch = p; }
24         void RotatePitch(float delta) { pitch += delta; }
25         float Yaw() const { return yaw; }
26         void Yaw(float y) { yaw = y; }
27         void RotateYaw(float delta) { yaw += delta; }
28
29         void Update(int dt);
30
31 private:
32         glm::vec3 velocity;
33         glm::vec3 position;
34         float pitch;
35         float yaw;
36
37 };
38
39 }
40
41 #endif