TaskedSimulation Class Reference

#include <taskedsimulation.h>

Inherits Simulation.

Inheritance diagram for TaskedSimulation:

Inheritance graph
[legend]
Collaboration diagram for TaskedSimulation:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TaskedSimulation ()
virtual ~TaskedSimulation ()
virtual void start (const OdeHandle &, const OsgHandle &, GlobalData &globalData, SimulationTaskHandle &simTaskHandle, int taskId)
 start() is called at the first start of the cycles and should create all the object (obstacles, agents...).
virtual bool restart (const OdeHandle &, const OsgHandle &, GlobalData &globalData, SimulationTaskHandle &, int taskId)
 restart() is called at the second and all following starts of the cylce The end of a cycle is determined by (simulation_time_reached==true)
virtual void addCallback (GlobalData &globalData, bool draw, bool pause, bool control, SimulationTaskHandle &, int taskId)
 optional additional callback function which is called every simulation step.
virtual bool command (const OdeHandle &, const OsgHandle &, GlobalData &globalData, int key, bool down, SimulationTaskHandle &, int taskId)
 is called if a key was pressed.
void setTaskId (int taskId)
 Sets the taskId of the associated SimulationTask.
void setTaskNameSuffix (std::string nameSuffix)
void setSimTaskHandle (SimulationTaskHandle &simTaskHandle)
 Sets the global SimulationTaskHandle.

Constructor & Destructor Documentation

TaskedSimulation (  )  [inline]

virtual ~TaskedSimulation (  )  [inline, virtual]


Member Function Documentation

virtual void addCallback ( GlobalData globalData,
bool  draw,
bool  pause,
bool  control,
SimulationTaskHandle ,
int  taskId 
) [inline, virtual]

optional additional callback function which is called every simulation step.

Called between physical simulation step and drawing.

Parameters:
draw indicates that objects are drawn in this timestep
pause always false (only called of simulation is running)
control indicates that robots have been controlled this timestep

virtual bool command ( const OdeHandle ,
const OsgHandle ,
GlobalData globalData,
int  key,
bool  down,
SimulationTaskHandle ,
int  taskId 
) [inline, virtual]

is called if a key was pressed.

For keycodes see: osgGA::GUIEventAdapter

Returns:
true if the key was handled

virtual bool restart ( const OdeHandle ,
const OsgHandle ,
GlobalData globalData,
SimulationTaskHandle ,
int  taskId 
) [inline, virtual]

restart() is called at the second and all following starts of the cylce The end of a cycle is determined by (simulation_time_reached==true)

Parameters:
the odeHandle
the osgHandle
globalData 
Returns:
if the simulation should be restarted; this is false by default

void setSimTaskHandle ( SimulationTaskHandle simTaskHandle  )  [inline]

Sets the global SimulationTaskHandle.

This method is called by the associated SimulationTask.

Parameters:
simTaskHandle 

void setTaskId ( int  taskId  )  [inline]

Sets the taskId of the associated SimulationTask.

This method is called by the associated SimulationTask.

Parameters:
taskId of the associated SimulationTask

void setTaskNameSuffix ( std::string  nameSuffix  )  [inline]

virtual void start ( const OdeHandle ,
const OsgHandle ,
GlobalData globalData,
SimulationTaskHandle simTaskHandle,
int  taskId 
) [inline, virtual]

start() is called at the first start of the cycles and should create all the object (obstacles, agents...).


The documentation for this class was generated from the following file:
Generated on Fri Oct 30 16:29:04 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7