1 #ifndef BLAMK_MODEL_PART_HPP_
2 #define BLAMK_MODEL_PART_HPP_
4 #include "geometry.hpp"
10 #include <glm/glm.hpp>
11 #include <glm/gtc/quaternion.hpp>
16 class DirectionalLighting;
23 class TokenStreamReader;
29 glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f);
30 glm::quat orientation = glm::quat(1.0f, 0.0f, 0.0f, 0.0f);
36 void Read(TokenStreamReader &, ResourceIndex &, const ShapeRegistry &);
39 const std::list<Part> &Children() const noexcept { return children; }
41 std::uint16_t Enumerate(std::uint16_t) noexcept;
42 void Index(std::vector<Part *> &) noexcept;
44 glm::mat4 LocalTransform(const Instance &) const noexcept;
45 glm::mat4 GlobalTransform(const Instance &) const noexcept;
50 DirectionalLighting &) const;
55 std::list<Part> children;
56 std::vector<float> tex_map;
57 mutable std::unique_ptr<EntityMesh> mesh;