SimpleComponent Class Reference

A simple component is a special form of component. More...

#include <simplecomponent.h>

Inherits Component.

Inheritance diagram for SimpleComponent:

Inheritance graph
[legend]
Collaboration diagram for SimpleComponent:

Collaboration graph
[legend]
List of all members.

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 PrimitivegetMainPrimitive () const
 return reference to the simple Primitive, or to the main Primitive of the robot assigend to the component.

Detailed Description

A simple component is a special form of component.

The pysical object that belongs to this component class is a Primitive object.


Constructor & Destructor Documentation

SimpleComponent ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
const ComponentConf conf 
)

~SimpleComponent (  ) 


Member Function Documentation

bool collisionCallback ( void *  data,
dGeomID  o1,
dGeomID  o2 
) [virtual]

Deprecated:
Do not use it anymore, collision control is done automatically. In case of a treatment return true (collision will be ignored by other objects and the default routine) else false (collision is passed to other objects and (if not treated) to the default routine).

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.

Parameters:
globalData structure that contains global data from the simulation environment

Implements OdeRobot.

Primitive * getMainPrimitive (  )  const [virtual]

return reference to the simple Primitive, or to the main Primitive of the robot assigend to the component.

If nothimng is assigned, NULL is returned.

Implements Component.

Position getPosition (  )  const [virtual]

returns position of the object

Returns:
vector of position (x,y,z)

Implements Component.

osg::Vec3 getPositionbetweenComponents ( Component component  )  [virtual]

This is only a simple function, calculating the coordinates of the point exactly between two directly connected components.

Returns:
Vector containing the Position

Reimplemented from Component.

void place ( const osg::Matrix pose  )  [virtual]

sets the pose of the vehicle

Parameters:
pose desired 4x4 pose matrix

Implements OdeRobot.

void place ( const Pos pos  )  [virtual]

sets the vehicle to position pos

Parameters:
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

Returns:
true if the reference could be set; false else

void update (  )  [virtual]

update the OSG notes here

Implements Component.


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