Changeset 2012 in orxonox.OLD for orxonox/branches/chris/src/vector.h
- Timestamp:
- Jun 22, 2004, 12:45:28 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.