Changeset 4994 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Aug 13, 2005, 11:57:23 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.h
r4992 r4994 115 115 { 116 116 public: 117 /** \briefcreates a Default quaternion (multiplicational identity Quaternion)*/117 /** creates a Default quaternion (multiplicational identity Quaternion)*/ 118 118 inline Quaternion () { w = 1; v = Vector(0,0,0); } 119 /** \briefcreates a Quaternion looking into the direction v @param v: the direction @param f: the value */119 /** creates a Quaternion looking into the direction v @param v: the direction @param f: the value */ 120 120 inline Quaternion (const Vector& v, float f) { this->w = f; this->v = v; } 121 121 Quaternion (float m[4][4]); 122 /** \briefturns a rotation along an axis into a Quaternion @param angle: the amount of radians to rotate @param axis: the axis to rotate around */122 /** turns a rotation along an axis into a Quaternion @param angle: the amount of radians to rotate @param axis: the axis to rotate around */ 123 123 inline Quaternion (float angle, const Vector& axis) { w = cos(angle/2); v = axis * sin(angle/2); } 124 124 Quaternion (const Vector& dir, const Vector& up); … … 141 141 /** @param q the Quaternion to substrace from this @returns the quaternion substracted by q (this -= q) */ 142 142 inline const Quaternion& operator-= (const Quaternion& q) { this->v -= q.v; this->w -= q.w; return *this; }; 143 /** \briefcopy constructor @param q: the Quaternion to set this to. @returns the Quaternion q (or this) */143 /** copy constructor @param q: the Quaternion to set this to. @returns the Quaternion q (or this) */ 144 144 inline Quaternion operator= (const Quaternion& q) {this->v = q.v; this->w = q.w; return *this;} 145 /** \briefconjugates this Quaternion @returns the conjugate */145 /** conjugates this Quaternion @returns the conjugate */ 146 146 inline Quaternion conjugate () const { Quaternion r(*this); r.v = Vector() - r.v; return r;} 147 147 Quaternion inverse () const;
Note: See TracChangeset
for help on using the changeset viewer.