Base Framework
|
#include <base/math/Quaternion.h>
Public Member Functions | |
Quaternion () noexcept | |
Quaternion (const Vector3D< TYPE > &xyz, const TYPE &_w) noexcept | |
Quaternion (const TYPE &x, const TYPE &y, const TYPE &z, const TYPE &w) noexcept | |
Quaternion (const Quaternion ©) noexcept | |
Quaternion & | operator= (const Quaternion &assign) noexcept |
TYPE | getX () const noexcept |
TYPE | getY () const noexcept |
TYPE | getZ () const noexcept |
TYPE | getW () const noexcept |
void | setX (const TYPE &x) noexcept |
void | setY (const TYPE &y) noexcept |
void | setZ (const TYPE &z) noexcept |
void | setW (const TYPE &w) noexcept |
Quaternion & | zeroAdjust (const TYPE &zero) noexcept |
bool | isZero () const noexcept |
bool | isProper () const noexcept |
Quaternion | plus () const noexcept |
Quaternion | minus () const noexcept |
Quaternion & | negate () noexcept |
Quaternion & | add (const Quaternion &value) noexcept |
Quaternion & | subtract (const Quaternion &value) noexcept |
Quaternion & | multiply (const TYPE &value) noexcept |
Quaternion & | divide (const TYPE &value) noexcept |
bool | operator== (const Quaternion &value) const noexcept |
Quaternion & | operator+= (const Quaternion &value) noexcept |
Quaternion & | operator-= (const Quaternion &value) noexcept |
Quaternion & | operator*= (const TYPE &value) noexcept |
Quaternion & | operator/= (const TYPE &value) noexcept |
Quaternion | operator+ () const noexcept |
Quaternion | operator- () const noexcept |
Protected Attributes | |
TYPE | x = 0 |
TYPE | y = 0 |
TYPE | z = 0 |
TYPE | w = 0 |
Related Functions | |
(Note that these are not member functions.) | |
template<class TYPE > | |
Quaternion< TYPE > | operator+ (const Quaternion< TYPE > &left, const Quaternion< TYPE > &right) noexcept |
template<class TYPE > | |
Quaternion< TYPE > | operator- (const Quaternion< TYPE > &left, const Quaternion< TYPE > &right) noexcept |
template<class TYPE > | |
Quaternion< TYPE > | operator* (const Quaternion< TYPE > &left, const TYPE &right) noexcept |
template<class TYPE > | |
Quaternion< TYPE > | operator* (const TYPE &left, const Quaternion< TYPE > &right) noexcept |
template<class TYPE > | |
Quaternion< TYPE > | operator/ (const Quaternion< TYPE > &left, const TYPE &right) noexcept |
template<class TYPE > | |
TYPE | dot (const Quaternion< TYPE > &left, const Quaternion< TYPE > &right) noexcept |
template<class TYPE > | |
FormatOutputStream & | operator<< (FormatOutputStream &stream, const Quaternion< TYPE > &value) |
|
inlinenoexcept |
Initializes quaternion as origin (0, 0, 0, 0).
|
inlinenoexcept |
Initializes quaternion from the specified coordinates.
xyz | The desired X, Y, Z coordinates. |
w | The desired W coordinate. |
|
inlinenoexcept |
Initializes quaternion from the specified coordinates.
x | The desired X coordinate. |
y | The desired Y coordinate. |
z | The desired Z coordinate. |
w | The desired W coordinate. |
|
inlinenoexcept |
Initializes quaternion by copying from other quaternion.
copy | The desired quaternion. |
|
inlinenoexcept |
Adds the specified quaternion to this quaternion.
|
inlinenoexcept |
Divides this quaternion with the specified value.
|
inlinenoexcept |
Returns the W coordinate of the quaternion.
|
inlinenoexcept |
Returns the X coordinate of the quaternion.
|
inlinenoexcept |
Returns the Y coordinate of the quaternion.
|
inlinenoexcept |
Returns the Z coordinate of the quaternion.
|
inlinenoexcept |
Returns true if the length of this quaternion is greater zero.
|
inlinenoexcept |
Returns true if the length of this quaternion is zero.
|
inlinenoexcept |
Unary minus.
|
inlinenoexcept |
Multiplies this quaternion with the specified value.
|
inlinenoexcept |
Negates the quaternion.
|
inlinenoexcept |
Multiplies this quaternion with the specified value.
value | The multiplicator. |
|
inlinenoexcept |
Unary plus.
|
inlinenoexcept |
Adds the specified quaternion to this quaternion.
value | The value to be added. |
|
inlinenoexcept |
Unary minus.
|
inlinenoexcept |
Subtracts the specified quaternion from this quaternion.
value | The value to be subtracted. |
|
inlinenoexcept |
Divides this quaternion with the specified value.
value | The divisor. |
|
inlinenoexcept |
Assignment of quaternion to quaternion.
|
inlinenoexcept |
Returns true if the quaternions are equal.
value | Quaternion to be compared. |
|
inlinenoexcept |
Unary plus.
|
inlinenoexcept |
Sets the W coordinate of the quaternion.
w | The desired W coordinate. |
|
inlinenoexcept |
Sets the X coordinate of the quaternion.
x | The desired X coordinate. |
|
inlinenoexcept |
Sets the Y coordinate of the quaternion.
y | The desired Y coordinate. |
|
inlinenoexcept |
Sets the Z coordinate of the quaternion.
z | The desired Z coordinate. |
|
inlinenoexcept |
Subtracts the specified quaternion from this quaternion.
|
inlinenoexcept |
Sets values less than the specified value to zero.
|
related |
Returns the dot product of the two quaternions.
|
related |
Returns the product of the quaternion and the value.
|
related |
Returns the product of the quaternion and the value.
|
related |
Returns the sum of the quaternion.
|
related |
Returns the difference of the quaternion.
|
related |
Returns the result of the quaternion divided by the value.
|
related |
Writes a string representation of a Quaternion object to a format stream. The format is "(x; y; z; w)".
|
protected |
w coordinate.
|
protected |
X coordinate.
|
protected |
Y coordinate.
|
protected |
Z coordinate.