Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

    r4997 r4998  
    142142    case VIEW_FRONT:
    143143      this->toFovy = 120.0;
    144       this->softReparent("Player");
    145       this->target->softReparent("Player");
    146       this->setRelCoorSoft(4, 0, 0);
    147       this->target->setRelCoorSoft(10,0,0);
     144//       this->softReparent("Player");
     145//       this->target->softReparent("Player");
     146//       this->setRelCoorSoft(4, 0, 0);
     147//       this->target->setRelCoorSoft(10,0,0);
     148      this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0)));
    148149      break;
    149150    case VIEW_LEFT:
Note: See TracChangeset for help on using the changeset viewer.