SCL
1.0
Standard Control Library : Control, dynamics, physics, and simulation
|
Transformation class using quaternionThis class consists of a quaternion for rotation and a vector for translation. More...
#include <TaoDeFrame.h>
Public Member Functions | |
deFrame () | |
deFrame (deFloat tx, deFloat ty, deFloat tz) | |
deFrame (deFrame const &orig) | |
deQuaternion & | rotation () |
const deQuaternion & | rotation () const |
deVector3 & | translation () |
const deVector3 & | translation () const |
DE_MATH_API void | identity () |
this = identity matrix More... | |
DE_MATH_API void | operator= (const deFrame &f) |
this = f More... | |
DE_MATH_API void | multiply (const deFrame &f1, const deFrame &f2) |
this = f1 * f2 = [r1,p1][r2,p2] = [r1*r2, r1*p2 + p1] More... | |
DE_MATH_API void | inversedMultiply (const deFrame &f1, const deFrame &f2) |
this = f1^-1 * f2 More... | |
DE_MATH_API void | multiplyInversed (const deFrame &f1, const deFrame &f2) |
this = f1 * f2^-1 More... | |
DE_MATH_API void | inverse (const deFrame &f) |
this = f^-1 More... | |
DE_MATH_API void | set (const deTransform &t) |
this = t More... | |
DE_MATH_API void | set (const deQuaternion &q, const deVector3 &v) |
this = [q, v] More... | |
Private Attributes | |
deQuaternion | ori_quat_ |
deVector3 | translation_ |
Transformation class using quaternion
This class consists of a quaternion for rotation and a vector for translation.
Edited 2013-09-09 : Samir Menon smeno n@st anfor d.ed u
This is used to store all the transformations between different geometric objects.
|
inline |
Default ctor inits to identity.
|
inline |
Construction from three floats ends up as pure translation.
DE_MATH_API void deFrame::identity | ( | ) |
this = identity matrix
DE_MATH_API void deFrame::inverse | ( | const deFrame & | f | ) |
this = f^-1
this = f^-1 = ~[r,p] = [~r, -(~r*p)]
this = f1^-1 * f2
this = f1 * f2 = [r1,p1][r2,p2] = [r1*r2, r1*p2 + p1]
Combine two frame transformations: f2
gets rotated and translated by f1
. For example, if you know the COM frame of a link relative to its local frame, and you want to know the global COM position given the global position of the local frame, you do:
this = f1 * f2^-1
DE_MATH_API void deFrame::operator= | ( | const deFrame & | f | ) |
this = f
|
inline |
|
inline |
DE_MATH_API void deFrame::set | ( | const deTransform & | t | ) |
this = t
DE_MATH_API void deFrame::set | ( | const deQuaternion & | q, |
const deVector3 & | v | ||
) |
this = [q, v]
|
inline |
|
inline |