#include <StateControl.h>
Collaboration diagram for StateControl:
Public Member Functions | |
StateControl (Dispatcher *disp) | |
~StateControl () | |
bool | location (int loc_id, shared_ptr< string > desc, unsigned int capacity, double dist, double s, int tile, double width, double height, double x, double y, double rot) |
bool | drv (int Rt, int Ri_a, int Ri_b, int Ri_d, double ts, double te) |
bool | load (int Rt, int Ri, int C, double ts, double tf) |
bool | unload (int Rt, int Ri, int C, double ts, double te) |
bool | setspdinviz (int R, double s) |
bool | trnew (int Rt, shared_ptr< string > desc, int Ri, double s) |
bool | trdel (int Rt) |
bool | newcarg (int C, shared_ptr< string > desc, int Ri) |
bool | rmcarg (int C) |
bool | arc (int Ri_a, int Ri_b) |
osg::Group * | getOsgRoot () |
bool | adjustTimeFlow (double adj) |
double | getTimeFlow () |
double | getTime () |
void | pause () |
int | selectObject (TraplasObject *obj) |
TraplasObject * | getLastSelected () |
int | deselectObject (TraplasObject *obj) |
void | clearSelection () |
Private Member Functions | |
bool | readMapping (int) |
void | updateHudText (TraplasObject *upd) |
Private Attributes | |
Dispatcher * | dis |
UserInterface * | ui |
osgProducer::Viewer * | view |
string | trackingCamName |
string | previousCamName |
map< int, TraplasObject * > | world |
vector< TraplasObject * > | selected |
osg::Group * | osgRoot |
map< int, string > | tileMap |
double | tilescale |
string | transmodel |
double | transscale |
string | cargomodel |
double | cargoscale |
pthread_t | osg_update_loop |
double | pausetime |
Friends | |
void * | go (void *none) |
StateControl maintains information about relations between the classes in TraplasObject.h and OSG.
osg uml class diagram. For a more comprehensive view see the manual.
Definition at line 91 of file StateControl.h.
|
Constructor
Definition at line 148 of file StateControl.cpp. References CARGO, dis, go, LOCATION, osg_update_loop, osgRoot, pausetime, readMapping(), TRANSPORT, ui, and view. Here is the call graph for this function: ![]() |
|
Destructor Definition at line 222 of file StateControl.cpp. References ui. |
|
Adds the specified amount to the timeFlowFactor (or timescale) in MessageController.
Definition at line 571 of file StateControl.cpp. References dis, Dispatcher::getTimeFlow(), and Dispatcher::setTimeFlow(). Referenced by UserInterface::buttonAction(). Here is the call graph for this function: ![]() |
|
Creates an one-way arc between two infrastructure resources.
Definition at line 554 of file StateControl.cpp. References Infrastructure::addArc(), TraplasObject::getModel(), and world. Referenced by Dispatcher::arcparse(). Here is the call graph for this function: ![]() |
|
Clears all selections. Removes information texts from the HUD. Definition at line 636 of file StateControl.cpp. References UserInterface::rmHUDText(), selected, and ui. Referenced by UserInterface::selectionAction(). Here is the call graph for this function: ![]() |
|
removes one object from the selection. If information about this object is also being displayed in the HUD it, too is removed.
Definition at line 621 of file StateControl.cpp. References UserInterface::rmHUDText(), selected, TraplasObject::toString(), and ui. Referenced by rmcarg(), UserInterface::selectionAction(), and trdel(). Here is the call graph for this function: ![]() |
|
Sets a drive action on the specified transport resource.
Definition at line 279 of file StateControl.cpp. References dis, TraplasObject::getModel(), TraplasObject::getPosition(), Dispatcher::getTimeFlow(), Transport::setDestination(), AnimationPathTimedCallback::setTimeReference(), and world. Referenced by Dispatcher::drvparse(). Here is the call graph for this function: ![]() |
|
Definition at line 614 of file StateControl.cpp. References selected. |
|
Definition at line 206 of file StateControl.h. References osgRoot. Referenced by go(). |
|
Definition at line 584 of file StateControl.cpp. References dis, and Dispatcher::getTime(). Referenced by UserInterface::createHud(), and UserInterface::updateClock(). Here is the call graph for this function: ![]() |
|
Definition at line 580 of file StateControl.cpp. References dis, and Dispatcher::getTimeFlow(). Referenced by UserInterface::createHud(), and UserInterface::updateClock(). Here is the call graph for this function: ![]() |
|
Sets an load action for the specified transport resource.
Definition at line 324 of file StateControl.cpp. References TraplasObject::getModel(), TraplasObject::isSelected(), Infrastructure::removeCarg(), Transport::setCargo(), updateHudText(), and world. Referenced by Dispatcher::loadparse(). Here is the call graph for this function: ![]() |
|
Creates a new location object and loads the relevant osg-model.
Definition at line 226 of file StateControl.cpp. References TraplasObject::initLabel(), LOCATION, osgRoot, TraplasObject::setDescription(), TraplasObject::setLabel(), tileMap, tilescale, and world. Referenced by Dispatcher::locationparse(). Here is the call graph for this function: ![]() |
|
Creates a new cargo object
Definition at line 492 of file StateControl.cpp. References Infrastructure::addCarg(), CARGO, cargomodel, cargoscale, TraplasObject::getModel(), TraplasObject::initLabel(), TraplasObject::setDescription(), TraplasObject::setLabel(), and world. Referenced by Dispatcher::newcargparse(). Here is the call graph for this function: ![]() |
|
Pauses the visualisation. Definition at line 588 of file StateControl.cpp. References dis, Dispatcher::getTimeFlow(), pausetime, and Dispatcher::setTimeFlow(). Referenced by UserInterface::buttonAction(), and UserEventHandler::handle(). Here is the call graph for this function: ![]() |
|
Definition at line 165 of file StateControl.cpp. References CARGO, cargomodel, cargoscale, LOCATION, tileMap, tilescale, transmodel, TRANSPORT, and transscale. Referenced by StateControl(). |
|
Removes the specified cargo object from the visualisation.
Definition at line 534 of file StateControl.cpp. References deselectObject(), TraplasObject::getModel(), TraplasObject::isSelected(), and world. Referenced by Dispatcher::rmcargparse(). Here is the call graph for this function: ![]() |
|
Adds an object to the vector with selected objects. Adds information about the object to the HUD.
Definition at line 601 of file StateControl.cpp. References TraplasObject::select(), selected, UserInterface::setHUDText(), TraplasObject::toString(), and ui. Referenced by UserInterface::selectionAction(). Here is the call graph for this function: ![]() |
|
Sets the speed for the specified resource. Can be a transport resource or an infrastructure resource.
Definition at line 412 of file StateControl.cpp. References TraplasObject::isSelected(), Transport::setSpeed(), updateHudText(), and world. Referenced by Dispatcher::setspdparse(). Here is the call graph for this function: ![]() |
|
Removes the specified transport resource from the visualisation.
Definition at line 470 of file StateControl.cpp. References deselectObject(), Transport::getCargo(), TraplasObject::getModel(), TraplasObject::isSelected(), osgRoot, and world. Referenced by Dispatcher::trdelparse(). Here is the call graph for this function: ![]() |
|
Creates a new transport object and loads the relevant osg-model.
Definition at line 426 of file StateControl.cpp. References TraplasObject::getPosition(), TraplasObject::initLabel(), osgRoot, TraplasObject::setDescription(), TraplasObject::setLabel(), transmodel, TRANSPORT, transscale, and world. Referenced by Dispatcher::trnewparse(). Here is the call graph for this function: ![]() |
|
Sets an unload action for the specified transport resource.
Definition at line 364 of file StateControl.cpp. References Infrastructure::addCarg(), Transport::clearCargo(), Transport::getCargo(), TraplasObject::getModel(), TraplasObject::isSelected(), updateHudText(), and world. Referenced by Dispatcher::unloadparse(). Here is the call graph for this function: ![]() |
|
Definition at line 675 of file StateControl.cpp. References UserInterface::rmHUDText(), UserInterface::setHUDText(), TraplasObject::toString(), and ui. Referenced by load(), setspdinviz(), and unload(). Here is the call graph for this function: ![]() |
|
The thread responsible for initializing osg, setting up a viewer and starting an osg loop lives in this function.
Definition at line 106 of file StateControl.cpp. Referenced by StateControl(). |
|
Definition at line 274 of file StateControl.h. Referenced by newcarg(), and readMapping(). |
|
Definition at line 275 of file StateControl.h. Referenced by newcarg(), and readMapping(). |
|
Definition at line 262 of file StateControl.h. Referenced by adjustTimeFlow(), drv(), getTime(), getTimeFlow(), go(), pause(), and StateControl(). |
|
Definition at line 276 of file StateControl.h. Referenced by StateControl(). |
|
Definition at line 269 of file StateControl.h. Referenced by getOsgRoot(), location(), StateControl(), trdel(), and trnew(). |
|
Definition at line 279 of file StateControl.h. Referenced by pause(), and StateControl(). |
|
Definition at line 266 of file StateControl.h. |
|
Definition at line 268 of file StateControl.h. Referenced by clearSelection(), deselectObject(), getLastSelected(), and selectObject(). |
|
Definition at line 270 of file StateControl.h. Referenced by location(), and readMapping(). |
|
Definition at line 271 of file StateControl.h. Referenced by location(), and readMapping(). |
|
Definition at line 265 of file StateControl.h. |
|
Definition at line 272 of file StateControl.h. Referenced by readMapping(), and trnew(). |
|
Definition at line 273 of file StateControl.h. Referenced by readMapping(), and trnew(). |
|
Definition at line 263 of file StateControl.h. Referenced by clearSelection(), deselectObject(), go(), selectObject(), StateControl(), updateHudText(), and ~StateControl(). |
|
Definition at line 264 of file StateControl.h. Referenced by go(), and StateControl(). |
|
Definition at line 267 of file StateControl.h. Referenced by arc(), drv(), load(), location(), newcarg(), rmcarg(), setspdinviz(), trdel(), trnew(), and unload(). |