Changeset 2012 in orxonox.OLD for orxonox/branches
- Timestamp:
- Jun 22, 2004, 12:45:28 PM (20 years ago)
- Location:
- orxonox/branches/chris/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/collision.cc
r1982 r2012 177 177 } 178 178 179 /**180 \brief recursive implementation for collision detection within a CC_Tree181 */182 179 bool cctree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags) 183 180 { … … 333 330 } 334 331 335 /**336 \brief recursive implementation for traceing detection within a CC_Tree337 */338 332 bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint) 339 333 { -
orxonox/branches/chris/src/collision.h
r2010 r2012 21 21 } CC_Tree; 22 22 23 //! Basic collision detection class 23 24 /** 24 25 This class implements a more or less efficient collision system based on nested hitzones. … … 34 35 of a trace, the exact point of interception is returned as well. 35 36 */ 36 37 37 class CollisionCluster { 38 38 -
orxonox/branches/chris/src/coordinates.h
r1982 r2012 4 4 #include "vector.h" 5 5 6 typedef struct Location // place of a thing on the track system 6 //! Coordinates relative to track 7 /** 8 This identifies the position of an object on the track system 9 */ 10 typedef struct Location 7 11 { 8 unsigned long part; // ID of the track part the object is on9 float dist; // distance already traveled on atrack10 Vector pos; // position relative tothe distance already covered11 Rotation rot; // direction the object is heading (relative to track direction)12 unsigned long part; //!< ID of the track part the object is on 13 float dist; //!< The distance that has already been traveled on the track 14 Vector pos; //!< The position relative to the offset marked by the distance already covered 15 Rotation rot; //!< The direction the object is heading (relative to track direction) 12 16 } Location; 13 17 14 typedef struct Placement // place of a thing in the rendered coordinate system 18 //! Absolute coordinates 19 /** 20 This is used to store the position of a object in the rendered coordinate system 21 */ 22 typedef struct Placement 15 23 { 16 Vector r; // x/y/z coordinated17 Rotation w; // orientation24 Vector r; //!< Absolute x/y/z coordinates 25 Rotation w; //!< Absolute orientation 18 26 } Placement; 19 27 -
orxonox/branches/chris/src/vector.h
r2010 r2012 6 6 #define PI 3.14159265359f 7 7 8 //! 3D vector 8 9 /** 9 10 Class for 3-dimensional vector calculation … … 17 18 float x, y, z; 18 19 19 Vector (float x, float y, float z) : x(x), y(y), z(z) {} 20 Vector (float x, float y, float z) : x(x), y(y), z(z) {} //!< assignment constructor 20 21 Vector () : x(0), y(0), z(0) {} 21 22 ~Vector () {} … … 35 36 float angle_rad (const Vector& v1, const Vector& v2); 36 37 38 //! 3D rotation 37 39 /** 38 40 Class to handle 3-dimensional rotations … … 43 45 public: 44 46 45 float m[9]; 47 float m[9]; //< 3x3 Rotation Matrix 46 48 47 49 Rotation ( const Vector& v); … … 55 57 Vector rotate_vector( const Vector& v, const Rotation& r); 56 58 59 //! 3D line 57 60 /** 58 61 Class to store Lines in 3-dimensional space … … 64 67 public: 65 68 66 Vector r, a; 69 Vector r; //!< Offset 70 Vector a; //!< Direction 67 71 68 Line ( Vector r, Vector a) : r(r), a(a) {} 72 Line ( Vector r, Vector a) : r(r), a(a) {} //!< assignment constructor 69 73 Line () : r(Vector(0,0,0)), a(Vector (1,1,1)) {} 70 74 ~Line () {} … … 78 82 }; 79 83 84 //! 3D plane 80 85 /** 81 86 Class to handle planes in 3-dimensional space 82 87 83 88 Critical for polygon-based collision detection 84 89 */ … … 87 92 public: 88 93 89 Vector n; 90 float k; 94 Vector n; //!< Normal vector 95 float k; //!< Offset constant 91 96 92 97 Plane (Vector a, Vector b, Vector c); 93 98 Plane (Vector norm, Vector p); 94 Plane (Vector n, float k) : n(n), k(k) {} 99 Plane (Vector n, float k) : n(n), k(k) {} //!< assignment constructor 95 100 Plane () : n(Vector(1,1,1)), k(0) {} 96 101 ~Plane () {}
Note: See TracChangeset
for help on using the changeset viewer.