|
| rotator () |
| Default no-op. More...
|
|
| rotator (const rotator &r) |
| Copy constructor. More...
|
|
| rotator (const vec3 &axis, real rads) |
| Defines a rotation about the given axis. More...
|
|
| rotator (real x, real y, real z, real w) |
| Defines a rotator by the given quaternion values. More...
|
|
| rotator (const vec3 &from, const vec3 &to) |
| Defines the rotation which transforms normalized vectors `from' to `to' rotating about their cross product. More...
|
|
| rotator (real yaw, real pitch, real roll) |
| Defines a rotation from Euler angles: yaw = Z-axis rotation, pitch = X-axis rotation, roll = Y-axis rotation. More...
|
|
| rotator (real m00, real m01, real m02, real m10, real m11, real m12, real m20, real m21, real m22) |
| Defines a rotation from the significant 3x3 components of a 4x4 rotation matrix. More...
|
|
| rotator (vec3 row1, vec3 col1, vec3 row2, vec3 col2) |
|
void | setAxis (const vec3 &axis, real rads) |
| Set the rotator to represent a rotation of `rads' radians around `axis'. More...
|
|
void | set (const rotator &r) |
| Copy the values of `r' into `this'. More...
|
|
void | set (real ry, real rz, real rw) |
| sets parameters given the normalized quaternion components More...
|
|
void | set (real rx, real ry, real rz, real rw) |
| Sets all parameters to those provided. More...
|
|
real | w () const |
|
real | x () const |
|
real | y () const |
|
real | z () const |
|
real | getPitch () const |
| Get the pitch angle (x-axis rotation in radians) More...
|
|
real | getYaw () const |
| Get the yaw angle (z-axis rotation in radians) More...
|
|
real | getRoll () const |
| Get the roll angle (y-axis rotation in radians) More...
|
|
vec3 | operator* (const vec3 &v) const |
| Rotate `v' according to this rotator's parameters. More...
|
|
vec3 | operator/ (const vec3 &v) const |
|
rotator | operator* (const rotator &r) const |
| Returns a rotator representing the rotation `r' followed by `this'. More...
|
|
rotator | operator* (real r) const |
|
rotator | operator+ (const rotator &r) const |
|
rotator | operator- (const rotator &r) const |
|
rotator | operator- () const |
|
bool | operator== (const rotator &v) const |
|
bool | operator!= (const rotator &v) const |
|
rotator | conjugate () const |
|
real | len () const |
|
real | dot (const rotator &r) const |
|
rotator | norm () const |
|
void | normThis () |
|
rotator | inverse () const |
| Returns a rotator representing the opposite rotation. More...
|
|
rotator | interpolate (real val, const rotator &r) const |
| Semi-linearly interpolates between `this' and `r', this varies from a circular interpolation but is faster. More...
|
|
void | toMatrix (real *mat) const |
|
mat4 | toMatrix () const |
|
i32 | hash () const |
|
Quaternion rotator (see http://3dengine.org/Quaternions, http://www.cprogramming.com/tutorial/3d/quaternions.html)
Quaternions represent abitrary affine rotations, usually described as rotations about an given axis vector. The advantage over matrices for rotations is fewer floating point calculations and avoidance of gimbal lock. Note the lack of virtual members implies no vtable pointer.