#include <atomcomponent.h>
Inherits Component.
Inheritance diagram for AtomComponent:


Public Member Functions | |
| AtomComponent (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const ComponentConf &conf, const AtomConf &aconf) | |
| ~AtomComponent () | |
| virtual int | getSensors (sensor *sensors, int sensornumber) |
| Use this, to get all sensor values of all the joints of all subcomponents, and the sensors of all robots, belonging to all subcomponents. | |
| virtual void | setMotors (const motor *motors, int motornumber) |
| Sets the motor values for the joints connecting the component with its subcomponents, an recursivly the joints of all subComponents. | |
| virtual int | getSensorNumber () |
| returns number of sensors | |
| virtual int | getMotorNumber () |
| returns number of motors | |
| 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 bool | shellCollision (dGeomID o1, dGeomID o2) |
| 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 Primitive * | getMainPrimitive () const |
| virtual componentConnection * | getStrongestSoftlinkofStructure () |
| Searches for the softlink in the substructure of THIS component which has the highest binding strength. | |
| virtual void | makeComponentStructureRoot () |
| This changes the structure of all components connected with this component, so that this component will become the new root of this structure. | |
| virtual double | getMotionForce () |
| Calculates the linear force the Component has at the time of calling this function. | |
| virtual double | getCollisionForce (AtomComponent *collAtom) |
| Calculates the linear force between two components at the moment of calling this function. | |
| virtual bool | fusionCondition (dGeomID o1, dGeomID o2) |
| Tests if the conditions for fusion of two atoms are fulfilled. | |
| virtual bool | fissionCondition (dGeomID o1, dGeomID o2, double force) |
| now fission is allowed if there is a single connection, with a binding energy smaller than the force of the colission, but the minimum value for fission from atomconf has to be reached | |
| virtual bool | collisionExclusionCondition (dGeomID o1, dGeomID o2) |
| Test which collisions should not be handled. | |
| virtual bool | fusion (AtomComponent *atom_to_fuse) |
| fuses this AtomComponent with an other one | |
| virtual bool | fission (double force) |
| fissions a AtomComponent from this AtomComponent | |
| virtual void | replication (AtomComponent *atom_to_recplicate) |
| Replication. | |
Static Public Member Functions | |
| static AtomConf | getDefaultAtomConf () |
Public Attributes | |
| AtomConf | atomconf |
Classes | |
| class | connectionAddition |
| AtomComponent | ( | const OdeHandle & | odeHandle, | |
| const OsgHandle & | osgHandle, | |||
| const ComponentConf & | conf, | |||
| const AtomConf & | aconf | |||
| ) |
| ~AtomComponent | ( | ) |
| 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.
| bool collisionExclusionCondition | ( | dGeomID | o1, | |
| dGeomID | o2 | |||
| ) | [virtual] |
Test which collisions should not be handled.
| Geom | reference to the first atom | |
| Geom | reference to the second atom |
| 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.
| globalData | structure that contains global data from the simulation environment |
Reimplemented from Component.
| bool fission | ( | double | force | ) | [virtual] |
fissions a AtomComponent from this AtomComponent
| the | AtomComponent, to fission true if the fission was successfull, false if not |
| bool fissionCondition | ( | dGeomID | o1, | |
| dGeomID | o2, | |||
| double | force | |||
| ) | [virtual] |
now fission is allowed if there is a single connection, with a binding energy smaller than the force of the colission, but the minimum value for fission from atomconf has to be reached
| Geom | reference to the first atom | |
| Geom | reference to the second atom |
| bool fusion | ( | AtomComponent * | atom_to_fuse | ) | [virtual] |
fuses this AtomComponent with an other one
| the | AtomComponent, to fuse with true if the fusion was successfull, false if not |
| bool fusionCondition | ( | dGeomID | o1, | |
| dGeomID | o2 | |||
| ) | [virtual] |
Tests if the conditions for fusion of two atoms are fulfilled.
| Geom | reference to the first atom | |
| Geom | reference to the second atom |
| double getCollisionForce | ( | AtomComponent * | collAtom | ) | [virtual] |
Calculates the linear force between two components at the moment of calling this function.
| static AtomConf getDefaultAtomConf | ( | ) | [inline, static] |
| Primitive * getMainPrimitive | ( | ) | const [virtual] |
| double getMotionForce | ( | ) | [virtual] |
Calculates the linear force the Component has at the time of calling this function.
| int getMotorNumber | ( | ) | [virtual] |
| Position getPosition | ( | ) | const [virtual] |
| int getSensorNumber | ( | ) | [virtual] |
| int getSensors | ( | sensor * | sensors, | |
| int | sensornumber | |||
| ) | [virtual] |
Use this, to get all sensor values of all the joints of all subcomponents, and the sensors of all robots, belonging to all subcomponents.
The sensor values have the following sequence: values of the component connecting joints, values of the robot of the component, values of component connecting joints of the first subcomponent, values of the robot of the first subcomponent, ...
| robot | sensor values of the connecting joints of this component and all subcomponents |
!!!!!!!!!!!!!
Reimplemented from Component.
| AtomComponent::componentConnection * getStrongestSoftlinkofStructure | ( | ) | [virtual] |
Searches for the softlink in the substructure of THIS component which has the highest binding strength.
| void makeComponentStructureRoot | ( | ) | [virtual] |
This changes the structure of all components connected with this component, so that this component will become the new root of this structure.
| 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
| pos | desired position of the robot |
Implements Component.
| void replication | ( | AtomComponent * | atom_to_recplicate | ) | [virtual] |
Replication.
They have to belong to two robots, so that touching each ofer causes a crossing over in her structure.
| the | AtomComponent which belongs to the structure to replicate with, and which is the point where the replication will happen |
| void setMotors | ( | const motor * | motors, | |
| int | motornumber | |||
| ) | [virtual] |
Sets the motor values for the joints connecting the component with its subcomponents, an recursivly the joints of all subComponents.
Reimplemented from Component.
| bool shellCollision | ( | dGeomID | o1, | |
| dGeomID | o2 | |||
| ) | [virtual] |
| void update | ( | ) | [virtual] |
1.4.7