#include <simulation.h>
Inheritance diagram for Simulation:
Definition at line 161 of file simulation.h.
Public Types | |
enum | SimulationState { none, initialised, running, closed } |
Public Member Functions | |
Simulation () | |
virtual | ~Simulation () |
bool | run (int argc, char **argv) |
starts the Simulation. | |
virtual void | start (const OdeHandle &, const OsgHandle &, GlobalData &globalData)=0 |
start() is called at the start and should create all the object (obstacles, agents...). | |
virtual void | end (GlobalData &globalData) |
end() is called at the end and should tidy up | |
virtual void | config (GlobalData &globalData) |
config() is called when the user presses Ctrl-C. | |
virtual bool | command (const OdeHandle &, const OsgHandle &, GlobalData &globalData, int key, bool down) |
command() is called if a key was pressed keycodes see: osgGA::GUIEventAdapter return true if the key was handled | |
virtual void | bindingDescription (osg::ApplicationUsage &au) const |
this can be used to describe the key bindings used by command() | |
virtual bool | collCallback (const OdeHandle &, void *data, dGeomID o1, dGeomID o2) |
collCallback() can be used to overload the standart collision handling. | |
virtual void | addCallback (GlobalData &globalData, bool draw, bool pause) |
addCallback() optional additional callback function. | |
virtual void | operator() (const Producer::Camera &) |
Protected Member Functions | |
virtual bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &) |
virtual void | getUsage (osg::ApplicationUsage &au) const |
virtual void | accept (osgGA::GUIEventHandlerVisitor &v) |
virtual bool | init (int argc, char **argv) |
void | setCameraHomePos (const osg::Vec3 &eye, const osg::Vec3 &view) |
define the home position and view orientation of the camera. | |
bool | control_c_pressed () |
Static Protected Member Functions | |
static void | nearCallback (void *data, dGeomID o1, dGeomID o2) |
Protected Attributes | |
GlobalData | globalData |
VideoStream | videostream |
int | nextLeakAnnounce |
int | leakAnnCounter |
long | realtimeoffset |
long | simtimeoffset |
int | windowWidth |
int | windowHeight |
bool | pause |
long | sim_step |
|
Definition at line 163 of file simulation.h. |
|
Definition at line 267 of file simulation.cpp. |
|
Definition at line 278 of file simulation.cpp. |
|
Definition at line 612 of file simulation.cpp. |
|
addCallback() optional additional callback function.
Reimplemented in CompatSim. Definition at line 203 of file simulation.h. |
|
this can be used to describe the key bindings used by command()
Definition at line 195 of file simulation.h. |
|
collCallback() can be used to overload the standart collision handling. However it is called after the robots collision handling.
Reimplemented in CompatSim. Definition at line 201 of file simulation.h. |
|
command() is called if a key was pressed keycodes see: osgGA::GUIEventAdapter return true if the key was handled
Definition at line 190 of file simulation.h. |
|
config() is called when the user presses Ctrl-C. Default: Call changeParams(globalData.configs) Reimplemented in CompatSim. Definition at line 469 of file simulation.cpp. |
|
Definition at line 734 of file simulation.cpp. |
|
end() is called at the end and should tidy up
Reimplemented in CompatSim. Definition at line 473 of file simulation.cpp. |
|
Definition at line 606 of file simulation.cpp. |
|
Definition at line 566 of file simulation.cpp. |
|
Definition at line 294 of file simulation.cpp. |
|
Definition at line 676 of file simulation.cpp. |
|
Definition at line 617 of file simulation.cpp. |
|
starts the Simulation. Do not overload it. This function returns of the simulation is terminated.
Definition at line 409 of file simulation.cpp. |
|
define the home position and view orientation of the camera. view.x is the heading angle in degree. view.y is the tilt angle in degree (nick), view.z is ignored Definition at line 814 of file simulation.cpp. |
|
start() is called at the start and should create all the object (obstacles, agents...).
Implemented in CompatSim, ThisSim, ThisSim, ThisSim, and ThisSim. |
|
Definition at line 244 of file simulation.h. |
|
Definition at line 248 of file simulation.h. |
|
Definition at line 247 of file simulation.h. |
|
Definition at line 254 of file simulation.h. |
|
Definition at line 249 of file simulation.h. |
|
Definition at line 256 of file simulation.h. |
|
Definition at line 250 of file simulation.h. |
|
Definition at line 245 of file simulation.h. |
|
Definition at line 253 of file simulation.h. |
|
Definition at line 252 of file simulation.h. |