modm API documentation
modm::Quaternion< T > Class Template Reference

Quaternion. More...

#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

w
 
x
 
y
 
z
 

Detailed Description

template<class T>
class modm::Quaternion< T >

Quaternion.

Adapted from the implementation of Gaspard Petit (gaspardpetit@gmail.com).

See also
<a href"http://www-etud.iro.umontreal.ca/~petitg/cpp/quat.html">Homepage
Author
Fabian Greif

Member Function Documentation

template<class T >
Quaternion& modm::Quaternion< T >::normalize ( )

Rescale to length = 1

template<class T >
Quaternion modm::Quaternion< T >::normalized ( ) const

Return a new quaternion with the same direction by the length 1


The documentation for this class was generated from the following file: