Changeset 5994 in orxonox.OLD for trunk/src/world_entities/satellite.cc
- Timestamp:
- Dec 9, 2005, 10:43:31 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/satellite.cc
r5500 r5994 34 34 this->setClassID(CL_SATELLITE, "Satellite"); 35 35 36 this-> model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL);36 this->loadModel("cube"); 37 37 this->speed = speed; 38 38 this->axis = new Vector(); … … 64 64 } 65 65 66 67 /**68 * the entity is drawn onto the screen with this function69 70 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.71 */72 void Satellite::draw() const73 {74 glMatrixMode(GL_MODELVIEW);75 glPushMatrix();76 float matrix[4][4];77 78 /* translate */79 glTranslatef (this->getAbsCoor ().x,80 this->getAbsCoor ().y,81 this->getAbsCoor ().z);82 /* rotate */83 this->getAbsDir ().matrix (matrix);84 glMultMatrixf((float*)matrix);85 86 this->model->draw();87 glPopMatrix();88 89 }90
Note: See TracChangeset
for help on using the changeset viewer.