|
| quaternion () |
| Default Constructor. More...
|
|
| quaternion (f32 x, f32 y, f32 z, f32 w) |
| Constructor. More...
|
|
| quaternion (f32 x, f32 y, f32 z) |
| Constructor which converts Euler angles (radians) to a quaternion. More...
|
|
| quaternion (const vector3df &vec) |
| Constructor which converts Euler angles (radians) to a quaternion. More...
|
|
| quaternion (const matrix4 &mat) |
| Constructor which converts a matrix to a quaternion. More...
|
|
bool | operator== (const quaternion &other) const |
| Equality operator. More...
|
|
bool | operator!= (const quaternion &other) const |
| inequality operator More...
|
|
quaternion & | operator= (const quaternion &other) |
| Assignment operator. More...
|
|
quaternion & | operator= (const matrix4 &other) |
| Matrix assignment operator. More...
|
|
quaternion | operator+ (const quaternion &other) const |
| Add operator. More...
|
|
quaternion | operator * (const quaternion &other) const |
|
quaternion | operator * (f32 s) const |
| Multiplication operator with scalar. More...
|
|
quaternion & | operator *= (f32 s) |
| Multiplication operator with scalar. More...
|
|
vector3df | operator * (const vector3df &v) const |
| Multiplication operator. More...
|
|
quaternion & | operator *= (const quaternion &other) |
| Multiplication operator. More...
|
|
f32 | dotProduct (const quaternion &other) const |
| Calculates the dot product. More...
|
|
quaternion & | set (f32 x, f32 y, f32 z, f32 w) |
| Sets new quaternion. More...
|
|
quaternion & | set (f32 x, f32 y, f32 z) |
| Sets new quaternion based on Euler angles (radians) More...
|
|
quaternion & | set (const core::vector3df &vec) |
| Sets new quaternion based on Euler angles (radians) More...
|
|
quaternion & | set (const core::quaternion &quat) |
| Sets new quaternion from other quaternion. More...
|
|
bool | equals (const quaternion &other, const f32 tolerance=ROUNDING_ERROR_f32) const |
| returns if this quaternion equals the other one, taking floating point rounding errors into account More...
|
|
quaternion & | normalize () |
| Normalizes the quaternion. More...
|
|
matrix4 | getMatrix () const |
| Creates a matrix from this quaternion. More...
|
|
void | getMatrixFast (matrix4 &dest) const |
| Faster method to create a rotation matrix, you should normalize the quaternion before! More...
|
|
void | getMatrix (matrix4 &dest, const core::vector3df &translation=core::vector3df()) const |
| Creates a matrix from this quaternion. More...
|
|
void | getMatrixCenter (matrix4 &dest, const core::vector3df ¢er, const core::vector3df &translation) const |
|
void | getMatrix_transposed (matrix4 &dest) const |
| Creates a matrix from this quaternion. More...
|
|
quaternion & | makeInverse () |
| Inverts this quaternion. More...
|
|
quaternion & | lerp (quaternion q1, quaternion q2, f32 time) |
| Set this quaternion to the linear interpolation between two quaternions. More...
|
|
quaternion & | lerpN (quaternion q1, quaternion q2, f32 time) |
| Set this quaternion to the linear interpolation between two quaternions and normalize the result. More...
|
|
quaternion & | slerp (quaternion q1, quaternion q2, f32 time, f32 threshold=.05f) |
| Set this quaternion to the result of the spherical interpolation between two quaternions. More...
|
|
quaternion & | fromAngleAxis (f32 angle, const vector3df &axis) |
| Set this quaternion to represent a rotation from angle and axis. More...
|
|
void | toAngleAxis (f32 &angle, core::vector3df &axis) const |
| Fills an angle (radians) around an axis (unit vector) More...
|
|
void | toEuler (vector3df &euler) const |
| Output this quaternion to an Euler angle (radians) More...
|
|
quaternion & | makeIdentity () |
| Set quaternion to identity. More...
|
|
quaternion & | rotationFromTo (const vector3df &from, const vector3df &to) |
| Set quaternion to represent a rotation from one vector to another. More...
|
|
Quaternion class for representing rotations.
It provides cheap combinations and avoids gimbal locks. Also useful for interpolations.
Definition at line 31 of file quaternion.h.
Creates a matrix from this quaternion Rotate about a center point shortcut for core::quaternion q; q.rotationFromTo ( vin[i].Normal, forward ); q.getMatrixCenter ( lookat, center, newPos );
core::matrix4 m2; m2.setInverseTranslation ( center ); lookat *= m2;
core::matrix4 m3; m2.setTranslation ( newPos ); lookat *= m3;
Creates a matrix from this quaternion Rotate about a center point shortcut for core::quaternion q; q.rotationFromTo(vin[i].Normal, forward); q.getMatrix(lookat, center);
core::matrix4 m2; m2.setInverseTranslation(center); lookat *= m2;
Definition at line 448 of file quaternion.h.
459 dest[0] = 1.0f - 2.0f*
Y*
Y - 2.0f*
Z*
Z;
460 dest[1] = 2.0f*
X*
Y + 2.0f*
Z*
W;
461 dest[2] = 2.0f*
X*
Z - 2.0f*
Y*
W;
464 dest[4] = 2.0f*
X*
Y - 2.0f*
Z*
W;
465 dest[5] = 1.0f - 2.0f*
X*
X - 2.0f*
Z*
Z;
466 dest[6] = 2.0f*
Z*
Y + 2.0f*
X*
W;
469 dest[8] = 2.0f*
X*
Z + 2.0f*
Y*
W;
470 dest[9] = 2.0f*
Z*
Y - 2.0f*
X*
W;
471 dest[10] = 1.0f - 2.0f*
X*
X - 2.0f*
Y*
Y;
474 dest.setRotationCenter ( center, translation );
float f32
32 bit floating point variable.
GLdouble GLdouble GLdouble GLdouble q
f32 X
Quaternion elements.
quaternion()
Default Constructor.