Public Member Functions | Public Attributes

Quaternion< Real > Class Template Reference

#include <Mathlib.h>

Collaboration diagram for Quaternion< Real >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Quaternion ()
 Quaternion (Real w, Real x, Real y, Real z)
void identity ()
void normalize ()
void computeW ()
void rotate (Vector3< Real > &v) const
void fromMatrix (const Matrix4x4< Real > &m)
void fromEulerAngles (Real x, Real y, Real z)
void toEulerAngles (Real &x, Real &y, Real &z) const
Real rotationAngle () const
Vector3< Real > rotationAxis () const
Quaternion< Real > operator+ (const Quaternion< Real > &q) const
Quaternion< Real > & operator+= (const Quaternion< Real > &q)
Quaternion< Real > operator- (const Quaternion< Real > &q) const
Quaternion< Real > & operator-= (const Quaternion< Real > &q)
Quaternion< Real > operator* (const Quaternion< Real > &q) const
Quaternion< Real > & operator*= (const Quaternion< Real > &q)
Quaternion< Real > operator* (Real k) const
Quaternion< Real > & operator*= (Real k)
Quaternion< Real > operator* (const Vector3< Real > &v) const
Quaternion< Real > & operator*= (const Vector3< Real > &v)
Quaternion< Real > operator/ (Real k) const
Quaternion< Real > & operator/= (Real k)
Quaternion< Real > operator~ () const
Quaternion< Real > operator- () const

Public Attributes

union {
   struct {
      Real   _w
      Real   _x
      Real   _y
      Real   _z
   } 
   Real   _q [4]
}; 

Detailed Description

template<typename Real>
class Quaternion< Real >

Definition at line 310 of file Mathlib.h.


Constructor & Destructor Documentation

template<typename Real>
Quaternion< Real >::Quaternion (  )  [inline]

Definition at line 314 of file Mathlib.h.

template<typename Real>
Quaternion< Real >::Quaternion ( Real  w,
Real  x,
Real  y,
Real  z 
) [inline]

Definition at line 315 of file Mathlib.h.


Member Function Documentation

template<typename Real>
void Quaternion< Real >::identity (  ) 
template<typename Real>
void Quaternion< Real >::normalize (  ) 
template<typename Real>
void Quaternion< Real >::computeW (  ) 
template<typename Real>
void Quaternion< Real >::rotate ( Vector3< Real > &  v  )  const
template<typename Real>
void Quaternion< Real >::fromMatrix ( const Matrix4x4< Real > &  m  ) 
template<typename Real>
void Quaternion< Real >::fromEulerAngles ( Real  x,
Real  y,
Real  z 
)
template<typename Real>
void Quaternion< Real >::toEulerAngles ( Real &  x,
Real &  y,
Real &  z 
) const
template<typename Real>
Real Quaternion< Real >::rotationAngle (  )  const
template<typename Real>
Vector3<Real> Quaternion< Real >::rotationAxis (  )  const
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator+ ( const Quaternion< Real > &  q  )  const
template<typename Real>
Quaternion<Real>& Quaternion< Real >::operator+= ( const Quaternion< Real > &  q  ) 
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator- ( const Quaternion< Real > &  q  )  const
template<typename Real>
Quaternion<Real>& Quaternion< Real >::operator-= ( const Quaternion< Real > &  q  ) 
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator* ( const Quaternion< Real > &  q  )  const
template<typename Real>
Quaternion<Real>& Quaternion< Real >::operator*= ( const Quaternion< Real > &  q  ) 
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator* ( Real  k  )  const
template<typename Real>
Quaternion<Real>& Quaternion< Real >::operator*= ( Real  k  ) 
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator* ( const Vector3< Real > &  v  )  const
template<typename Real>
Quaternion<Real>& Quaternion< Real >::operator*= ( const Vector3< Real > &  v  ) 
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator/ ( Real  k  )  const
template<typename Real>
Quaternion<Real>& Quaternion< Real >::operator/= ( Real  k  ) 
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator~ (  )  const
template<typename Real>
Quaternion<Real> Quaternion< Real >::operator- (  )  const

Member Data Documentation

template<typename Real>
Real Quaternion< Real >::_w

Definition at line 369 of file Mathlib.h.

template<typename Real>
Real Quaternion< Real >::_x

Definition at line 369 of file Mathlib.h.

template<typename Real>
Real Quaternion< Real >::_y

Definition at line 369 of file Mathlib.h.

template<typename Real>
Real Quaternion< Real >::_z

Definition at line 369 of file Mathlib.h.

template<typename Real>
Real Quaternion< Real >::_q[4]

Definition at line 372 of file Mathlib.h.

union { ... }

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