Cyclone | Cyclone: cyclone::Quaternion Class Reference |
#include <core.h>
Public Member Functions | |
Quaternion () | |
The default constructor creates a quaternion representing a zero rotation. | |
Quaternion (const real r, const real i, const real j, const real k) | |
The explicit constructor creates a quaternion with the given components. | |
void | normalise () |
Normalises the quaternion to unit length, making it a valid orientation quaternion.QuatNormalise. | |
void | operator *= (const Quaternion &multiplier) |
Multiplies the quaternion by the given quaternion.QuatCombine. | |
void | addScaledVector (const Vector3 &vector, real scale) |
Adds the given vector to this, scaled by the given amount.QuatUpdateByVel. | |
void | rotateByVector (const Vector3 &vector) |
>QuatRotByVector QuatRotByVector >Quaternion;QuaternionIntro |
/<QuaternionIntro;Quaternion
Quaternions have several mathematical properties that make them useful for representing orientations, but require four items of data to hold the three degrees of freedom. These four items of data can be viewed as the coefficients of a complex number with three imaginary parts. The mathematics of the quaternion is then defined and is roughly correspondent to the math of 3D rotations. A quaternion is only a valid rotation if it is normalised: i.e. it has a length of 1.
|
The default constructor creates a quaternion representing a zero rotation.
|
|
The explicit constructor creates a quaternion with the given components.
|
|
Adds the given vector to this, scaled by the given amount.QuatUpdateByVel. This is used to update the orientation quaternion by a rotation and time.
|
|
Normalises the quaternion to unit length, making it a valid orientation quaternion.QuatNormalise.
|
|
Multiplies the quaternion by the given quaternion.QuatCombine.
|
|
>QuatRotByVector QuatRotByVector >Quaternion;QuaternionIntro
|
|
Holds the quaternion data in array form.
|
|
Holds the first complex component of the quaternion.
|
|
Holds the second complex component of the quaternion.
|
|
Holds the third complex component of the quaternion.
|
|
Holds the real component of the quaternion.
|
© 2000-2003 Icosagon. All Rights Reserved.
Distributed under licence.
Cyclone Version 2.0.5 (Documentation generated Fri Nov 10 20:44:21 2006). |