]> git.localhorst.tv Git - blank.git/blob - src/model/Instance.hpp
linear model instance state
[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 Model;
14 class DirectionalLighting;
15
16 class Instance {
17
18         friend class Model;
19
20 public:
21         Instance();
22
23         operator bool() const noexcept { return model; }
24         const Model &GetModel() const noexcept { return *model; }
25
26         void Render(const glm::mat4 &, DirectionalLighting &) const;
27
28 private:
29         const Model *model;
30         std::vector<Part::State> state;
31
32 };
33
34 }
35
36 #endif