/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: ... co-programmer: ... */ #include "proto_world_entity.h" #include "glincl.h" #include "stdincl.h" #include "vector.h" #include "model.h" using namespace std; /** \brief standard constructor */ ProtoWorldEntity::ProtoWorldEntity () { this->model = (Model*)ResourceManager::getInstance()->load("cube", PRIM, RP_LEVEL); } /** \brief standard deconstructor */ ProtoWorldEntity::~ProtoWorldEntity () { } /** \brief advances the ProtoWorldEntity about time seconds \param time the Time to step */ ProtoWorldEntity::tick(float time) { } /** \biref draws this worldEntity */ void ProtoWorldEntity::draw () { glMatrixMode(GL_MODELVIEW); glPushMatrix(); float matrix[4][4]; /* translate */ glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); /* rotate */ this->getAbsDir().matrix(matrix); glMultMatrixf((float*)matrix); if (model) model->draw(); glPopMatrix(); }