Robotsystem of the Robot Group Leipzig: SimpleComponent Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# SimpleComponent Class Reference

SimpleComponent. More...

`#include <simplecomponent.h>`

Inherits Component.

Inheritance diagram for SimpleComponent:

[legend]
Collaboration diagram for SimpleComponent:

[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 pos desired position of the robot
virtual void | place (const osg::Matrix &pose)
| sets the pose of the vehicle
virtual bool | collisionCallback (void *data, dGeomID o1, dGeomID o2)
| checks for internal collisions and treats them.
virtual void | doInternalStuff (const GlobalData &globalData)
| this function is called in each timestep.
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.

## Detailed Description

SimpleComponent.

## 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]`

checks for internal collisions and treats them.

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 | ( | const GlobalData & | globalData | ) | `[virtual]`

this function is called in each timestep.

It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.

Parameters:

  | globalData | structure that contains global data from the simulation environment

Reimplemented from Component.

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

Parameters:

  | index | number of 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 pos desired position of the robot

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:

- simplecomponent.h
- simplecomponent.cpp