SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
deFrame Class Reference

Transformation class using quaternionThis class consists of a quaternion for rotation and a vector for translation. More...

#include <TaoDeFrame.h>

Collaboration diagram for deFrame:
Collaboration graph

Public Member Functions

 deFrame ()
 deFrame (deFloat tx, deFloat ty, deFloat tz)
 deFrame (deFrame const &orig)
deQuaternionrotation ()
const deQuaternionrotation () const
deVector3translation ()
const deVector3translation () 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_

Detailed Description

Transformation class using quaternion

This class consists of a quaternion for rotation and a vector for translation.

Edited 2013-09-09 : Samir Menon smeno.nosp@m.n@st.nosp@m.anfor.nosp@m.d.ed.nosp@m.u

See Also
deVector3, deQuaternion, deTransform

This is used to store all the transformations between different geometric objects.

Constructor & Destructor Documentation

deFrame::deFrame ( )

Default ctor inits to identity.

deFrame::deFrame ( deFloat  tx,
deFloat  ty,
deFloat  tz 

Construction from three floats ends up as pure translation.

Member Function Documentation

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)]

DE_MATH_API void deFrame::inversedMultiply ( const deFrame f1,
const deFrame f2 

this = f1^-1 * f2

DE_MATH_API void deFrame::multiply ( const deFrame f1,
const deFrame 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:

deFrame com_wrt_link, link_wrt_global;
deFrame com;
com.multiply(link_wrt_global, com_wrt_link);
Do NOT invoke this method on one of the parameters, because the operation is not atomic. If you want to replace a frame by the result of this multiplication, use a temporary object.
// old pseudo-code documentation for this method:
this = f1 * f2 = [r1,p1][r2,p2] = [r1*r2, r1*p2 + p1]
// BAD example: this will produce garbage
deFrame foo, bar;
foo.multiply(foo, bar); // foo gets partially modified half way through the operation
// GOOD example: use a temporary object if you want to replace a frame
deFrame foo, bar;
foo.multiply(deFrame(foo), bar);
DE_MATH_API void deFrame::multiplyInversed ( const deFrame f1,
const deFrame f2 

this = f1 * f2^-1

DE_MATH_API void deFrame::operator= ( const deFrame f)

this = f

deQuaternion& deFrame::rotation ( )
rotation part
const deQuaternion& deFrame::rotation ( ) const
rotation part
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]

deVector3& deFrame::translation ( )
translation part
const deVector3& deFrame::translation ( ) const
translation part

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