]> git.localhorst.tv Git - blank.git/blobdiff - src/model/Instance.hpp
store shapes in models rather than meshes
[blank.git] / src / model / Instance.hpp
index 9de1a5db8e3382414131a77f2d4766b881118566..60c0212793e132934cf2e2c808c05835ec6868a0 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "Part.hpp"
 
+#include <memory>
 #include <vector>
 #include <glm/glm.hpp>
 #include <glm/gtc/quaternion.hpp>
 
 namespace blank {
 
-class Model;
 class DirectionalLighting;
+class EntityMesh;
+class Model;
+class Part;
 
 class Instance {
 
        friend class Model;
+       friend class Part;
 
 public:
        Instance();
+       ~Instance();
+
+       Instance(const Instance &);
+       Instance &operator =(const Instance &);
 
        operator bool() const noexcept { return model; }
        const Model &GetModel() const noexcept { return *model; }
 
-       void Render(const glm::mat4 &, DirectionalLighting &) const;
+       void Render(const glm::mat4 &, DirectionalLighting &);
+
+       void SetTextures(const std::vector<float> &t);
+       void SetHSLModifier(const glm::vec3 &m);
+       void SetRGBModifier(const glm::vec3 &m);
 
 private:
        const Model *model;
        std::vector<Part::State> state;
+       std::vector<std::unique_ptr<EntityMesh>> mesh;
+
+       std::vector<float> tex_map;
+       glm::vec3 hsl_mod;
+       glm::vec3 rgb_mod;
 
 };