Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3638 in orxonox.OLD


Ignore:
Timestamp:
Mar 23, 2005, 1:12:35 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: camera now banks together with the TrackManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/camera.cc

    r3636 r3638  
    5757}
    5858
     59/**
     60   \returns The PNode of the Target (from there you can get position and so on
     61*/
    5962PNode* Camera::getTarget(void)
    6063{
     
    9295}
    9396
    94 
    95 
    96 
    9797/**
    9898   \brief initialize rendering perspective according to this camera
     
    116116  Vector cameraPosition = this->getAbsCoor();
    117117  Vector targetPosition = this->target->getAbsCoor();
     118  Vector up = Vector(0, 1, 0);
     119  up = this->getAbsDir().apply(up);
    118120
    119121  // Setting the Camera Eye, lookAt and up Vectors
    120122  gluLookAt(cameraPosition.x, cameraPosition.y, cameraPosition.z,
    121123            targetPosition.x, targetPosition.y, targetPosition.z,
    122             0.0, 1.0, 0.0);
     124            up.x, up.y, up.z);
    123125
    124126  // switching back to Modeling Matrix
     
    135137CameraTarget::CameraTarget()
    136138{
    137  
     139  this->setMode(PNODE_MOVEMENT);
    138140}
    139141
Note: See TracChangeset for help on using the changeset viewer.