vmmlib  1.8.0
Templatized C++ vector and matrix math library
 All Classes Namespaces Files Functions Variables Typedefs Pages
vmml::quaternion< T > Class Template Reference
+ Inheritance diagram for vmml::quaternion< T >:
+ Collaboration diagram for vmml::quaternion< T >:

Public Types

typedef vector< 4, T > super
 

Public Member Functions

 quaternion (T x, T y, T z, T w)
 
 quaternion (const vector< 3, T > &xyz, T w)
 
 quaternion (const vector< 3, T > &xyz)
 
template<size_t M>
 quaternion (const matrix< M, M, T > &rotation_matrix_, typename enable_if< M >=3 >::type *=0)
 
void zero ()
 
void identity ()
 
template<size_t D>
void set (const matrix< D, D, T > &rotation_matrix_)
 
void set (T ww, T xx, T yy, T zz)
 
void set (vector< 3, T > &xyz, T w)
 
template<typename input_iterator_t >
void set (input_iterator_t begin_, input_iterator_t end_)
 
bool operator== (const T &a) const
 
bool operator!= (const T &a) const
 
bool operator== (const quaternion &a) const
 
bool operator!= (const quaternion &a) const
 
bool operator== (const vector< 4, T > &a) const
 
bool operator!= (const vector< 4, T > &a) const
 
bool is_akin (const quaternion &a, const T &delta=std::numeric_limits< T >::epsilon())
 
void conjugate ()
 
quaternion get_conjugate () const
 
abs () const
 
squared_abs () const
 
normalize ()
 
quaternion get_normalized () const
 
quaternion negate () const
 
quaternion operator- () const
 
quaternionoperator= (const quaternion &other)
 
const vector< 4, T > & operator= (const vector< 4, T > &other)
 
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 operator* (T a) const
 
quaternion operator/ (T a) const
 
void operator*= (T a)
 
void operator/= (T a)
 
quaternion operator+ (const vector< 3, T > &a) const
 
quaternion operator- (const vector< 3, T > &a) const
 
quaternion operator* (const vector< 3, T > &a) const
 
void operator+= (const vector< 3, T > &a)
 
void operator-= (const vector< 3, T > &a)
 
void operator*= (const vector< 3, T > &a)
 
vector< 3, T > cross (const quaternion< T > &b) const
 
dot (const quaternion< T > &a) const
 
quaternion inverse ()
 
void normal (const quaternion &aa, const quaternion &bb, const quaternion &cc, const quaternion &dd)
 
quaternion normal (const quaternion &aa, const quaternion &bb, const quaternion &cc)
 
void rotate (T theta, const vector< 3, T > &a)
 
quaternion rotate (T theta, vector< 3, T > &axis, const vector< 3, T > &a)
 
quaternion rotate_x (T theta, const vector< 3, T > &a)
 
quaternion rotate_y (T theta, const vector< 3, T > &a)
 
quaternion rotate_z (T theta, const vector< 3, T > &a)
 
matrix< 3, 3, T > get_rotation_matrix () const
 
template<size_t D>
void get_rotation_matrix (matrix< D, D, T > &result) const
 

Static Public Member Functions

static T dot (const quaternion< T > &a, const quaternion< T > &b)
 
static quaternion slerp (T a, const quaternion &p, const quaternion &q, const T epsilon=1e-13)
 

Static Public Attributes

static const quaternion IDENTITY
 
static const quaternion QUATERI
 
static const quaternion QUATERJ
 
static const quaternion QUATERK
 

Friends

std::ostream & operator<< (std::ostream &os, const quaternion &q)
 

Detailed Description

template<typename T>
class vmml::quaternion< T >

Definition at line 61 of file quaternion.hpp.


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