Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4998 in orxonox.OLD for orxonox/trunk/src/world_entities/skybox.cc


Ignore:
Timestamp:
Aug 13, 2005, 7:19:51 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: more optimizations of the Quaternion Class.
Now the 3D-rotation is much faster through this code:

Vector tmpRot = this→getAbsDir().getSpacialAxis();
glRotatef (this→getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );

instead of the old Matrix-approach. furthermore glRotate is optimized much better in openGL as is clearly stated in the red book

also implemented some other really useless functions for Quaternion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/skybox.cc

    r4836 r4998  
    167167  this->size = size;
    168168}
    169 
    170 /**
    171  *  draws the SkyBox
    172 */
    173 void SkyBox::draw()
    174 {
    175   glPushMatrix();
    176   glMatrixMode(GL_MODELVIEW);
    177   Vector r = this->getAbsCoor();
    178   glTranslatef(r.x, r.y, r.z);
    179 
    180   this->model->draw();
    181 
    182   glPopMatrix();
    183 }
    184 
    185169
    186170/**
Note: See TracChangeset for help on using the changeset viewer.