X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmodel%2FCompositeModel.hpp;fp=src%2Fmodel%2FCompositeModel.hpp;h=55708494cbbf37a53f61952503ad6f843dc071ef;hb=2ea26d9ca5eaeae65daa0edbbaeada8c1f23670e;hp=b548a9c8485dbe20337f7e5af52959fbcee6ae3e;hpb=5304d1e3c1a1e90d474307f4f7eea812a61e483c;p=blank.git diff --git a/src/model/CompositeModel.hpp b/src/model/CompositeModel.hpp index b548a9c..5570849 100644 --- a/src/model/CompositeModel.hpp +++ b/src/model/CompositeModel.hpp @@ -1,6 +1,8 @@ #ifndef BLANK_MODEL_COMPOSITEMODEL_HPP_ #define BLANK_MODEL_COMPOSITEMODEL_HPP_ +#include "geometry.hpp" + #include #include #include @@ -8,7 +10,7 @@ namespace blank { -class DirectionalLighting; +class CompositeInstance; class EntityModel; class CompositeModel { @@ -19,6 +21,9 @@ public: CompositeModel(const CompositeModel &) = delete; CompositeModel &operator =(const CompositeModel &) = delete; + const AABB &Bounds() const noexcept { return bounds; } + void Bounds(const AABB &b) noexcept { bounds = b; } + const glm::vec3 &Position() const noexcept { return position; } void Position(const glm::vec3 &p) noexcept { position = p; } @@ -38,12 +43,14 @@ public: glm::mat4 LocalTransform() const noexcept; glm::mat4 GlobalTransform() const noexcept; - void Render(const glm::mat4 &, DirectionalLighting &) const; + void Instantiate(CompositeInstance &) const; private: CompositeModel *parent; const EntityModel *node_model; + AABB bounds; + glm::vec3 position; glm::quat orientation;