deQuaternion Class Reference
[Matrix]

Quaternion class

This is a C++ wrapper class of deQuaternionf. More...

#include <deQuaternion.h>

List of all members.

Public Member Functions

 operator deFloat * ()
 cast operator
 operator const deFloat * () const
 cast operator
deFloatoperator[] (const deInt i)
const deFloatoperator[] (const deInt i) const
DE_MATH_API void operator= (const deQuaternion &q)
 this = q
DE_MATH_API deInt operator== (const deQuaternion &q)
DE_MATH_API void operator+= (const deQuaternion &q)
 this[i] += q[i]
DE_MATH_API void operator-= (const deQuaternion &q)
 this[i] -= q[i]
DE_MATH_API void operator *= (const deFloat s)
 this[i] *= s
DE_MATH_API void identity ()
 this = (0, 0, 0, 1)
DE_MATH_API void zero ()
 this = (0, 0, 0, 0)
DE_MATH_API deFloat dot (const deQuaternion &q)
 return this^T * q
DE_MATH_API void normalize ()
 this[i] *= (1 / sqrt(this^T * this))
DE_MATH_API void get (deVector3 &axis, deFloat &angle) const
 convert to axis-angle notation
DE_MATH_API void set (const deMatrix3 &m)
 this = m
DE_MATH_API void set (const deInt axis, const deFloat angle)
 this = (axis, angle)
DE_MATH_API void set (const deVector3 &axis, const deFloat angle)
 this = (axis, angle)
DE_MATH_API void set (const deFloat x, const deFloat y, const deFloat z, const deFloat w)
 this = (x, y, z, q)
DE_MATH_API void set (const deFloat *q)
 this = [x y z q]
DE_MATH_API void eulerZYX (const deVector3 &v)
 this = [x, y, z] = ZYX Euler angles
DE_MATH_API void negate (const deQuaternion &q)
 this = -q
DE_MATH_API void inverse (const deQuaternion &q)
 this = q^-1
DE_MATH_API void add (const deQuaternion &q1, const deQuaternion &q2)
 this = q1 + q2
DE_MATH_API void subtract (const deQuaternion &q1, const deQuaternion &q2)
 this = q1 - q2
DE_MATH_API void multiply (const deQuaternion &q1, const deQuaternion &q2)
 this = q1 * q2
DE_MATH_API void inversedMultiply (const deQuaternion &q1, const deQuaternion &q2)
 this = q1^-1 * q2
DE_MATH_API void multiplyInversed (const deQuaternion &q1, const deQuaternion &q2)
 this = q1 * q2^-1
DE_MATH_API void velocity (const deQuaternion &q, const deVector3 &omega)
 this = dq
DE_MATH_API void consistentSign (const deQuaternion &q, const deQuaternion &qg)
 this = converted qg sign consitent to q
DE_MATH_API void slerp (const deQuaternion &q, const deQuaternion &qg, const deFloat t, const deFloat addedSpins)
 this = SLERP (spherical linear interpolation with extra spins)
DE_MATH_API void lerp (const deQuaternion &q, const deQuaternion &qg, const deFloat t)
 this = q + t * (qg - q)


Detailed Description

Quaternion class

This is a C++ wrapper class of deQuaternionf.

Remarks:
q = [vx, vy, vz, w] = [axis*sin(theta/2), cos(theta/2)] <--- axisAngle(axis,theta). quaternion is used to represent rotation in deFrame.
See also:
deQuaternionf.h, deFrame


Member Function Documentation

DE_MATH_API void deQuaternion::add const deQuaternion q1,
const deQuaternion q2
 

this = q1 + q2

DE_MATH_API void deQuaternion::consistentSign const deQuaternion q,
const deQuaternion qg
 

this = converted qg sign consitent to q

Remarks:
this funtion compares q to qg and put sign consistent qg to this (= qg or -qg).

(q is equivalent to -q) for all angles (theta) where q = [cos(theta/2), v*sin(theta/2)]

DE_MATH_API deFloat deQuaternion::dot const deQuaternion q  ) 
 

return this^T * q

DE_MATH_API void deQuaternion::eulerZYX const deVector3 v  ) 
 

this = [x, y, z] = ZYX Euler angles

DE_MATH_API void deQuaternion::get deVector3 axis,
deFloat angle
const
 

convert to axis-angle notation

DE_MATH_API void deQuaternion::identity  ) 
 

this = (0, 0, 0, 1)

DE_MATH_API void deQuaternion::inverse const deQuaternion q  ) 
 

this = q^-1

DE_MATH_API void deQuaternion::inversedMultiply const deQuaternion q1,
const deQuaternion q2
 

this = q1^-1 * q2

DE_MATH_API void deQuaternion::lerp const deQuaternion q,
const deQuaternion qg,
const deFloat  t
 

this = q + t * (qg - q)

Remarks:
this = LERP (linear interpolation)

DE_MATH_API void deQuaternion::multiply const deQuaternion q1,
const deQuaternion q2
 

this = q1 * q2

DE_MATH_API void deQuaternion::multiplyInversed const deQuaternion q1,
const deQuaternion q2
 

this = q1 * q2^-1

DE_MATH_API void deQuaternion::negate const deQuaternion q  ) 
 

this = -q

DE_MATH_API void deQuaternion::normalize  ) 
 

this[i] *= (1 / sqrt(this^T * this))

DE_MATH_API void deQuaternion::operator *= const deFloat  s  ) 
 

this[i] *= s

deQuaternion::operator const deFloat *  )  const [inline]
 

cast operator

deQuaternion::operator deFloat *  )  [inline]
 

cast operator

DE_MATH_API void deQuaternion::operator+= const deQuaternion q  ) 
 

this[i] += q[i]

DE_MATH_API void deQuaternion::operator-= const deQuaternion q  ) 
 

this[i] -= q[i]

DE_MATH_API void deQuaternion::operator= const deQuaternion q  ) 
 

this = q

DE_MATH_API deInt deQuaternion::operator== const deQuaternion q  ) 
 

Returns:
(this == q )

const deFloat& deQuaternion::operator[] const deInt  i  )  const [inline]
 

Returns:
const q[i]

deFloat& deQuaternion::operator[] const deInt  i  )  [inline]
 

Returns:
q[i]

DE_MATH_API void deQuaternion::set const deFloat q  ) 
 

this = [x y z q]

DE_MATH_API void deQuaternion::set const deFloat  x,
const deFloat  y,
const deFloat  z,
const deFloat  w
 

this = (x, y, z, q)

DE_MATH_API void deQuaternion::set const deVector3 axis,
const deFloat  angle
 

this = (axis, angle)

DE_MATH_API void deQuaternion::set const deInt  axis,
const deFloat  angle
 

this = (axis, angle)

DE_MATH_API void deQuaternion::set const deMatrix3 m  ) 
 

this = m

DE_MATH_API void deQuaternion::slerp const deQuaternion q,
const deQuaternion qg,
const deFloat  t,
const deFloat  addedSpins
 

this = SLERP (spherical linear interpolation with extra spins)

DE_MATH_API void deQuaternion::subtract const deQuaternion q1,
const deQuaternion q2
 

this = q1 - q2

DE_MATH_API void deQuaternion::velocity const deQuaternion q,
const deVector3 omega
 

this = dq

DE_MATH_API void deQuaternion::zero  ) 
 

this = (0, 0, 0, 0)


The documentation for this class was generated from the following files:
Generated on Sun Apr 9 22:12:45 2006 for TAO by  doxygen 1.4.6-NO