Changeset 3039 in orxonox.OLD for orxonox/branches/bezierTrack/src
- Timestamp:
- Dec 1, 2004, 12:55:12 AM (20 years ago)
- Location:
- orxonox/branches/bezierTrack/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/bezierTrack/src/camera.cc
r3028 r3039 30 30 { 31 31 this->world = world; 32 coord = new Coordinate(); 33 32 34 bound = NULL; 33 35 /* give it some physical live */ … … 85 87 86 88 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); 89 91 90 92 Location lookat; … … 119 121 // ===== first camera control calculation option 120 122 // 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); 123 125 124 126 gluLookAt (eye.x, eye.y, eye.z, … … 195 197 CameraTarget::CameraTarget () 196 198 { 197 199 coord = new Coordinate(); 198 200 199 201 } … … 201 203 CameraTarget::CameraTarget (Vector pos) 202 204 { 203 this->setPosition (pos, WORLD);204 } 205 coord->setPosition (pos, WORLD); 206 } -
orxonox/branches/bezierTrack/src/camera.h
r3028 r3039 24 24 enum CAMERA_MODE {NORMAL, SMOTH_FOLLOW, STICKY, ELLIPTICAL}; 25 25 26 class Camera : public Coordinate26 class Camera 27 27 { 28 28 private: … … 31 31 Placement desired_place; //!< where the Camera should be according to calculations 32 32 World* world; 33 33 34 CameraTarget* target; 34 35 … … 59 60 60 61 public: 62 Coordinate* coord; 63 61 64 Camera (World* world); 62 65 ~Camera (); … … 72 75 73 76 //! A Class to handle the Target of a Camera. 74 class CameraTarget : public Coordinate77 class CameraTarget 75 78 { 76 79 private: … … 79 82 80 83 public: 84 Coordinate* coord; 81 85 CameraTarget (); 82 86 CameraTarget (Vector pos); //!< a target only needs a Position and no Rotation
Note: See TracChangeset
for help on using the changeset viewer.