Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6765 in orxonox.OLD for branches


Ignore:
Timestamp:
Jan 26, 2006, 12:11:01 PM (19 years ago)
Author:
patrick
Message:

network: fog now works, fixed a projection bug in the camera

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/world_entities/camera.cc

    r6426 r6765  
    178178/**
    179179 *  initialize rendering perspective according to this camera
    180 
    181    This is called immediately before the rendering cycle starts, it sets all global
    182    rendering options as well as the GL_PROJECTION matrix according to the camera.
    183 */
     180 *
     181 * This is called immediately before the rendering cycle starts, it sets all global
     182 * rendering options as well as the GL_PROJECTION matrix according to the camera.
     183 */
    184184void Camera::apply ()
    185185{
     
    193193                 this->nearClip,
    194194                 this->farClip);
    195 
    196195  // speed-up feature
    197196  Vector cameraPosition = this->getAbsCoor();
    198197  Vector targetPosition = this->target->getAbsCoor();
    199198  Vector up = this->getAbsDirV();
    200   Vector delay = Vector(0,0,0);
    201   if( currentMode != VIEW_FRONT) delay = (this->target->getVelocity())/25;
     199  Vector delay = Vector(0, 0, 0);
     200  if( currentMode != VIEW_FRONT) delay = (this->target->getVelocity()) / 25.0f;
     201
     202  glMatrixMode (GL_MODELVIEW);
     203  glLoadIdentity();
     204
    202205
    203206  // Setting the Camera Eye, lookAt and up Vectors
     
    205208            targetPosition.x, targetPosition.y, targetPosition.z,
    206209            up.x, up.y, up.z);
    207 
    208   // switching back to Modeling Matrix
    209   glMatrixMode (GL_MODELVIEW);
    210   //  this->target->getParent()->getParent()->debugDraw(0, 2, Vector(1,0,0));
    211210}
    212211
Note: See TracChangeset for help on using the changeset viewer.