|
QSDK 1.1 Documentation |
#include <Q/maths.h>
Public Member Functions | |
| Quat4f () | |
| Quat4f (float v) | |
| Quat4f (const Quat4f &q) | |
| Quat4f (const Vec4f &v) | |
| Quat4f (float x1, float y1, float z1, float w1) | |
| Quat4f (const Vec3f &axis, float angle) | |
| Quat4f (const Vec3f &) | |
| Quat4f (const Matrix3f &m) | |
| Quat4f (const Vec3f &dir, const Vec3f &up) | |
| Quat4f (const Matrix4f &m, bool normalise=false) | |
| Quat4f (const Affine4f &m, bool normalise=false) | |
| void | setIdentity () |
| void | setRotation (const Vec3f &axis, float angle) |
| void | setRotation (const Vec3f &direction, const Vec3f &up) |
| void | setMatrix (const Matrix3f &m, bool normalise=false) |
| void | addRotation (const Vec3f &axis, float angle) |
| bool | isIdentity () const |
| void | mult (float) |
| void | mult (const Quat4f &q) |
| void | imult (const Quat4f &q) |
| void | mult (const Quat4f &a, const Quat4f &b) |
| void | getDirection (Vec3f &dir) const |
| void | getUpVector (Vec3f &up) const |
| void | getAxis (Vec3f &axis) const |
| Quat4f & | operator *= (const Quat4f &q) |
| Quat4f & | operator *= (float v) |
| Vec3f | up () const |
| Vec3f | direction () const |
| Quat4f | invert () const |
| Vec3f | axis () const |
| float | angle () const |
| bool | equal (const Quat4f &v, float e=Epsilon) const |
Protected Member Functions | |
| Vec3f & | vec3 () |
| const Vec3f & | vec3 () const |
Friends | |
| Quat4f | operator * (const Quat4f &a, const Quat4f &b) |
| Quat4f | interpolate (float t, const Quat4f &a, const Quat4f &b) |
| Quat4f | sInterpolate (float t, const Quat4f &a, const Quat4f &b) |
|
|
Build an uninitialised quaternion. |
|
|
Initialise all elements of the quaternion to v. |
|
|
Copy the value of q into this quaternion. |
|
|
Copy the values held in v into this quaterion. |
|
||||||||||||||||||||
|
Write the values of the quaternion directly. |
|
||||||||||||
|
Build a quaternion from a unit direction vector and a rotation angle about that vector. |
|
|
Build a quaternion from a unit direction vector and a rotation angle specified by the modulus of the vector. |
|
|
Build a quaternion from a rotation matrix. The matrix should be orthonormal and not contain any scale. |
|
||||||||||||
|
Build a quaternion from a direction vector and an up vector. The vectors do not need to be normalized or orthogonal. The up vector will be adjusted within the plane of the two vectors to be orthogonal to the direction vector. The result is undefined if the two vectors are parallel. |
|
||||||||||||
|
Build a quaternion from a matrix. If the matrix contains scale then normalise should be set to true. |
|
||||||||||||
|
Build a quaternion from a matrix. If the matrix contains scale then normalise should be set to true. |
|
||||||||||||
|
Create a temporary quaternion from an axis and an angle and multiply the quaternion by it. |
|
|
Return the angle part of the quaternion. |
|
|
Return the axis part of the quaternion. |
|
|
Return the direction vector represented by the vector. |
|
||||||||||||
|
Return true if v represents the same rotation as this quaternion, with an error of e. This method expects unit quaternions. |
|
|
Get the axis part of the quaternion. |
|
|
Get the direction vector represented by the quaternion. |
|
|
Get the up vector represented by the quaternion. |
|
|
Set the quaternion to be q rotated by the quaternion. |
|
|
Return the inverse quaternion. This does not modify the existing quaternion. This method expects unit quaternions. |
|
|
Return true if the quaternion is the identity quaternion. |
|
||||||||||||
|
Set the quaternion to be a rotated by b |
|
|
Rotate the quaternion by the quaternion q |
|
|
Scale the quaternion by the value. |
|
|
Scale the quaternion by and return the answer. |
|
|
Rotate the quaternion by q and return the answer. |
|
|
Set the quaternion to the identity quaternion. |
|
||||||||||||
|
Set the quaternion to the value represented by a matrix. If the matrix contains scale then normalise should be set to true. |
|
||||||||||||
|
Set the quaternion to the value represented by a direction vector and an up vector. The vectors do not need to be normalized or orthogonal. The up vector will be adjusted within the plane of the two vectors to be orthogonal to the direction vector. The result is undefined if the two vectors are parallel. |
|
||||||||||||
|
Set the quaternion to the value represented by a unit direction vector and a rotation angle about that vector. |
|
|
Return the up vector represented by the vector. |
|
||||||||||||||||
|
Linearly interpolate between a and b. This method is faster than sInterpolate, but less accurate and does not conserve the normality of the quaternions. For reasonable accuracy, the quaternions should not be too dissimilar. In particular, interpolation between a quaternion and its inverse should be avoided. t should be in the range [0, 1]. If t is 0 then a is returned and if t is 1 then b is returned. This method expects unit quaternions. |
|
||||||||||||
|
Return the rotation of a by b. |
|
||||||||||||||||
|
Spherical linear interpolate between a and b. t should be in the range [0, 1]. If t is 0 then a is returned and if t is 1 then b is returned. Interpolation between a quaternion and its inverse is handled without singularity. This method expects unit quaternions. |
|
|
|
Qube Software Limited © 2000-2004
|
|