vmmlib
1.13.0
Templatized C++ vector and matrix math library
|
Public Member Functions | |
Quaternion () | |
Construct an identity quaternion. | |
Quaternion (T x, T y, T z, T w) | |
Quaternion (T angle, vector< 3, T > axis) | |
Construct a rotation quaternion. | |
template<size_t M> | |
Quaternion (const Matrix< M, M, T > &rotation_matrix_, typename std::enable_if< M >=3 >::type *=0) | |
void | normalize () |
Quaternion & | operator= (const Quaternion &other) |
Data Access | |
bool | equals (const Quaternion &other, T tolerance=std::numeric_limits< T >::epsilon()) const |
T | x () const |
T | y () const |
T | z () const |
T | w () const |
bool | operator== (const Quaternion &a) const |
bool | operator!= (const Quaternion &a) const |
Quaternion | operator- () const |
Quaternion | inverse () const |
Quaternion | getConjugate () const |
T | abs () const |
T | absSquare () const |
Matrix< 3, 3, T > | getRotationMatrix () const |
quaternion/quaternion operations | |
Quaternion | operator+ (const Quaternion< T > &a) const |
Quaternion | operator- (const Quaternion< T > &a) const |
Quaternion | operator* (const Quaternion< T > &a) const |
void | operator+= (const Quaternion< T > &a) |
void | operator-= (const Quaternion< T > &a) |
void | operator*= (const Quaternion< T > &a) |
quaternion/scalar operations | |
Quaternion | operator* (T a) const |
Quaternion | operator/ (T a) const |
void | operator*= (T a) |
void | operator/= (T a) |
Public Attributes | |
T | array [4] |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Quaternion &q) |
Definition at line 50 of file quaternion.hpp.
bool vmml::Quaternion< T >::equals | ( | const Quaternion< T > & | other, |
T | tolerance = std::numeric_limits<T>::epsilon() |
||
) | const |
Definition at line 274 of file quaternion.hpp.
Referenced by vmml::Quaternion< T >::Quaternion().
Matrix< 3, 3, T > vmml::Quaternion< T >::getRotationMatrix | ( | ) | const |
Definition at line 457 of file quaternion.hpp.
Referenced by vmml::Matrix< R, C, T >::Matrix(), and vmml::Quaternion< T >::Quaternion().
Quaternion< T > vmml::Quaternion< T >::inverse | ( | ) | const |
Definition at line 315 of file quaternion.hpp.
References vmml::Quaternion< T >::operator-(), and vmml::Quaternion< T >::Quaternion().
Referenced by vmml::Quaternion< T >::Quaternion().
bool vmml::Quaternion< T >::operator!= | ( | const Quaternion< T > & | a | ) | const |
Definition at line 290 of file quaternion.hpp.
References vmml::Quaternion< T >::operator==().
Referenced by vmml::Quaternion< T >::Quaternion().
Quaternion< T > vmml::Quaternion< T >::operator- | ( | ) | const |
Definition at line 392 of file quaternion.hpp.
References vmml::Quaternion< T >::Quaternion().
Referenced by vmml::Quaternion< T >::inverse(), and vmml::Quaternion< T >::Quaternion().
bool vmml::Quaternion< T >::operator== | ( | const Quaternion< T > & | a | ) | const |
Definition at line 283 of file quaternion.hpp.
Referenced by vmml::Quaternion< T >::operator!=(), and vmml::Quaternion< T >::Quaternion().