1 #include "animations.hpp"
2 #include "box_vertices.hpp"
3 #include "local_entity.hpp"
7 using namespace dragonblocks;
9 void LocalEntity::setPos(vec3 p)
14 vec3 LocalEntity::getPos()
19 void LocalEntity::setSize(vec3 s)
21 mesh->minp = -(s / 2.0f);
22 mesh->maxp = +(s / 2.0f);
26 vec3 LocalEntity::getSize()
31 void LocalEntity::setRotationAxis(vec3 r)
33 mesh->rotation_axis = r;
36 vec3 LocalEntity::getRotationAxis()
38 return mesh->rotation_axis;
41 void LocalEntity::setRotationAngle(double r)
43 mesh->rotation_angle = r;
46 double LocalEntity::getRotationAngle()
48 return mesh->rotation_angle;
51 void LocalEntity::setVisible(bool v)
56 bool LocalEntity::isVisible()
61 LocalEntity::LocalEntity(Map *m, Scene *s, const TileDef &t, ShaderProgram *sh) : IEntity(m), tile_def(t)
63 mesh = new Mesh(s, sh, &box_vertices[0][0][0], 6 * 6 * 5);
64 mesh->textures = tile_def.tiles;
65 mesh->vertices_per_texture = 6;
68 LocalEntity::~LocalEntity()