X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmodel%2FCompositeModel.hpp;h=4b3d2a9b9549ddcc4b2b8940131d66d52a21303d;hb=3542823a1af7f5063d7cc8da84efa248eb889b8a;hp=55708494cbbf37a53f61952503ad6f843dc071ef;hpb=2ea26d9ca5eaeae65daa0edbbaeada8c1f23670e;p=blank.git diff --git a/src/model/CompositeModel.hpp b/src/model/CompositeModel.hpp index 5570849..4b3d2a9 100644 --- a/src/model/CompositeModel.hpp +++ b/src/model/CompositeModel.hpp @@ -3,6 +3,7 @@ #include "geometry.hpp" +#include #include #include #include @@ -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;