Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 13, 2005, 7:19:51 PM (20 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/world_entity.cc

    r4885 r4998  
    179179  glMatrixMode(GL_MODELVIEW);
    180180  glPushMatrix();
    181   float matrix[4][4];
    182 
    183181  /* translate */
    184182  glTranslatef (this->getAbsCoor ().x,
     
    186184                this->getAbsCoor ().z);
    187185  /* rotate */
    188   this->getAbsDir ().matrix (matrix);
    189   glMultMatrixf((float*)matrix);
     186  Vector tmpRot = this->getAbsDir().getSpacialAxis();
     187  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    190188
    191189  if (this->obbTree)
Note: See TracChangeset for help on using the changeset viewer.