]> git.localhorst.tv Git - blank.git/blob - src/model/Skeletons.hpp
8d106d95fefdea2492e23092f1d7dbac2b6f0ca2
[blank.git] / src / model / Skeletons.hpp
1 #ifndef BLANK_MODEL_SKELETONS_HPP_
2 #define BLANK_MODEL_SKELETONS_HPP_
3
4 #include <cstdint>
5 #include <memory>
6 #include <vector>
7
8
9 namespace blank {
10
11 class Model;
12 class EntityMesh;
13
14 class Skeletons {
15
16 public:
17         using size_type = std::size_t;
18         using reference = Model &;
19         using const_reference = const Model &;
20
21 public:
22         Skeletons();
23         ~Skeletons();
24
25         void LoadHeadless();
26         void Load();
27
28         size_type size() const noexcept { return skeletons.size(); }
29
30         reference operator[](size_type i) noexcept { return *skeletons[i]; }
31         const_reference operator[](size_type i) const noexcept { return *skeletons[i]; }
32
33         Model *ByID(std::uint16_t) noexcept;
34         const Model *ByID(std::uint16_t) const noexcept;
35
36 private:
37         std::vector<std::unique_ptr<Model>> skeletons;
38         std::vector<EntityMesh> meshes;
39
40 };
41
42 }
43
44 #endif