Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5994 in orxonox.OLD for trunk/src/world_entities/environment.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/environment.cc

    r5750 r5994  
    3737  this->init();
    3838  this->loadModel("models/ships/bolido.obj");
    39 
    40   if(this->obbTree == NULL)
    41     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    4239}
    4340
     
    8481
    8582
    86 /**
    87  *  draws the Environment
    88 */
    89 void Environment::draw () const
    90 {
    91   glMatrixMode(GL_MODELVIEW);
    92   glPushMatrix();
    93   float matrix[4][4];
    94 
    95   glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    96   //rotate
    97   this->getAbsDir().matrix (matrix);
    98   glMultMatrixf((float*)matrix);
    99 
    100   this->model->draw();
    101 
    102   glPopMatrix();
    103 }
    104 
Note: See TracChangeset for help on using the changeset viewer.