Changeset 3023 in orxonox.OLD for orxonox/branches/bezierTrack/src/coordinates.h
- Timestamp:
- Nov 30, 2004, 1:13:48 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/bezierTrack/src/coordinates.h
r3013 r3023 34 34 } Placement; 35 35 36 37 /////////////////////////////////////////////////////////////////// 38 //////// NEW COORDINATES, because the old ones were a bit fuzy // 39 /////////////////////////////////////////////////////////////////// 40 enum COORD_TYPE {WORLD, TRACK, LOCAL}; 41 42 typedef struct 43 { 44 Vector position; 45 Quaternion rotation; 46 } Coord; 47 48 class Coordinate 49 { 50 private: 51 Coord worldCoord; 52 53 public: 54 55 void setCoord (Coord coordinate, COORD_TYPE cType); 56 void setPosition (Vector position, COORD_TYPE cType); 57 void setRotation (Quaternion rotation, COORD_TYPE cType); 58 59 Coord getCoord (COORD_TYPE cType) const; 60 Vector getPosition (COORD_TYPE cType) const; 61 Quaternion getRotation (COORD_TYPE cType) const; 62 }; 63 64 65 66 67 68 //! World coordinates: 69 /** 70 Absolute coordinates in 3D-space are defined as the coordinates, an Entity has in respect to the absolute Zero point 71 */ 72 typedef struct 73 { 74 Vector position; //!< absolute position of the Object (the one opengl has to know) 75 Quaternion rot; //!< absolute rotation 76 } WorldCoord; 77 78 typedef struct 79 { 80 Vector position; //!< The Vector from the current Path-Position to the Entity. (worldCoord->position - track->worldCoord->position) 81 Quaternion rot; //!< rotation an entity has to the track. 82 } TrackCoord; 83 84 typedef struct 85 { 86 Vector position; //!< the coordinate to the object itself. This shoud be 0 for an entity. (can be used for explosions on the ship, shoot and so on.) 87 Quaternion rot; //!< the Rotation of an object itself. (to easily shoot in different directions) 88 } LocalCoord; 89 36 90 #endif
Note: See TracChangeset
for help on using the changeset viewer.