Changeset 3803 in orxonox.OLD for orxonox/trunk/src/world_entities/world_entity.cc
- Timestamp:
- Apr 13, 2005, 7:38:52 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/world_entity.cc
r3755 r3803 19 19 20 20 #include "world_entity.h" 21 #include " objModel.h"21 #include "model.h" 22 22 #include "list.h" 23 #include "vector.h" 23 24 24 25 //#include "stdincl.h" … … 41 42 this->setClassName ("WorldEntity"); 42 43 this->bDraw = true; 43 //this->model = NULL;44 this->model = NULL; 44 45 // collisioncluster = NULL; 45 46 } … … 171 172 Handle all stuff that should update with time inside this method (movement, animation, etc.) 172 173 */ 173 inlinevoid WorldEntity::tick(float time)174 void WorldEntity::tick(float time) 174 175 { 175 176 } … … 181 182 This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn. 182 183 */ 183 inline void WorldEntity::draw() 184 {} 184 void WorldEntity::draw() 185 { 186 glMatrixMode(GL_MODELVIEW); 187 glPushMatrix(); 188 float matrix[4][4]; 189 190 /* translate */ 191 glTranslatef (this->getAbsCoor ().x, 192 this->getAbsCoor ().y, 193 this->getAbsCoor ().z); 194 /* rotate */ 195 this->getAbsDir ().matrix (matrix); 196 glMultMatrixf((float*)matrix); 197 198 if (this->model) 199 this->model->draw(); 200 glPopMatrix(); 201 } 185 202 186 203
Note: See TracChangeset
for help on using the changeset viewer.