#include <simplecomponent.h>
Inherits Component.
Inheritance diagram for SimpleComponent:
Public Member Functions | |
SimpleComponent (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const ComponentConf &conf) | |
~SimpleComponent () | |
virtual void | update () |
update the OSG notes here | |
virtual void | place (const Pos &pos) |
sets the vehicle to position pos | |
virtual void | place (const osg::Matrix &pose) |
sets the pose of the vehicle | |
virtual bool | collisionCallback (void *data, dGeomID o1, dGeomID o2) |
virtual void | doInternalStuff (GlobalData &globalData) |
this function is called in each timestep after control. | |
virtual Position | getPosition () const |
returns position of the object | |
virtual osg::Vec3 | getPositionbetweenComponents (Component *component) |
This is only a simple function, calculating the coordinates of the point exactly between two directly connected components. | |
virtual bool | setSimplePrimitive (Primitive *newprimitive) |
Sets the reference to the Primitive for the component, but only if there is no robot assigned to the component. | |
virtual Primitive * | getMainPrimitive () const |
return reference to the simple Primitive, or to the main Primitive of the robot assigend to the component. |
The pysical object that belongs to this component class is a Primitive object.
SimpleComponent | ( | const OdeHandle & | odeHandle, | |
const OsgHandle & | osgHandle, | |||
const ComponentConf & | conf | |||
) |
~SimpleComponent | ( | ) |
bool collisionCallback | ( | void * | data, | |
dGeomID | o1, | |||
dGeomID | o2 | |||
) | [virtual] |
Reimplemented from Component.
void doInternalStuff | ( | GlobalData & | globalData | ) | [virtual] |
this function is called in each timestep after control.
It should perform robot-internal checks and actions, like acting and sensing of internal motors/sensors etc.
globalData | structure that contains global data from the simulation environment |
Implements OdeRobot.
Primitive * getMainPrimitive | ( | ) | const [virtual] |
Position getPosition | ( | ) | const [virtual] |
void place | ( | const osg::Matrix & | pose | ) | [virtual] |
void place | ( | const Pos & | pos | ) | [virtual] |
sets the vehicle to position pos
pos | desired position of the robot |
Implements Component.
bool setSimplePrimitive | ( | Primitive * | newprimitive | ) | [virtual] |
Sets the reference to the Primitive for the component, but only if there is no robot assigned to the component.
Overwriting an existing Primitive reference is possible, also to set it NULL, and then set a reference to a Primitive with setSimplePrimitive ( .. ). But first the Primitive reference should be saved elsewhere or it won't be updated graficaly
void update | ( | ) | [virtual] |