1 #ifndef BLANK_ENTITY_HPP_
2 #define BLANK_ENTITY_HPP_
6 #include "geometry.hpp"
10 #include <glm/glm.hpp>
11 #include <glm/gtc/quaternion.hpp>
23 bool HasShape() const { return shape; }
24 const Shape *GetShape() const { return shape; }
25 void SetShape(Shape *, const glm::vec3 &color);
28 const glm::vec3 &Velocity() const { return velocity; }
29 void Velocity(const glm::vec3 &);
31 const Block::Pos &Position() const { return position; }
32 void Position(const Block::Pos &);
33 void Move(const glm::vec3 &delta);
35 const Chunk::Pos ChunkCoords() const { return chunk; }
37 const glm::quat &AngularVelocity() const { return angular_velocity; }
38 void AngularVelocity(const glm::quat &);
40 const glm::mat4 &Rotation() const { return rotation; }
41 void Rotation(const glm::mat4 &);
42 void Rotate(const glm::quat &delta);
44 glm::mat4 Transform(const Chunk::Pos &chunk_offset) const;
45 Ray Aim(const Chunk::Pos &chunk_offset) const;
59 glm::quat angular_velocity;