#include <primitive.h>
Inherits Primitive.
Inheritance diagram for Transform:
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 OSGPrimitive * | getOSGPrimitive () |
returns the assoziated osg primitive if there or 0 | |
virtual void | setMass (double mass) |
sets the mass of the body (uniform) | |
Protected Attributes | |
Primitive * | parent |
Primitive * | child |
osg::Matrix | pose |
Hides complexity of ODE TransformGeoms.
Transform | ( | Primitive * | parent, | |
Primitive * | child, | |||
const osg::Matrix & | pose | |||
) |
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
OSGPrimitive * getOSGPrimitive | ( | ) | [virtual] |
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.
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] |
void update | ( | ) | [virtual] |
Updates the OSG nodes with ODE coordinates.
This function must be overloaded (usually calls setMatrix of OsgPrimitives)
Implements Primitive.
osg::Matrix pose [protected] |