X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmodel%2FCompositeModel.hpp;fp=src%2Fmodel%2FCompositeModel.hpp;h=0000000000000000000000000000000000000000;hb=eba29c8ad489194cd1e3cd64b5f23424ad4384ef;hp=4b3d2a9b9549ddcc4b2b8940131d66d52a21303d;hpb=3542823a1af7f5063d7cc8da84efa248eb889b8a;p=blank.git diff --git a/src/model/CompositeModel.hpp b/src/model/CompositeModel.hpp deleted file mode 100644 index 4b3d2a9..0000000 --- a/src/model/CompositeModel.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef BLANK_MODEL_COMPOSITEMODEL_HPP_ -#define BLANK_MODEL_COMPOSITEMODEL_HPP_ - -#include "geometry.hpp" - -#include -#include -#include -#include - - -namespace blank { - -class CompositeInstance; -class EntityMesh; - -class CompositeModel { - -public: - CompositeModel(); - - 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; } - - const glm::vec3 &Position() const noexcept { return position; } - void Position(const glm::vec3 &p) noexcept { position = p; } - - const glm::quat &Orientation() const noexcept { return orientation; } - void Orientation(const glm::quat &o) noexcept { orientation = o; } - - bool HasNodeMesh() const noexcept { return node_mesh; } - void SetNodeMesh(const EntityMesh *m) noexcept { node_mesh = m; } - - const EntityMesh &NodeMesh() const noexcept { return *node_mesh; } - - CompositeModel &AddPart(); - bool HasParent() const noexcept { return parent; } - CompositeModel &Parent() const noexcept { return *parent; } - bool IsRoot() const noexcept { return !HasParent(); } - - glm::mat4 LocalTransform() const noexcept; - glm::mat4 GlobalTransform() const noexcept; - - void Instantiate(CompositeInstance &) const; - -private: - CompositeModel *parent; - const EntityMesh *node_mesh; - - std::uint32_t id; - - AABB bounds; - - glm::vec3 position; - glm::quat orientation; - - std::list parts; - -}; - -} - -#endif