]> git.localhorst.tv Git - blank.git/blob - src/model.hpp
938fd4453d6f700d51391509ab07a97b305a1676
[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 Position(glm::vec3 pos) { position = pos; }
18         void Move(glm::vec3 delta) { position += delta; }
19
20         // all angles in radians (full circle = 2π)
21         float Pitch() const { return pitch; }
22         void Pitch(float p) { pitch = p; }
23         void RotatePitch(float delta) { pitch += delta; }
24         float Yaw() const { return yaw; }
25         void Yaw(float y) { yaw = y; }
26         void RotateYaw(float delta) { yaw += delta; }
27
28 private:
29         glm::vec3 position;
30         float pitch;
31         float yaw;
32
33 };
34
35 }
36
37 #endif