![]() |
Classes | |
class | blaze::Quaternion< Type > |
Efficient implementation of a quaternion.Quaternions are a superior way to deal with rotations and orientations. This quaternion consists of 4 statically allocated elements, where the first element represents the real part and the three other elements represent the three imaginary parts. The naming convention of the elements is as following: More... | |
Typedefs | |
typedef Quaternion< real > | blaze::Quat |
Quaternion of real type. | |
Quaternion operators | |
template<typename T1 , typename T2 > | |
bool | blaze::operator== (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs) |
Equality operator for the comparison of two quaternions. | |
template<typename T1 , typename T2 > | |
bool | blaze::operator!= (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs) |
Inequality operator for the comparison of two quaternions. | |
template<typename Type > | |
std::ostream & | blaze::operator<< (std::ostream &os, const Quaternion< Type > &q) |
Global output operator for quaternions. | |
template<typename Type > | |
std::istream & | blaze::operator>> (std::istream &is, Quaternion< Type > &q) |
Global input operator for quaternions. | |
template<typename Type > | |
bool | blaze::isnan (const Quaternion< Type > &q) |
Checks the given quaternion for not-a-number elements. | |
template<typename Type > | |
void | blaze::reset (Quaternion< Type > &q) |
Resetting the given quaternion. | |
template<typename Type > | |
void | blaze::clear (Quaternion< Type > &q) |
Clearing the given quaternion. | |
template<typename Type > | |
bool | blaze::isDefault (const Quaternion< Type > &q) |
Returns whether the given quaternion is in default state. | |
template<typename Type > | |
const Quaternion< Type > | blaze::inv (const Quaternion< Type > &q) |
Inverting the given quaternion ( ![]() | |
template<typename Type > | |
const Quaternion< Type > | blaze::sq (const Quaternion< Type > &q) |
Squaring the given quaternion. | |
template<typename Type > | |
void | blaze::swap (Quaternion< Type > &a, Quaternion< Type > &b) |
Swapping the contents of two quaternions. | |
Quaternion arithmetic operators | |
template<typename T1 , typename T2 > | |
const Quaternion< typename MultTrait< T1, T2 >::Type > | blaze::operator* (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs) |
Multiplication operator for the multiplication of two quaternions ( ![]() | |
|
inline |
Clearing the given quaternion.
q | The quaternion to be cleared. |
Clearing a quaternion is equivalent to resetting it via the reset() function.
|
inline |
Inverting the given quaternion ( ).
q | The quaternion to be inverted. |
This function returns the inverse of the given quaternion.
|
inline |
Returns whether the given quaternion is in default state.
q | The quaternion to be tested for its default state. |
The function returns true in case the real part of the quaternion is 1 and the imaginary parts are 0, otherwise it returns false.
|
inline |
Checks the given quaternion for not-a-number elements.
q | The quaternion to be checked for not-a-number elements. |
|
inline |
Inequality operator for the comparison of two quaternions.
lhs | The left-hand side quaternion for the comparison. |
rhs | The right-hand side quaternion for the comparison. |
|
inline |
Multiplication operator for the multiplication of two quaternions ( ).
lhs | The left-hand side quaternion for the multiplication. |
rhs | The right-hand side quaternion for the multiplication. |
std::ostream & blaze::operator<< | ( | std::ostream & | os, |
const Quaternion< Type > & | q | ||
) |
Global output operator for quaternions.
os | Reference to the output stream. |
q | Reference to a constant quaternion object. |
|
inline |
Equality operator for the comparison of two quaternions.
lhs | The left-hand side quaternion for the comparison. |
rhs | The right-hand side quaternion for the comparison. |
std::istream & blaze::operator>> | ( | std::istream & | is, |
Quaternion< Type > & | q | ||
) |
Global input operator for quaternions.
is | Reference to the input stream. |
q | Reference to a quaternion object. |
|
inline |
Resetting the given quaternion.
q | The quaternion to be resetted. |
|
inline |
Squaring the given quaternion.
q | The quaternion to be squared. |
This function squares the given quaternion q. This function has the same effect as multiplying the quaternion with itself ( ).
|
inline |
Swapping the contents of two quaternions.
a | The first quaternion to be swapped. |
b | The second quaternion to be swapped. |
no-throw | guarantee. |