]> git.localhorst.tv Git - blank.git/blobdiff - src/model/CompositeModel.hpp
model -> mesh
[blank.git] / src / model / CompositeModel.hpp
index 55708494cbbf37a53f61952503ad6f843dc071ef..4b3d2a9b9549ddcc4b2b8940131d66d52a21303d 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "geometry.hpp"
 
+#include <cstdint>
 #include <list>
 #include <glm/glm.hpp>
 #include <glm/gtc/quaternion.hpp>
@@ -11,7 +12,7 @@
 namespace blank {
 
 class CompositeInstance;
-class EntityModel;
+class EntityMesh;
 
 class CompositeModel {
 
@@ -21,6 +22,9 @@ public:
        CompositeModel(const CompositeModel &) = delete;
        CompositeModel &operator =(const CompositeModel &) = delete;
 
+       std::uint32_t ID() const noexcept { return id; }
+       void ID(std::uint32_t i) noexcept { id = i; }
+
        const AABB &Bounds() const noexcept { return bounds; }
        void Bounds(const AABB &b) noexcept { bounds = b; }
 
@@ -30,10 +34,10 @@ public:
        const glm::quat &Orientation() const noexcept { return orientation; }
        void Orientation(const glm::quat &o) noexcept { orientation = o; }
 
-       bool HasNodeModel() const noexcept { return node_model; }
-       void SetNodeModel(const EntityModel *m) noexcept { node_model = m; }
+       bool HasNodeMesh() const noexcept { return node_mesh; }
+       void SetNodeMesh(const EntityMesh *m) noexcept { node_mesh = m; }
 
-       const EntityModel &NodeModel() const noexcept { return *node_model; }
+       const EntityMesh &NodeMesh() const noexcept { return *node_mesh; }
 
        CompositeModel &AddPart();
        bool HasParent() const noexcept { return parent; }
@@ -47,7 +51,9 @@ public:
 
 private:
        CompositeModel *parent;
-       const EntityModel *node_model;
+       const EntityMesh *node_mesh;
+
+       std::uint32_t id;
 
        AABB bounds;