Changeset 9090 in orxonox.OLD for branches/presentation/src/lib/math/quaternion.h
- Timestamp:
- Jul 4, 2006, 2:26:42 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/math/quaternion.h
r8894 r9090 39 39 /** creates a Default quaternion (multiplicational identity Quaternion)*/ 40 40 inline Quaternion () { w = 1; v = Vector(0,0,0); } 41 /** Copy constructor @param q the Quaternion to copy. */ 42 inline Quaternion (const Quaternion& q) { w = q.w; v = q.v; }; 41 43 /** creates a Quaternion looking into the direction v @param v: the direction @param f: the value */ 42 44 inline Quaternion (const Vector& v, float f) { this->w = f; this->v = v; } 43 Quaternion (float m[4][4]);44 Quaternion (float m[3][3]);45 45 /** turns a rotation along an axis into a Quaternion @param angle: the amount of radians to rotate @param axis: the axis to rotate around */ 46 46 inline Quaternion (float angle, const Vector& axis) { w = cos(angle/2.0); v = axis * sin(angle/2.0); } 47 47 Quaternion (const Vector& dir, const Vector& up); 48 48 Quaternion (float roll, float pitch, float yaw); 49 50 void from3x3(float m[3][3]); 51 void from4x4(float m[4][4]); 52 49 53 50 54 /** @param q: the Quaternion to compare with this one. @returns true if the Quaternions are the same, false otherwise */
Note: See TracChangeset
for help on using the changeset viewer.