Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5994 in orxonox.OLD for trunk/src/world_entities/satellite.cc


Ignore:
Timestamp:
Dec 9, 2005, 10:43:31 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: much cleaner Model Loading unloading, model is now private to WorldEntity (not protected)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/satellite.cc

    r5500 r5994  
    3434  this->setClassID(CL_SATELLITE, "Satellite");
    3535
    36   this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL);
     36  this->loadModel("cube");
    3737  this->speed = speed;
    3838  this->axis = new Vector();
     
    6464}
    6565
    66 
    67 /**
    68  *  the entity is drawn onto the screen with this function
    69 
    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() const
    73 {
    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.