Class for working with quaternions. More...
Public Types | |
| typedef comms::cQuat | quat_t |
Public Member Functions | |
| Quat () | |
| Constructor for building a zero quaternion. | |
| operator Mat3 () const | |
Ability for converting Quat to Mat3. More... | |
| operator Mat4 () const | |
Ability for converting Quat to Mat4. More... | |
| operator std::string () const | |
Ability for converting Quat to string. More... | |
| bool | operator== (const Quat &b) const |
| Comparison. More... | |
| bool | normalized () const |
Returns TRUE then the quaternion is normalized. More... | |
| bool | zero () const |
Returns TRUE then the all values of the quaternion is zero. | |
| Quat & | operator() (int i, float v) |
| Setter like array. [ 0 ] is x[ 1 ] is y[ 2 ] is z[ 3 ] is w. More... | |
| float | operator() (int i) const |
| Getter like array. More... | |
| Quat & | x (const float &value) |
Setter for x. More... | |
| float | x () const |
Getter for x. More... | |
| Quat & | y (const float &value) |
Setter for y. More... | |
| float | y () const |
Getter for y. More... | |
| Quat & | z (const float &value) |
Setter for z. More... | |
| float | z () const |
Getter for z. More... | |
| Quat & | w (const float &value) |
Setter for w. More... | |
| float | w () const |
Getter for w. More... | |
| Quat | operator- () const |
| Negation operator. More... | |
| Quat & | operator+= (const Quat &b) |
| Quat & | operator-= (const Quat &b) |
| Quat & | operator*= (const Quat &b) |
| Quat & | operator*= (const float &k) |
| Quat & | operator/= (const Quat &b) |
| Quat & | operator/= (const float &k) |
| Quat | operator+ (const Quat &b) const |
| Quat | operator- (const Quat &b) const |
| Quat | operator* (const Quat &b) const |
| Quat | operator* (const float &k) const |
| Quat | operator/ (const Quat &b) const |
| Quat | operator/ (const float &k) const |
| float | dot (const Quat &b) const |
| Returns a dot product. More... | |
| float | length () const |
| Returns an Euclidean length. More... | |
| float | lengthSquared () const |
| Returns a squared Euclidean length. More... | |
| Quat & | calcW () |
Recalculates w by current xyz. More... | |
| Quat | calcWCopy () const |
| Quat & | compress () |
Set w to 0.0. Change signs of x, y, z if w was less zero. More... | |
| Quat | compressCopy () const |
| Quat & | conjugate () |
| Conjugates the quaternion. More... | |
| Quat | conjugateCopy () const |
| Quat & | exp () |
| Calculates an exponential. More... | |
| Quat | expCopy () const |
| Quat & | invert () |
| Inverts the quaternion. More... | |
| Quat | invertCopy () const |
| Quat & | lerp (const Quat &b, float s) |
| Interpolates between quaternions, using linear interpolation. More... | |
| Quat | lerpCopy (const Quat &b, float s) const |
| Quat & | ln () |
| Calculates a natural logarithm. More... | |
| Quat | lnCopy () const |
| Quat & | normalize () |
| Normalize the quaternion. More... | |
| Quat | normalizeCopy () const |
| Quat & | slerp (const Quat &b, float s) |
| Interpolates between vectors, using spherical linear interpolation. More... | |
| Quat | slerpCopy (const Quat &b, float s) const |
| coat::scripto::Quat::operator Mat3 | ( | ) | const |
| coat::scripto::Quat::operator Mat4 | ( | ) | const |
| coat::scripto::Quat::operator std::string | ( | ) | const |
|
inline |
|
inline |
Returns TRUE then the quaternion is normalized.
|
inline |
Setter like array.
[ 0 ] is x
[ 1 ] is y
[ 2 ] is z
[ 3 ] is w
.
|
inline |
|
inline |
|
inline |
|
inline |
Setter for y.
|
inline |
Setter for z.
|
inline |
Setter for w.
|
inline |
|
inline |
Returns a dot product.
|
inline |
|
inline |
|
inline |
Recalculates w by current xyz.
|
inline |
Set w to 0.0. Change signs of x, y, z if w was less zero.
|
inline |
|
inline |
Conjugates the quaternion.
|
inline |
|
inline |
Interpolates between quaternions, using linear interpolation.
|
inline |
Calculates a natural logarithm.
|
inline |
|
inline |
Interpolates between vectors, using spherical linear interpolation.