]> git.localhorst.tv Git - blank.git/blob - src/model/Instance.hpp
load models from assets
[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         void Render(const glm::mat4 &, DirectionalLighting &);
30
31 private:
32         const Model *model;
33         std::vector<Part::State> state;
34
35 };
36
37 }
38
39 #endif