X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fentity.hpp;fp=src%2Fentity.hpp;h=0000000000000000000000000000000000000000;hb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;hp=20c7630ce75c99a81e3bb4faf79a93fa93145267;hpb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;p=blank.git diff --git a/src/entity.hpp b/src/entity.hpp deleted file mode 100644 index 20c7630..0000000 --- a/src/entity.hpp +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef BLANK_ENTITY_HPP_ -#define BLANK_ENTITY_HPP_ - -#include "block.hpp" -#include "chunk.hpp" -#include "model.hpp" - -#include -#include - - -namespace blank { - -class Ray; -class Shape; - -class Entity { - -public: - Entity() noexcept; - - bool HasShape() const noexcept { return shape; } - const Shape *GetShape() const noexcept { return shape; } - void SetShape(const Shape *, const glm::vec3 &color); - void SetShapeless() noexcept; - - const glm::vec3 &Velocity() const noexcept { return velocity; } - void Velocity(const glm::vec3 &) noexcept; - - const Block::Pos &Position() const noexcept { return position; } - void Position(const Block::Pos &) noexcept; - void Move(const glm::vec3 &delta) noexcept; - - const Chunk::Pos ChunkCoords() const noexcept { return chunk; } - - const glm::quat &AngularVelocity() const noexcept { return angular_velocity; } - void AngularVelocity(const glm::quat &) noexcept; - - const glm::mat4 &Rotation() const noexcept { return rotation; } - void Rotation(const glm::mat4 &) noexcept; - void Rotate(const glm::quat &delta) noexcept; - - glm::mat4 Transform(const Chunk::Pos &chunk_offset) const noexcept; - Ray Aim(const Chunk::Pos &chunk_offset) const noexcept; - - void Update(int dt) noexcept; - - void Draw() noexcept; - -private: - const Shape *shape; - Model model; - - glm::vec3 velocity; - Block::Pos position; - Chunk::Pos chunk; - - glm::quat angular_velocity; - glm::mat4 rotation; - -}; - -} - -#endif