1 #ifndef BLAMK_MODEL_PART_HPP_
2 #define BLAMK_MODEL_PART_HPP_
9 #include <glm/gtc/quaternion.hpp>
14 class DirectionalLighting;
21 class TokenStreamReader;
27 glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f);
28 glm::quat orientation = glm::quat(1.0f, 0.0f, 0.0f, 0.0f);
34 void Read(TokenStreamReader &, ResourceIndex &, const ShapeRegistry &);
37 const std::list<Part> &Children() const noexcept { return children; }
39 std::uint16_t Enumerate(std::uint16_t) noexcept;
40 void Index(std::vector<Part *> &) noexcept;
42 std::uint16_t ID() const noexcept { return id; }
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;
59 glm::tvec3<unsigned char> hsl_mod;
60 glm::tvec3<unsigned char> rgb_mod;