]> git.localhorst.tv Git - blank.git/blob - src/model/Instance.hpp
use entity's eyes to aim
[blank.git] / src / model / Instance.hpp
1 #ifndef BLANK_MODEL_INSTANCE_HPP_
2 #define BLANK_MODEL_INSTANCE_HPP_
3
4 #include "Part.hpp"
5
6 #include <vector>
7 #include <glm/glm.hpp>
8 #include <glm/gtc/quaternion.hpp>
9
10
11 namespace blank {
12
13 class DirectionalLighting;
14 class Model;
15 class Part;
16
17 class Instance {
18
19         friend class Model;
20         friend class Part;
21
22 public:
23         Instance();
24         ~Instance();
25
26         operator bool() const noexcept { return model; }
27         const Model &GetModel() const noexcept { return *model; }
28
29         glm::mat4 EyesTransform() const noexcept;
30
31         void Render(const glm::mat4 &, DirectionalLighting &);
32
33 private:
34         const Model *model;
35         std::vector<Part::State> state;
36
37 };
38
39 }
40
41 #endif