vmmlib
1.11.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 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) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Quaternion &q) |
Definition at line 49 of file quaternion.hpp.
bool vmml::Quaternion< T >::equals | ( | const Quaternion< T > & | other, |
T | tolerance = std::numeric_limits< T >::epsilon( ) |
||
) | const |
Definition at line 272 of file quaternion.hpp.
Matrix< 3, 3, T > vmml::Quaternion< T >::getRotationMatrix | ( | ) | const |
Definition at line 447 of file quaternion.hpp.
Referenced by vmml::Matrix< R, C, T >::Matrix().
Quaternion< T > vmml::Quaternion< T >::inverse | ( | ) | const |
Definition at line 309 of file quaternion.hpp.
bool vmml::Quaternion< T >::operator!= | ( | const Quaternion< T > & | a | ) | const |
Definition at line 288 of file quaternion.hpp.
Quaternion< T > vmml::Quaternion< T >::operator- | ( | ) | const |
Definition at line 384 of file quaternion.hpp.
bool vmml::Quaternion< T >::operator== | ( | const Quaternion< T > & | a | ) | const |
Definition at line 281 of file quaternion.hpp.