public

Inheritance Graph

graph BT
	_Quaternion
	click _Quaternion "classGeometry_1_1__Quaternion"

Description

Class used to represent a rotation as a quaternion.

Author: Benjamin Eikel

Date: 2009-12-13

Rotation

   
   
void makeRotate(const angle_t & angle, value_t _x, value_t _y, value_t _z)
   
void makeRotate(const angle_t & angle, const vec3_t & axis)
   
void makeRotate_deg( value_t deg, value_t _x, value_t _y, value_t _z)
   
void makeRotate_deg( value_t deg, const vec3_t & axis)
   
void makeRotate_rad( value_t rad, value_t _x, value_t _y, value_t _z)
   
void makeRotate_rad( value_t rad, const vec3_t & axis)
   
  _Quaternion(const angle_t & rotX, const angle_t & rotY, const angle_t & rotZ)

Serialization

 
 
 

Public Types

   
   
typedef T value_t
   
typedef _Angle < value_t > angle_t
   
typedef _Vec3 < value_t > vec3_t
   
typedef _Quaternion < value_t > quaternion_t
   
typedef _Matrix3x3 < value_t > matrix3x3_t

Public Functions

   
   
  _Quaternion()
   
  _Quaternion( value_t _x, value_t _y, value_t _z, value_t _w)
   
  _Quaternion(const value_t * v)
   
bool operator==(const quaternion_t & other) const
   
bool operator!=(const quaternion_t & other) const
   
void set( value_t _x, value_t _y, value_t _z, value_t _w)
   
value_t & operator[](int i)
   
value_t operator[](int i) const
   
value_t & x()
   
value_t & y()
   
value_t & z()
   
value_t & w()
   
value_t x() const
   
value_t y() const
   
value_t z() const
   
value_t w() const
   
const quaternion_t operator*( value_t factor) const
   
quaternion_t & operator*=( value_t factor)
   
const quaternion_t operator/( value_t divisor) const
   
quaternion_t & operator/=( value_t divisor)
   
const quaternion_t operator*(const quaternion_t & q2) const
   
quaternion_t operator*=(const quaternion_t & q2)
   
const quaternion_t operator/(const quaternion_t & q2) const
   
quaternion_t operator/=(const quaternion_t & q2)
   
const quaternion_t operator+(const quaternion_t & source) const
   
quaternion_t operator+=(const quaternion_t & source)
   
const quaternion_t operator-(const quaternion_t & source) const
   
quaternion_t operator-=(const quaternion_t & source)
   
value_t length() const
   
value_t length2() const
   
quaternion_t conjugate() const
   
quaternion_t inverse() const
   
void normalize()
   
value_t dot(const quaternion_t & q) const
   
matrix3x3_t toMatrix() const
   
vec3_t toEuler() const
   
vec3_t rotatePoint(const vec3_t & p1)

Public Static Functions

   
   
quaternion_t matrixToQuaternion(const matrix3x3_t & src)
   
quaternion_t eulerToQuaternion(const vec3_t & euler)
   
quaternion_t lerp(const quaternion_t & q1, const quaternion_t & q2, value_t factor)
   
quaternion_t slerp(const quaternion_t & q1, const quaternion_t & q2, value_t factor)

Documentation

function
Geometry::_Quaternion::makeRotate

public inline
     
     
void makeRotate( const angle_t & angle,
  value_t _x,
  value_t _y,
  value_t _z
)    

Defined in Geometry/Quaternion.h:347


function
Geometry::_Quaternion::makeRotate

public inline
     
     
void makeRotate( const angle_t & angle,
  const vec3_t & axis
)    

Defined in Geometry/Quaternion.h:357


function
Geometry::_Quaternion::makeRotate_deg

public inline
     
     
void makeRotate_deg( value_t deg,
  value_t _x,
  value_t _y,
  value_t _z
)    

Defined in Geometry/Quaternion.h:360


function
Geometry::_Quaternion::makeRotate_deg

public inline
     
     
void makeRotate_deg( value_t deg,
  const vec3_t & axis
)    

Defined in Geometry/Quaternion.h:363


function
Geometry::_Quaternion::makeRotate_rad

public inline
     
     
void makeRotate_rad( value_t rad,
  value_t _x,
  value_t _y,
  value_t _z
)    

Defined in Geometry/Quaternion.h:366


function
Geometry::_Quaternion::makeRotate_rad

public inline
     
     
void makeRotate_rad( value_t rad,
  const vec3_t & axis
)    

Defined in Geometry/Quaternion.h:369


function
Geometry::_Quaternion::_Quaternion

public inline
     
     
_Quaternion( const angle_t & rotX,
  const angle_t & rotY,
  const angle_t & rotZ
)    

Defined in Geometry/Quaternion.h:373


typedef
Geometry::_Quaternion::value_t

public
 
 
typedef T value_t

Defined in Geometry/Quaternion.h:33


typedef
Geometry::_Quaternion::angle_t

public
 
 
typedef _Angle < value_t > angle_t

Defined in Geometry/Quaternion.h:34


typedef
Geometry::_Quaternion::vec3_t

public
 
 
typedef _Vec3 < value_t > vec3_t

Defined in Geometry/Quaternion.h:35


typedef
Geometry::_Quaternion::quaternion_t

public
 
 
typedef _Quaternion < value_t > quaternion_t

Defined in Geometry/Quaternion.h:36


typedef
Geometry::_Quaternion::matrix3x3_t

public
 
 
typedef _Matrix3x3 < value_t > matrix3x3_t

Defined in Geometry/Quaternion.h:37


function
Geometry::_Quaternion::_Quaternion

public inline
   
   
_Quaternion( )

Defined in Geometry/Quaternion.h:39


function
Geometry::_Quaternion::_Quaternion

public inline
     
     
_Quaternion( value_t _x,
  value_t _y,
  value_t _z,
  value_t _w
)    

Defined in Geometry/Quaternion.h:43


function
Geometry::_Quaternion::_Quaternion

public inline explicit
     
     
_Quaternion( const value_t * v )

Defined in Geometry/Quaternion.h:47


function
Geometry::_Quaternion::operator==

public const inline
     
     
bool operator==( const quaternion_t & other ) const

Defined in Geometry/Quaternion.h:51


function
Geometry::_Quaternion::operator!=

public const inline
     
     
bool operator!=( const quaternion_t & other ) const

Defined in Geometry/Quaternion.h:55


function
Geometry::_Quaternion::set

public inline
     
     
void set( value_t _x,
  value_t _y,
  value_t _z,
  value_t _w
)    

Defined in Geometry/Quaternion.h:60


function
Geometry::_Quaternion::operator[]

public inline
     
     
value_t & operator[]( int i )

Defined in Geometry/Quaternion.h:67


function
Geometry::_Quaternion::operator[]

public const inline
     
     
value_t operator[]( int i ) const

Defined in Geometry/Quaternion.h:70


function
Geometry::_Quaternion::x

public inline
   
   
value_t & x( )

Defined in Geometry/Quaternion.h:74


function
Geometry::_Quaternion::y

public inline
   
   
value_t & y( )

Defined in Geometry/Quaternion.h:77


function
Geometry::_Quaternion::z

public inline
   
   
value_t & z( )

Defined in Geometry/Quaternion.h:80


function
Geometry::_Quaternion::w

public inline
   
   
value_t & w( )

Defined in Geometry/Quaternion.h:83


function
Geometry::_Quaternion::x

public const inline
   
   
value_t x( ) const

Defined in Geometry/Quaternion.h:87


function
Geometry::_Quaternion::y

public const inline
   
   
value_t y( ) const

Defined in Geometry/Quaternion.h:90


function
Geometry::_Quaternion::z

public const inline
   
   
value_t z( ) const

Defined in Geometry/Quaternion.h:93


function
Geometry::_Quaternion::w

public const inline
   
   
value_t w( ) const

Defined in Geometry/Quaternion.h:96


function
Geometry::_Quaternion::operator*

public const inline
     
     
const quaternion_t operator*( value_t factor ) const

Defined in Geometry/Quaternion.h:100


function
Geometry::_Quaternion::operator*=

public inline
     
     
quaternion_t & operator*=( value_t factor )

Defined in Geometry/Quaternion.h:104


function
Geometry::_Quaternion::operator/

public const inline
     
     
const quaternion_t operator/( value_t divisor ) const

Defined in Geometry/Quaternion.h:112


function
Geometry::_Quaternion::operator/=

public inline
     
     
quaternion_t & operator/=( value_t divisor )

Defined in Geometry/Quaternion.h:117


function
Geometry::_Quaternion::operator*

public const inline
     
     
const quaternion_t operator*( const quaternion_t & q2 ) const

Defined in Geometry/Quaternion.h:126


function
Geometry::_Quaternion::operator*=

public inline
     
     
quaternion_t operator*=( const quaternion_t & q2 )

Defined in Geometry/Quaternion.h:133


function
Geometry::_Quaternion::operator/

public const inline
     
     
const quaternion_t operator/( const quaternion_t & q2 ) const

Defined in Geometry/Quaternion.h:146


function
Geometry::_Quaternion::operator/=

public inline
     
     
quaternion_t operator/=( const quaternion_t & q2 )

Defined in Geometry/Quaternion.h:150


function
Geometry::_Quaternion::operator+

public const inline
     
     
const quaternion_t operator+( const quaternion_t & source ) const

Defined in Geometry/Quaternion.h:155


function
Geometry::_Quaternion::operator+=

public inline
     
     
quaternion_t operator+=( const quaternion_t & source )

Defined in Geometry/Quaternion.h:159


function
Geometry::_Quaternion::operator-

public const inline
     
     
const quaternion_t operator-( const quaternion_t & source ) const

Defined in Geometry/Quaternion.h:167


function
Geometry::_Quaternion::operator-=

public inline
     
     
quaternion_t operator-=( const quaternion_t & source )

Defined in Geometry/Quaternion.h:171


function
Geometry::_Quaternion::length

public const inline
   
   
value_t length( ) const

Defined in Geometry/Quaternion.h:179


function
Geometry::_Quaternion::length2

public const inline
   
   
value_t length2( ) const

Defined in Geometry/Quaternion.h:183


function
Geometry::_Quaternion::conjugate

public const inline
   
   
quaternion_t conjugate( ) const

Defined in Geometry/Quaternion.h:187


function
Geometry::_Quaternion::inverse

public const inline
   
   
quaternion_t inverse( ) const

Defined in Geometry/Quaternion.h:191


function
Geometry::_Quaternion::normalize

public inline
   
   
void normalize( )

Defined in Geometry/Quaternion.h:195


function
Geometry::_Quaternion::dot

public const inline
     
     
value_t dot( const quaternion_t & q ) const

Defined in Geometry/Quaternion.h:199


function
Geometry::_Quaternion::toMatrix

public const inline
   
   
matrix3x3_t toMatrix( ) const

Defined in Geometry/Quaternion.h:231


function
Geometry::_Quaternion::toEuler

public const inline
   
   
vec3_t toEuler( ) const

Defined in Geometry/Quaternion.h:265


function
Geometry::_Quaternion::rotatePoint

public inline
     
     
vec3_t rotatePoint( const vec3_t & p1 )

Defined in Geometry/Quaternion.h:301


function
Geometry::_Quaternion::matrixToQuaternion

public static inline
     
     
quaternion_t matrixToQuaternion( const matrix3x3_t & src )

Defined in Geometry/Quaternion.h:206


function
Geometry::_Quaternion::eulerToQuaternion

public static inline
     
     
quaternion_t eulerToQuaternion( const vec3_t & euler )

Defined in Geometry/Quaternion.h:287


function
Geometry::_Quaternion::lerp

public static inline
     
     
quaternion_t lerp( const quaternion_t & q1,
  const quaternion_t & q2,
  value_t factor
)    

Defined in Geometry/Quaternion.h:312


function
Geometry::_Quaternion::slerp

public static inline
     
     
quaternion_t slerp( const quaternion_t & q1,
  const quaternion_t & q2,
  value_t factor
)    

Defined in Geometry/Quaternion.h:317