Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4998 in orxonox.OLD for orxonox/trunk/src/lib/math/vector.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/lib/math/vector.cc

    r4997 r4998  
    197197 * @returns the Result of the smooth move
    198198*/
    199 Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t)
     199Quaternion Quaternion::quatSlerp(const Quaternion& from, const Quaternion& to, float t)
    200200{
    201201  float tol[4];
     
    306306void Quaternion::debug()
    307307{
    308   PRINT(0)("Quaternion Debug Information\n");
    309308  PRINT(0)("real a=%f; imag: x=%f y=%f z=%f\n", w, v.x, v.y, v.z);
    310309}
Note: See TracChangeset for help on using the changeset viewer.