Transform Class Reference

Primitive for transforming a geom (primitive without body) in respect to a body (primitive with body). More...

#include <primitive.h>

Inherits Primitive.

Inheritance diagram for Transform:

Inheritance graph
[legend]
Collaboration diagram for Transform:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Transform (Primitive *parent, Primitive *child, const osg::Matrix &pose)
 ~Transform ()
 destructor deletes child object
virtual void init (const OdeHandle &odeHandle, double mass, const OsgHandle &osgHandle, char mode=Body|Geom|Draw)
 initialised the transform object.
virtual void update ()
 Updates the OSG nodes with ODE coordinates.
virtual OSGPrimitivegetOSGPrimitive ()
 returns the assoziated osg primitive if there or 0
virtual void setMass (double mass)
 sets the mass of the body (uniform)

Protected Attributes

Primitiveparent
Primitivechild
osg::Matrix pose

Detailed Description

Primitive for transforming a geom (primitive without body) in respect to a body (primitive with body).

Hides complexity of ODE TransformGeoms.


Constructor & Destructor Documentation

Transform ( Primitive parent,
Primitive child,
const osg::Matrix pose 
)

Parameters:
parent primitive should have a body and should be initialised
child is transformed by pose in respect to parent. This Primitive must NOT have a body and should not be initialised

~Transform (  ) 

destructor deletes child object


Member Function Documentation

OSGPrimitive * getOSGPrimitive (  )  [virtual]

returns the assoziated osg primitive if there or 0

Implements Primitive.

void init ( const OdeHandle odeHandle,
double  mass,
const OsgHandle osgHandle,
char  mode = Body|Geom|Draw 
) [virtual]

initialised the transform object.

This automatically initialises the child geom.

Parameters:
mass mass of the child
mode is the mode for the child, except that Body bit is ignored (child can't have a body)

Implements Primitive.

void setMass ( double  mass  )  [virtual]

sets the mass of the body (uniform)

Implements Primitive.

void update (  )  [virtual]

Updates the OSG nodes with ODE coordinates.

This function must be overloaded (usually calls setMatrix of OsgPrimitives)

Implements Primitive.


Member Data Documentation

Primitive* child [protected]

Primitive* parent [protected]

osg::Matrix pose [protected]


The documentation for this class was generated from the following files:
Generated on Fri Oct 30 16:29:03 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7