Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

    r4924 r4998  
    106106  glMatrixMode(GL_MODELVIEW);
    107107  glPushMatrix();
    108   float matrix[4][4];
    109108
    110109  /* translate */
     
    113112                this->getAbsCoor ().z);
    114113  /* rotate */
    115   this->getAbsDir ().matrix (matrix);
    116   glMultMatrixf((float*)matrix);
     114  Vector tmpRot = this->getAbsDir().getSpacialAxis();
     115  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    117116
    118117  if (this->objectList)
Note: See TracChangeset for help on using the changeset viewer.