Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3039 in orxonox.OLD for orxonox/branches/bezierTrack/src


Ignore:
Timestamp:
Dec 1, 2004, 12:55:12 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/bezierTrack: camera Has A and not Is A Coordinate: Patrick, I finally got what you ment.

Location:
orxonox/branches/bezierTrack/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/bezierTrack/src/camera.cc

    r3028 r3039  
    3030{
    3131  this->world = world;
     32  coord = new Coordinate();
     33
    3234  bound = NULL;
    3335  /* give it some physical live */
     
    8587
    8688    case NORMAL:
    87       this->setPosition(world->track->getPos() - world->track->getDir() *10 +Vector (0,0,5), WORLD);
    88       target->setPosition(world->track->getPos(), WORLD);
     89      coord->setPosition(world->track->getPos() - world->track->getDir() *10 +Vector (0,0,5), WORLD);
     90      target->coord->setPosition(world->track->getPos(), WORLD);
    8991
    9092      Location lookat;
     
    119121  // ===== first camera control calculation option
    120122  // rotation
    121   Vector eye = this->getPosition(WORLD);
    122   Vector targetV = target->getPosition(WORLD);
     123  Vector eye = coord->getPosition(WORLD);
     124  Vector targetV = target->coord->getPosition(WORLD);
    123125
    124126  gluLookAt (eye.x, eye.y, eye.z,
     
    195197CameraTarget::CameraTarget ()
    196198{
    197  
     199  coord = new Coordinate();
    198200
    199201}
     
    201203CameraTarget::CameraTarget (Vector pos)
    202204{
    203   this->setPosition (pos, WORLD);
    204 }
     205  coord->setPosition (pos, WORLD);
     206}
  • orxonox/branches/bezierTrack/src/camera.h

    r3028 r3039  
    2424enum CAMERA_MODE {NORMAL, SMOTH_FOLLOW, STICKY, ELLIPTICAL};
    2525
    26 class Camera : public Coordinate
     26class Camera
    2727{
    2828 private:
     
    3131  Placement desired_place;        //!< where the Camera should be according to calculations
    3232  World* world;
     33
    3334  CameraTarget* target;
    3435 
     
    5960 
    6061 public:
     62  Coordinate* coord;
     63
    6164  Camera (World* world);
    6265  ~Camera ();
     
    7275
    7376//! A Class to handle the Target of a Camera.
    74 class CameraTarget : public Coordinate
     77class CameraTarget
    7578{
    7679 private:
     
    7982 
    8083 public:
     84  Coordinate* coord;
    8185  CameraTarget ();
    8286  CameraTarget (Vector pos); //!< a target only needs a Position and no Rotation
Note: See TracChangeset for help on using the changeset viewer.