modm API documentation
|
#include <modm/math/geometry/quaternion.hpp>
Public Member Functions | |
template<typename U > | |
Quaternion (const U *array) | |
Quaternion (T inW, T inX, T inY, T inZ) | |
Quaternion (const Vector< T, 3 > &axis, T angle) | |
Quaternion (const Matrix< T, 4, 1 > &rhs) | |
Quaternion (const Quaternion &rhs) | |
Quaternion & | operator= (const Matrix< T, 4, 1 > &rhs) |
Quaternion & | operator= (const Quaternion &rhs) |
bool | operator== (const Quaternion &rhs) const |
bool | operator!= (const Quaternion &rhs) const |
bool | operator< (const Quaternion &rhs) const |
bool | operator<= (const Quaternion &rhs) const |
bool | operator> (const Quaternion &rhs) const |
bool | operator>= (const Quaternion &rhs) const |
const T & | operator[] (int index) const |
T * | ptr () |
const T * | ptr () const |
Quaternion | operator- () |
Quaternion | operator+ (const Quaternion &rhs) const |
Quaternion | operator- (const Quaternion &rhs) const |
Quaternion | operator* (const Quaternion &rhs) const |
Quaternion | operator* (const T &rhs) const |
Quaternion | operator/ (const T &rhs) const |
Quaternion & | operator+= (const Quaternion &rhs) |
Quaternion & | operator-= (const Quaternion &rhs) |
Quaternion & | operator*= (const T &rhs) |
Quaternion & | operator/= (const T &rhs) |
float | getLength () const |
float | getLengthSquared () const |
Quaternion & | scale (float newLength) |
Quaternion & | normalize () |
Quaternion & | conjugate () |
Quaternion | scaled (float newLength) const |
Quaternion | normalized () const |
Quaternion | conjugated () const |
Quaternion | unitInverse () |
Quaternion | inverse () |
void | to4x4Matrix (Matrix< T, 4, 4 > *outMatrix) |
void | to3x3Matrix (Matrix< T, 3, 3 > *outMatrix) |
Public Attributes | |
T | w |
T | x |
T | y |
T | z |
Adapted from the implementation of Gaspard Petit (gaspardpetit@gmail.com).
Quaternion& modm::Quaternion< T >::normalize | ( | ) |
Rescale to length = 1
Quaternion modm::Quaternion< T >::normalized | ( | ) | const |
Return a new quaternion with the same direction by the length 1