Johan is love, Johan is life

This commit is contained in:
2016-05-19 14:25:03 +02:00
parent a38a6d3c5f
commit 7c4ee37867
82 changed files with 550 additions and 1250 deletions
+36
View File
@@ -0,0 +1,36 @@
#include "Entity.h"
#include <GL/freeglut.h>
#include "Model.h"
Entity::Entity()
{
model = NULL;
}
Entity::~Entity()
{
}
void Entity::draw()
{
if (model)
{
glPushMatrix();
glTranslatef(position.x, position.y, position.z);
glRotatef(rotation.x, 1, 0, 0);
glRotatef(rotation.y, 0, 1, 0);
glRotatef(rotation.z, 0, 0, 1);
glScalef(scale, scale, scale);
model->draw();
glPopMatrix();
}
}