Blender V2.61 - r43446
Public Member Functions

MT_ExpMap Class Reference

#include <MT_ExpMap.h>

List of all members.

Public Member Functions

 MT_ExpMap ()
 MT_ExpMap (const MT_Vector3 &v)
 MT_ExpMap (const float v[3])
 MT_ExpMap (const double v[3])
 MT_ExpMap (MT_Scalar x, MT_Scalar y, MT_Scalar z)
 MT_ExpMap (const MT_Quaternion &q)
const MT_Vector3vector () const
void setRotation (const MT_Quaternion &q)
const MT_QuaterniongetRotation () const
MT_Matrix3x3 getMatrix () const
void update (const MT_Vector3 &dv)
void partialDerivatives (MT_Matrix3x3 &dRdx, MT_Matrix3x3 &dRdy, MT_Matrix3x3 &dRdz) const

Detailed Description

MT_ExpMap an exponential map parameterization of rotations in 3D. This implementation is derived from the paper "F. Sebastian Grassia. Practical parameterization of rotations using the exponential map. Journal of Graphics Tools, 3(3):29-48, 1998" Please go to http://www.acm.org/jgt/papers/Grassia98/ for a thorough description of the theory and sample code used to derive this class.

Basic overview of why this class is used. In an IK system we need to paramterize the joint angles in some way. Typically 2 parameterizations are used.

So exponential map is similar to a quaternion axis/angle representation but we store the angle as the length of the axis. So require only 3 parameters. Means that all exponential maps are valid rotations. Suffers from gimbal lock. But it's possible to detect when gimbal lock is near and reparameterize away from it. Also nice for interpolating. Exponential maps are share some of the useful properties of euler and quaternion parameterizations. And are very useful for differential IK solvers.

Definition at line 80 of file MT_ExpMap.h.


Constructor & Destructor Documentation

MT_ExpMap::MT_ExpMap ( ) [inline]

Default constructor

Warning:
there is no initialization in the default constructor

Definition at line 89 of file MT_ExpMap.h.

MT_ExpMap::MT_ExpMap ( const MT_Vector3 v) [inline]

Definition at line 90 of file MT_ExpMap.h.

MT_ExpMap::MT_ExpMap ( const float  v[3]) [inline]

Definition at line 92 of file MT_ExpMap.h.

MT_ExpMap::MT_ExpMap ( const double  v[3]) [inline]

Definition at line 93 of file MT_ExpMap.h.

MT_ExpMap::MT_ExpMap ( MT_Scalar  x,
MT_Scalar  y,
MT_Scalar  z 
) [inline]

Definition at line 95 of file MT_ExpMap.h.

MT_ExpMap::MT_ExpMap ( const MT_Quaternion q) [inline]

Construct an exponential map from a quaternion

Definition at line 102 of file MT_ExpMap.h.

References setRotation().


Member Function Documentation

MT_Matrix3x3 MT_ExpMap::getMatrix ( void  ) const

Convert the exponential map to a 3x3 matrix

Definition at line 78 of file MT_ExpMap.cpp.

const MT_Quaternion & MT_ExpMap::getRotation ( ) const

Convert from an exponential map to a quaternion representation

Definition at line 67 of file MT_ExpMap.cpp.

void MT_ExpMap::partialDerivatives ( MT_Matrix3x3 dRdx,
MT_Matrix3x3 dRdy,
MT_Matrix3x3 dRdz 
) const

Compute the partial derivatives of the exponential map (dR/de - where R is a 4x4 matrix formed from the map) and return them as a 4x4 matrix

Compute the partial derivatives of the exponential map (dR/de - where R is a 3x3 rotation matrix formed from the map) and return them as a 3x3 matrix

Definition at line 105 of file MT_ExpMap.cpp.

void MT_ExpMap::setRotation ( const MT_Quaternion q)

Set the exponential map from a quaternion

Set the exponential map from a quaternion. The quaternion must be non-zero.

Definition at line 42 of file MT_ExpMap.cpp.

References KDL::atan2(), MT_Vector3::length(), MT_Vector4::normalized(), MT_Tuple4::w(), MT_Tuple4::x(), MT_Tuple4::y(), and MT_Tuple4::z().

Referenced by MT_ExpMap().

void MT_ExpMap::update ( const MT_Vector3 dv)

Update (and reparameterize) the expontial map

Parameters:
dvdelta update values.

Update & reparameterizate the exponential map

Definition at line 89 of file MT_ExpMap.cpp.

const MT_Vector3& MT_ExpMap::vector ( ) const [inline]

Accessors Decided not to inherit from MT_Vector3 but rather this class contains an MT_Vector3. This is because it is very dangerous to use MT_Vector3 functions on this class and some of them have no direct meaning.

Definition at line 118 of file MT_ExpMap.h.


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