Home | Download | Screen shots | Discussion | Documentation |
---|
Public Member Functions | |
quatf () throw () | |
Default constructor. | |
quatf (float x, float y, float z, float w) throw () | |
Construct from four values. | |
quatf (const float(&quat)[4]) throw () | |
Construct from an array of four values. | |
quatf (const rotation &rot) throw () | |
Construct from an rotation. | |
quatf (const mat4f &mat) throw () | |
Construct from a rotation matrix. | |
quatf & | operator *= (const quatf &quat) throw () |
Multiply by a quaternion. | |
quatf & | operator *= (float scalar) throw () |
Multiply by a scalar. | |
quatf & | operator/= (float scalar) throw () |
Divide by a scalar. | |
quatf & | operator+= (const quatf &quat) throw () |
Add a quaternion. | |
quatf & | operator-= (const quatf &quat) throw () |
Subtract a quaternion. | |
const float & | operator[] (size_t index) const throw () |
Array element dereference operator (const version). | |
float & | operator[] (size_t index) throw () |
Array element dereference operator (non-const version). | |
float | x () const throw () |
Get the x component. | |
float | y () const throw () |
Get the y component. | |
float | z () const throw () |
Get the z component. | |
float | w () const throw () |
Get the w component. | |
void | x (float value) throw () |
Set the x component. | |
void | y (float value) throw () |
Set the y component. | |
void | z (float value) throw () |
Set the z component. | |
void | w (float value) throw () |
Set the w component. | |
const quatf | conjugate () const throw () |
Get the conjugate. | |
const quatf | inverse () const throw () |
Get the inverse. | |
float | norm () const throw () |
Get the norm. | |
const quatf | normalize () const throw () |
Normalize the quaternion. | |
Private Attributes | |
float | quat [4] |
An array comprising the quaternion components. | |
Related Functions | |
(Note that these are not member functions.) | |
const quatf | operator * (const quatf &lhs, const quatf &rhs) throw() |
Multiply two quaternions. | |
const quatf | operator * (const quatf &quat, const float scalar) throw() |
Multiply a quaternion by a scalar. | |
const quatf | operator * (const float scalar, const quatf &quat) throw() |
Multiply a scalar by a quaternion. | |
const quatf | operator/ (const quatf &quat, const float scalar) throw() |
Divide a quaternion by a scalar. | |
const quatf | operator+ (const quatf &lhs, const quatf &rhs) throw() |
Add two quaternions. | |
const quatf | operator- (const quatf &lhs, const quatf &rhs) throw() |
Take the difference between two quaternions. | |
std::ostream & | operator<< (std::ostream &out, const quatf &quat) |
Stream output. | |
bool | operator== (const quatf &lhs, const quatf &rhs) throw() |
Compare for equality. | |
bool | operator!= (const quatf &lhs, const quatf &rhs) throw() |
Compare for inequality. |
|
Default constructor.
|
|
Construct from four values.
|
|
Construct from an array of four values.
|
|
Construct from an rotation.
|
|
Construct from a rotation matrix.
|
|
Multiply by a quaternion.
|
|
Multiply by a scalar.
|
|
Divide by a scalar.
|
|
Add a quaternion.
|
|
Subtract a quaternion.
|
|
Array element dereference operator (const version).
|
|
Array element dereference operator (non-const version).
|
|
Get the x component.
|
|
Get the y component.
|
|
Get the z component.
|
|
Get the w component.
|
|
Set the x component.
|
|
Set the y component.
|
|
Set the z component.
|
|
Set the w component.
|
|
Get the conjugate.
|
|
Get the inverse.
|
|
Get the norm.
|
|
Normalize the quaternion.
|
|
Multiply two quaternions.
|
|
Multiply a quaternion by a scalar.
|
|
Multiply a scalar by a quaternion.
|
|
Divide a quaternion by a scalar.
|
|
Add two quaternions.
|
|
Take the difference between two quaternions.
|
|
Stream output.
|
|
Compare for equality.
|
|
Compare for inequality.
|
|
An array comprising the quaternion components.
For internal use only.
|