#include "Entity.hpp"
-#include "../model/geometry.hpp"
#include "../model/Shape.hpp"
#include <cmath>
namespace {
-blank::Model::Buffer model_buffer;
+blank::EntityModel::Buffer model_buffer;
}
Entity::Entity() noexcept
: shape(nullptr)
, model()
+, name("anonymous")
+, bounds()
, velocity(0, 0, 0)
, position(0, 0, 0)
, chunk(0, 0, 0)
, angular_velocity(1.0f, 0.0f, 0.0f, 0.0f)
-, rotation(1.0f) {
+, rotation(1.0f)
+, world_collision(false)
+, remove(false) {
}
velocity = vel;
}
+void Entity::Position(const Chunk::Pos &c, const Block::Pos &pos) noexcept {
+ chunk = c;
+ position = pos;
+}
+
void Entity::Position(const Block::Pos &pos) noexcept {
position = pos;
while (position.x >= Chunk::width) {