SUMO - Simulation of Urban MObility
|
#include <GUIViewTraffic.h>
Public Types | |
enum | JunctionColoringScheme { VCS_BY_TYPE = 0 } |
Public Member Functions | |
void | addDecals (const std::vector< Decal > &decals) |
virtual void | buildViewToolBars (GUIGlChildWindow &) |
builds the view toolbars | |
void | centerTo (GUIGlID id, bool applyZoom, SUMOReal zoomDist=20) |
centers to the chosen artifact | |
void | centerTo (const Boundary &bound) |
centers to the chosen artifact | |
void | destroyPopup () |
destoys the popup | |
GUIPerspectiveChanger & | getChanger () const |
FXComboBox & | getColoringSchemesCombo () |
SUMOTime | getCurrentTimeStep () const |
get the current simulation time | |
SUMOReal | getGridHeight () const |
SUMOReal | getGridWidth () const |
Position | getPositionInformation () const |
Returns the cursor's x/y position within the network. | |
int | getTrackedID () const |
Returns the id of the tracked vehicle (-1 if none) | |
Boundary | getVisibleBoundary () const |
const GUIVisualizationSettings * | getVisualisationSettings () |
GUIViewTraffic (FXComposite *p, GUIMainWindow &app, GUISUMOViewParent *parent, GUINet &net, FXGLVisual *glVis, FXGLCanvas *share) | |
constructor | |
bool | isInEditMode () |
returns true, if the edit button was pressed | |
SUMOReal | m2p (SUMOReal meter) const |
meter-to-pixels conversion method | |
FXbool | makeCurrent () |
A reimplementation due to some internal reasons. | |
virtual long | onConfigure (FXObject *, FXSelector, void *) |
void | onGamingClick (Position pos) |
handle mouse click in gaming mode | |
virtual long | onKeyPress (FXObject *o, FXSelector sel, void *data) |
virtual long | onKeyRelease (FXObject *o, FXSelector sel, void *data) |
virtual long | onLeftBtnPress (FXObject *, FXSelector, void *) |
virtual long | onLeftBtnRelease (FXObject *, FXSelector, void *) |
virtual long | onMouseLeft (FXObject *, FXSelector, void *) |
virtual long | onMouseMove (FXObject *, FXSelector, void *) |
virtual long | onMouseWheel (FXObject *, FXSelector, void *) |
virtual long | onPaint (FXObject *, FXSelector, void *) |
virtual long | onRightBtnPress (FXObject *, FXSelector, void *) |
virtual long | onRightBtnRelease (FXObject *, FXSelector, void *) |
virtual void | openObjectDialog () |
SUMOReal | p2m (SUMOReal pixel) const |
pixels-to-meters conversion method | |
void | recenterView () |
recenters the view | |
void | remove (GUIDialog_EditViewport *) |
void | remove (GUIDialog_ViewSettings *) |
bool | setColorScheme (const std::string &name) |
virtual void | setViewport (SUMOReal zoom, SUMOReal xPos, SUMOReal yPos) |
applies the given viewport settings | |
void | setWindowCursorPosition (FXint x, FXint y) |
Returns the information whether rotation is allowd. | |
void | showToolTips (bool val) |
void | showViewportEditor () |
void | showViewschemeEditor () |
void | startTrack (int id) |
Starts vehicle tracking. | |
void | stopTrack () |
Stops vehicle tracking. | |
void | updateToolTip () |
A method that updates the tooltip. | |
virtual | ~GUIViewTraffic () |
destructor | |
Dealing with snapshots | |
void | setSnapshots (std::map< SUMOTime, std::string > snaps) |
Sets the snapshot time to file map. | |
std::string | makeSnapshot (const std::string &destFile) |
Takes a snapshots and writes it into the given file. | |
void | checkSnapshots () |
Checks whether it is time for a snapshot. | |
Additional visualisations | |
bool | addAdditionalGLVisualisation (GUIGlObject *const which) |
Adds an object to call its additional visualisation method. | |
bool | removeAdditionalGLVisualisation (GUIGlObject *const which) |
Removes an object from the list of objects that show additional things. | |
Protected Member Functions | |
void | applyGLTransform (bool fixRatio=true) |
void | displayLegend () |
virtual void | doInit () |
int | doPaintGL (int mode, const Boundary &bound) |
void | drawDecals () |
Draws the stored decals. | |
GUIGlID | getObjectAtPosition (Position pos) |
returns the id of the object at position using GL_SELECT | |
std::vector< GUIGlID > | getObjectsInBoundary (const Boundary &bound) |
returns the ids of all objects in the given boundary | |
GUIGlID | getObjectUnderCursor () |
returns the id of the object under the cursor using GL_SELECT | |
GUIViewTraffic () | |
void | paintGL () |
performs the painting of the simulation | |
void | paintGLGrid () |
paints a grid | |
void | showToolTipFor (unsigned int id) |
invokes the tooltip for the given object | |
void | updatePositionInformation () const |
Protected Attributes | |
std::map< GUIGlObject *, int > | myAdditionallyDrawn |
List of objects for which GUIGlObject::drawGLAdditional is called. | |
bool | myAmInitialised |
Internal information whether doInit() was called. | |
GUIMainWindow * | myApp |
The application. | |
GUIPerspectiveChanger * | myChanger |
The perspective changer. | |
SUMORTree * | myGrid |
The visualization speed-up. | |
bool | myInEditMode |
Information whether too-tip informations shall be generated. | |
int | myMouseHotspotX |
Offset to the mouse-hotspot from the mouse position. | |
int | myMouseHotspotY |
GUIGlChildWindow * | myParent |
The parent window. | |
MFXMutex | myPolyDrawLock |
GUIGLObjectPopupMenu * | myPopup |
The current popup-menu. | |
std::map< SUMOTime, std::string > | mySnapshots |
bool | myUseToolTips |
GUIDialog_EditViewport * | myViewportChooser |
GUIDialog_ViewSettings * | myVisualizationChanger |
GUIVisualizationSettings * | myVisualizationSettings |
FXint | myWindowCursorPositionX |
Position of the cursor relative to the window. | |
FXint | myWindowCursorPositionY |
Optionally shown decals | |
std::vector< Decal > | myDecals |
The list of decals to show. | |
MFXMutex | myDecalsLock |
The mutex to use before accessing the decals list in order to avoid thread conficts. | |
Private Attributes | |
int | myTrackedID |
Microsocopic view at the simulation
Definition at line 63 of file GUIViewTraffic.h.
enum GUISUMOAbstractView::JunctionColoringScheme [inherited] |
JunctionColoringScheme This enumeration holds the possible vehicle colouring schemes
Definition at line 237 of file GUISUMOAbstractView.h.
GUIViewTraffic::GUIViewTraffic | ( | FXComposite * | p, |
GUIMainWindow & | app, | ||
GUISUMOViewParent * | parent, | ||
GUINet & | net, | ||
FXGLVisual * | glVis, | ||
FXGLCanvas * | share | ||
) |
constructor
Definition at line 82 of file GUIViewTraffic.cpp.
GUIViewTraffic::~GUIViewTraffic | ( | ) | [virtual] |
destructor
Definition at line 92 of file GUIViewTraffic.cpp.
GUIViewTraffic::GUIViewTraffic | ( | ) | [inline, protected] |
Definition at line 110 of file GUIViewTraffic.h.
bool GUISUMOAbstractView::addAdditionalGLVisualisation | ( | GUIGlObject *const | which | ) | [inherited] |
Adds an object to call its additional visualisation method.
[in] | which | The object to add |
Definition at line 969 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myAdditionallyDrawn.
Referenced by GUIVehicle::addActiveAddVisualisation().
void GUISUMOAbstractView::addDecals | ( | const std::vector< Decal > & | decals | ) | [inline, inherited] |
Definition at line 281 of file GUISUMOAbstractView.h.
References GUISUMOAbstractView::myDecals.
Referenced by GUIApplicationWindow::handleEvent_SimulationLoaded().
void GUISUMOAbstractView::applyGLTransform | ( | bool | fixRatio = true | ) | [protected, inherited] |
Definition at line 1000 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), GLO_MAX, GUISUMOAbstractView::myChanger, SUMOReal, Boundary::xmin(), and Boundary::ymin().
Referenced by GUISUMOAbstractView::getObjectsInBoundary(), GUISUMOAbstractView::makeSnapshot(), and GUISUMOAbstractView::paintGL().
void GUIViewTraffic::buildViewToolBars | ( | GUIGlChildWindow & | v | ) | [virtual] |
builds the view toolbars
Reimplemented from GUISUMOAbstractView.
Definition at line 97 of file GUIViewTraffic.cpp.
References GUIGlChildWindow::getColoringSchemesCombo(), GUIIconSubSys::getIcon(), GUIGlChildWindow::getLocatorPopup(), GUICompleteSchemeStorage::getNames(), gSchemeStorage, MSGlobals::gUseMesoSim, ICON_LOCATEADD, ICON_LOCATEEDGE, ICON_LOCATEJUNCTION, ICON_LOCATESHAPE, ICON_LOCATETLS, ICON_LOCATEVEHICLE, MID_LOCATEADD, MID_LOCATEEDGE, MID_LOCATEJUNCTION, MID_LOCATESHAPE, MID_LOCATETLS, MID_LOCATEVEHICLE, GUISUMOAbstractView::myVisualizationSettings, and GUIVisualizationSettings::name.
void GUISUMOAbstractView::centerTo | ( | GUIGlID | id, |
bool | applyZoom, | ||
SUMOReal | zoomDist = 20 |
||
) | [inherited] |
centers to the chosen artifact
[in] | id | The id of the artifact to center to |
[in] | applyZoom | Whether to zoom in |
[in] | zoomDist | The distance in m to use for the zoom, values < 0 means: use the centeringBoundary |
Definition at line 481 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::centerTo(), Boundary::getCenter(), GUIGlObject::getCenteringBoundary(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObjectStorage::gIDStorage, GUISUMOAbstractView::myChanger, GUIPerspectiveChanger::setViewport(), and GUIGlObjectStorage::unblockObject().
Referenced by GUIGLObjectPopupMenu::onCmdCenter(), GUISUMOAbstractView::paintGL(), TraCIServerAPI_GUI::processSet(), and GUIGlChildWindow::setView().
void GUISUMOAbstractView::centerTo | ( | const Boundary & | bound | ) | [inherited] |
centers to the chosen artifact
Definition at line 495 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myChanger, and GUIPerspectiveChanger::setViewport().
void GUISUMOAbstractView::checkSnapshots | ( | ) | [inherited] |
Checks whether it is time for a snapshot.
Definition at line 874 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::getCurrentTimeStep(), GUISUMOAbstractView::makeSnapshot(), GUISUMOAbstractView::mySnapshots, and WRITE_WARNING.
Referenced by GUISUMOAbstractView::onConfigure(), and GUISUMOViewParent::onSimStep().
void GUISUMOAbstractView::destroyPopup | ( | ) | [inherited] |
destoys the popup
Definition at line 554 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myPopup.
Referenced by GUISUMOAbstractView::onLeftBtnPress(), GUISUMOAbstractView::onLeftBtnRelease(), GUISUMOAbstractView::onRightBtnPress(), and GUISUMOAbstractView::onRightBtnRelease().
void GUISUMOAbstractView::displayLegend | ( | ) | [protected, inherited] |
brief Draws the size legend
Draws a line with ticks, and the length information.
Definition at line 391 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::m2p(), pfDrawString(), pfSetPosition(), pfSetScaleXY(), and SUMOReal.
Referenced by GUISUMOAbstractView::makeSnapshot(), and GUISUMOAbstractView::paintGL().
virtual void GUISUMOAbstractView::doInit | ( | ) | [inline, protected, virtual, inherited] |
Definition at line 302 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::onConfigure().
int GUIViewTraffic::doPaintGL | ( | int | mode, |
const Boundary & | bound | ||
) | [protected, virtual] |
Reimplemented from GUISUMOAbstractView.
Definition at line 163 of file GUIViewTraffic.cpp.
References GUISUMOAbstractView::drawDecals(), GUISUMOAbstractView::m2p(), GUISUMOAbstractView::myAdditionallyDrawn, GUISUMOAbstractView::myGrid, GUISUMOAbstractView::myUseToolTips, GUISUMOAbstractView::myVisualizationSettings, GUISUMOAbstractView::paintGLGrid(), GUIVisualizationSettings::scale, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Search(), GUIVisualizationSettings::showGrid, SUMO_const_laneWidth, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
void GUISUMOAbstractView::drawDecals | ( | ) | [protected, inherited] |
Draws the stored decals.
Definition at line 933 of file GUISUMOAbstractView.cpp.
References GUITexturesHelper::add(), GUISUMOAbstractView::Decal::centerX, GUISUMOAbstractView::Decal::centerY, GUITexturesHelper::drawTexturedBox(), GUISUMOAbstractView::Decal::filename, GUISUMOAbstractView::Decal::glID, GUISUMOAbstractView::Decal::height, GUISUMOAbstractView::Decal::initialised, MFXImageHelper::loadImage(), MFXMutex::lock(), GUISUMOAbstractView::myDecals, GUISUMOAbstractView::myDecalsLock, GUISUMOAbstractView::Decal::rot, MFXImageHelper::scalePower2(), SUMOReal, MFXMutex::unlock(), GUISUMOAbstractView::Decal::width, WRITE_ERROR, and WRITE_WARNING.
Referenced by doPaintGL(), and GUISUMOAbstractView::makeSnapshot().
GUIPerspectiveChanger& GUISUMOAbstractView::getChanger | ( | ) | const [inline, inherited] |
Definition at line 123 of file GUISUMOAbstractView.h.
References GUISUMOAbstractView::myChanger.
Referenced by TraCIServerAPI_GUI::processGet(), and TraCIServerAPI_GUI::processSet().
FXComboBox & GUISUMOAbstractView::getColoringSchemesCombo | ( | ) | [inherited] |
Definition at line 927 of file GUISUMOAbstractView.cpp.
References GUIGlChildWindow::getColoringSchemesCombo(), and GUISUMOAbstractView::myParent.
Referenced by GUISettingsHandler::addSettings(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), and TraCIServerAPI_GUI::processGet().
SUMOTime GUIViewTraffic::getCurrentTimeStep | ( | ) | const [virtual] |
get the current simulation time
Reimplemented from GUISUMOAbstractView.
Definition at line 289 of file GUIViewTraffic.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by onGamingClick().
SUMOReal GUISUMOAbstractView::getGridHeight | ( | ) | const [inherited] |
Definition at line 921 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), and GUISUMOAbstractView::myGrid.
Referenced by GUIDialog_ViewSettings::onCmdEditTable().
SUMOReal GUISUMOAbstractView::getGridWidth | ( | ) | const [inherited] |
Definition at line 915 of file GUISUMOAbstractView.cpp.
References Boundary::getWidth(), and GUISUMOAbstractView::myGrid.
Referenced by GUIDialog_ViewSettings::onCmdEditTable().
GUIGlID GUISUMOAbstractView::getObjectAtPosition | ( | Position | pos | ) | [protected, inherited] |
returns the id of the object at position using GL_SELECT
Definition at line 258 of file GUISUMOAbstractView.cpp.
References Boundary::add(), GUIGlObject::getGlID(), GUIGlObjectStorage::getObjectBlocking(), GUISUMOAbstractView::getObjectsInBoundary(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_MAX, GLO_SHAPE, Boundary::grow(), SUMOReal, and GUIGlObjectStorage::unblockObject().
Referenced by GUISUMOAbstractView::getObjectUnderCursor().
std::vector< GUIGlID > GUISUMOAbstractView::getObjectsInBoundary | ( | const Boundary & | bound | ) | [protected, inherited] |
returns the ids of all objects in the given boundary
Definition at line 314 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::applyGLTransform(), GUISUMOAbstractView::doPaintGL(), GUIPerspectiveChanger::getViewport(), GUISUMOAbstractView::myApp, GUISUMOAbstractView::myChanger, GUIMainWindow::setStatusBarText(), GUIPerspectiveChanger::setViewport(), and toString().
Referenced by GUISUMOAbstractView::getObjectAtPosition().
GUIGlID GUISUMOAbstractView::getObjectUnderCursor | ( | ) | [protected, inherited] |
returns the id of the object under the cursor using GL_SELECT
Definition at line 252 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::getObjectAtPosition(), and GUISUMOAbstractView::getPositionInformation().
Referenced by GUISUMOAbstractView::onLeftBtnPress(), GUISUMOAbstractView::openObjectDialog(), and GUISUMOAbstractView::paintGL().
Position GUISUMOAbstractView::getPositionInformation | ( | ) | const [inherited] |
Returns the cursor's x/y position within the network.
Definition at line 169 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), GUISUMOAbstractView::myChanger, GUISUMOAbstractView::myWindowCursorPositionX, GUISUMOAbstractView::myWindowCursorPositionY, SUMOReal, Boundary::xmin(), and Boundary::ymin().
Referenced by GUISUMOAbstractView::getObjectUnderCursor(), GUILaneWrapper::getPopUpMenu(), GUISUMOAbstractView::onLeftBtnRelease(), GUIDanielPerspectiveChanger::onMouseWheel(), GUIDanielPerspectiveChanger::onRightBtnPress(), GUISUMOAbstractView::showToolTipFor(), and GUISUMOAbstractView::updatePositionInformation().
int GUIViewTraffic::getTrackedID | ( | ) | const [virtual] |
Returns the id of the tracked vehicle (-1 if none)
Reimplemented from GUISUMOAbstractView.
Definition at line 226 of file GUIViewTraffic.cpp.
References myTrackedID.
Boundary GUISUMOAbstractView::getVisibleBoundary | ( | ) | const [inherited] |
Definition at line 194 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), and GUISUMOAbstractView::myChanger.
Referenced by TraCIServerAPI_GUI::processGet().
const GUIVisualizationSettings* GUISUMOAbstractView::getVisualisationSettings | ( | ) | [inline, inherited] |
Definition at line 286 of file GUISUMOAbstractView.h.
References GUISUMOAbstractView::myVisualizationSettings.
bool GUISUMOAbstractView::isInEditMode | ( | ) | [inherited] |
returns true, if the edit button was pressed
Definition at line 154 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myInEditMode.
SUMOReal GUISUMOAbstractView::m2p | ( | SUMOReal | meter | ) | const [inherited] |
meter-to-pixels conversion method
Definition at line 463 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), and GUISUMOAbstractView::myChanger.
Referenced by GUISUMOAbstractView::displayLegend(), doPaintGL(), and GUISUMOAbstractView::makeSnapshot().
FXbool GUISUMOAbstractView::makeCurrent | ( | ) | [inherited] |
A reimplementation due to some internal reasons.
Definition at line 516 of file GUISUMOAbstractView.cpp.
Referenced by GUISUMOAbstractView::makeSnapshot(), GUISUMOAbstractView::onConfigure(), GUISUMOAbstractView::onLeftBtnPress(), GUISUMOAbstractView::onPaint(), and GUISUMOAbstractView::openObjectDialog().
std::string GUISUMOAbstractView::makeSnapshot | ( | const std::string & | destFile | ) | [inherited] |
Takes a snapshots and writes it into the given file.
The format to use is determined from the extension.
[in] | destFile | The name of the file to write the snapshot into |
Definition at line 731 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::antialiase, GUISUMOAbstractView::applyGLTransform(), GUIVisualizationSettings::backgroundColor, RGBColor::blue(), GUISUMOAbstractView::displayLegend(), GUIVisualizationSettings::dither, GUISUMOAbstractView::doPaintGL(), GUISUMOAbstractView::drawDecals(), GUIPerspectiveChanger::getViewport(), GL2PS_DRAW_BACKGROUND, GL2PS_EPS, GL2PS_OVERFLOW, GL2PS_PDF, GL2PS_PGF, GL2PS_PS, GL2PS_SIMPLE_SORT, GL2PS_SVG, GL2PS_TEX, GL2PS_USE_CURRENT_VIEWPORT, gl2psBeginPage(), gl2psEndPage(), RGBColor::green(), GUISUMOAbstractView::m2p(), GUISUMOAbstractView::makeCurrent(), GUISUMOAbstractView::myChanger, GUISUMOAbstractView::myGrid, GUISUMOAbstractView::myUseToolTips, GUISUMOAbstractView::myVisualizationSettings, GUISUMOAbstractView::paintGLGrid(), RGBColor::red(), MFXImageHelper::saveImage(), GUIVisualizationSettings::scale, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Search(), GUIVisualizationSettings::showGrid, GUIVisualizationSettings::showSizeLegend, FXSingleEventThread::sleep(), SUMO_const_laneWidth, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by GUISUMOAbstractView::checkSnapshots(), GUISUMOViewParent::onCmdMakeSnapshot(), and TraCIServerAPI_GUI::processSet().
long GUISUMOAbstractView::onConfigure | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) | [virtual, inherited] |
Definition at line 523 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::backgroundColor, RGBColor::blue(), GUISUMOAbstractView::checkSnapshots(), GUISUMOAbstractView::doInit(), RGBColor::green(), GUISUMOAbstractView::makeCurrent(), GUISUMOAbstractView::myAmInitialised, GUISUMOAbstractView::myVisualizationSettings, and RGBColor::red().
void GUIViewTraffic::onGamingClick | ( | Position | pos | ) | [virtual] |
handle mouse click in gaming mode
Reimplemented from GUISUMOAbstractView.
Definition at line 247 of file GUIViewTraffic.cpp.
References MSSimpleTrafficLightLogic::changeStepAndDuration(), Position::distanceTo(), MSPhaseDefinition::duration, MSTLLogicControl::get(), MSTLLogicControl::TLSLogicVariants::getAllLogics(), MSTLLogicControl::getAllLogics(), getCurrentTimeStep(), MSTrafficLightLogic::getID(), MSNet::getInstance(), MSTrafficLightLogic::getLanesAt(), MSSimpleTrafficLightLogic::getPhase(), MSTrafficLightLogic::getProgramID(), MSNet::getTLSControl(), MSTLLogicControl::isActive(), SUMOReal, and MSTLLogicControl::switchTo().
long GUISUMOAbstractView::onKeyPress | ( | FXObject * | o, |
FXSelector | sel, | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 684 of file GUISUMOAbstractView.cpp.
long GUISUMOAbstractView::onKeyRelease | ( | FXObject * | o, |
FXSelector | sel, | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 713 of file GUISUMOAbstractView.cpp.
long GUISUMOAbstractView::onLeftBtnPress | ( | FXObject * | , |
FXSelector | , | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 561 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::destroyPopup(), GUISUMOAbstractView::getObjectUnderCursor(), gSelected, GUISUMOAbstractView::makeCurrent(), GUISUMOAbstractView::myChanger, GUIPerspectiveChanger::onLeftBtnPress(), and GUISelectedStorage::toggleSelection().
long GUISUMOAbstractView::onLeftBtnRelease | ( | FXObject * | , |
FXSelector | , | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 587 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::destroyPopup(), GUISUMOAbstractView::getPositionInformation(), GUIMainWindow::isGaming(), GUISUMOAbstractView::myApp, GUISUMOAbstractView::myChanger, GUISUMOAbstractView::onGamingClick(), and GUIPerspectiveChanger::onLeftBtnRelease().
long GUISUMOAbstractView::onMouseLeft | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) | [virtual, inherited] |
Definition at line 646 of file GUISUMOAbstractView.cpp.
long GUISUMOAbstractView::onMouseMove | ( | FXObject * | , |
FXSelector | , | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 626 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), GUIDialog_EditViewport::haveGrabbed(), GUISUMOAbstractView::myChanger, GUISUMOAbstractView::myViewportChooser, GUIPerspectiveChanger::onMouseMove(), GUIDialog_EditViewport::setValues(), SUMOReal, and GUISUMOAbstractView::updatePositionInformation().
long GUISUMOAbstractView::onMouseWheel | ( | FXObject * | , |
FXSelector | , | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 619 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myChanger, and GUIPerspectiveChanger::onMouseWheel().
long GUISUMOAbstractView::onPaint | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) | [virtual, inherited] |
Definition at line 541 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::makeCurrent(), GUISUMOAbstractView::myAmInitialised, and GUISUMOAbstractView::paintGL().
long GUISUMOAbstractView::onRightBtnPress | ( | FXObject * | , |
FXSelector | , | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 599 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::destroyPopup(), GUISUMOAbstractView::myChanger, and GUIPerspectiveChanger::onRightBtnPress().
long GUISUMOAbstractView::onRightBtnRelease | ( | FXObject * | , |
FXSelector | , | ||
void * | data | ||
) | [virtual, inherited] |
Definition at line 608 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::destroyPopup(), GUIMainWindow::isGaming(), GUISUMOAbstractView::myApp, GUISUMOAbstractView::myChanger, GUIPerspectiveChanger::onRightBtnRelease(), and GUISUMOAbstractView::openObjectDialog().
void GUISUMOAbstractView::openObjectDialog | ( | ) | [virtual, inherited] |
Definition at line 652 of file GUISUMOAbstractView.cpp.
References GUIGlObjectStorage::getNetObject(), GUIGlObjectStorage::getObjectBlocking(), GUISUMOAbstractView::getObjectUnderCursor(), GUIGlObject::getPopUpMenu(), GUIGlObjectStorage::gIDStorage, GUISUMOAbstractView::makeCurrent(), GUISUMOAbstractView::myAmInitialised, GUISUMOAbstractView::myApp, GUISUMOAbstractView::myChanger, GUISUMOAbstractView::myPopup, GUIPerspectiveChanger::onRightBtnRelease(), and GUIGlObjectStorage::unblockObject().
Referenced by GUISUMOAbstractView::onRightBtnRelease().
SUMOReal GUISUMOAbstractView::p2m | ( | SUMOReal | pixel | ) | const [inherited] |
pixels-to-meters conversion method
Definition at line 469 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), and GUISUMOAbstractView::myChanger.
Referenced by GUIDanielPerspectiveChanger::changeCanvassLeft(), GUIDanielPerspectiveChanger::move(), and GUISUMOAbstractView::showToolTipFor().
void GUISUMOAbstractView::paintGL | ( | ) | [protected, inherited] |
performs the painting of the simulation
Definition at line 199 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::antialiase, GUISUMOAbstractView::applyGLTransform(), GUIVisualizationSettings::backgroundColor, RGBColor::blue(), GUISUMOAbstractView::centerTo(), GUISUMOAbstractView::displayLegend(), GUIVisualizationSettings::dither, GUISUMOAbstractView::doPaintGL(), GUISUMOAbstractView::getObjectUnderCursor(), GUISUMOAbstractView::getTrackedID(), GUIPerspectiveChanger::getViewport(), RGBColor::green(), GUISUMOAbstractView::myChanger, GUISUMOAbstractView::myUseToolTips, GUISUMOAbstractView::myVisualizationSettings, RGBColor::red(), GUIVisualizationSettings::showSizeLegend, and GUISUMOAbstractView::showToolTipFor().
Referenced by GUISUMOAbstractView::onPaint().
void GUISUMOAbstractView::paintGLGrid | ( | ) | [protected, inherited] |
paints a grid
Definition at line 359 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::gridXSize, GUIVisualizationSettings::gridYSize, GUISUMOAbstractView::myGrid, GUISUMOAbstractView::myVisualizationSettings, SUMOReal, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by doPaintGL(), and GUISUMOAbstractView::makeSnapshot().
void GUISUMOAbstractView::recenterView | ( | ) | [inherited] |
recenters the view
Definition at line 475 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myChanger, GUISUMOAbstractView::myGrid, and GUIPerspectiveChanger::setViewport().
Referenced by GUIGlChildWindow::onCmdRecenterView(), and GUICompleteSchemeStorage::setViewport().
void GUISUMOAbstractView::remove | ( | GUIDialog_EditViewport * | ) | [inline, inherited] |
Definition at line 186 of file GUISUMOAbstractView.h.
References GUISUMOAbstractView::myViewportChooser.
Referenced by GUIDialog_ViewSettings::~GUIDialog_ViewSettings().
void GUISUMOAbstractView::remove | ( | GUIDialog_ViewSettings * | ) | [inline, inherited] |
Definition at line 190 of file GUISUMOAbstractView.h.
References GUISUMOAbstractView::myVisualizationChanger.
bool GUISUMOAbstractView::removeAdditionalGLVisualisation | ( | GUIGlObject *const | which | ) | [inherited] |
Removes an object from the list of objects that show additional things.
[in] | which | The object to remoe |
Definition at line 981 of file GUISUMOAbstractView.cpp.
References GUIGlObject::getGlID(), GUISUMOAbstractView::getTrackedID(), GUISUMOAbstractView::myAdditionallyDrawn, and GUISUMOAbstractView::stopTrack().
Referenced by GUIVehicle::removeActiveAddVisualisation().
bool GUIViewTraffic::setColorScheme | ( | const std::string & | name | ) | [virtual] |
Reimplemented from GUISUMOAbstractView.
Definition at line 146 of file GUIViewTraffic.cpp.
References GUICompleteSchemeStorage::contains(), GUIVisualizationSettings::gaming, GUICompleteSchemeStorage::get(), GUIDialog_ViewSettings::getCurrentScheme(), gSchemeStorage, GUIMainWindow::isGaming(), GUISUMOAbstractView::myApp, GUISUMOAbstractView::myVisualizationChanger, GUISUMOAbstractView::myVisualizationSettings, and GUIDialog_ViewSettings::setCurrentScheme().
void GUISUMOAbstractView::setSnapshots | ( | std::map< SUMOTime, std::string > | snaps | ) | [inherited] |
Sets the snapshot time to file map.
[in] | snaps | The snapshots to take at certain times |
Definition at line 725 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::mySnapshots.
Referenced by GUISettingsHandler::setSnapshots().
void GUISUMOAbstractView::setViewport | ( | SUMOReal | zoom, |
SUMOReal | xPos, | ||
SUMOReal | yPos | ||
) | [virtual, inherited] |
applies the given viewport settings
Definition at line 901 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myChanger, and GUIPerspectiveChanger::setViewport().
Referenced by GUIDialog_EditViewport::onCmdCancel(), GUIDialog_EditViewport::onCmdChanged(), GUIDialog_EditViewport::onCmdLoad(), GUIDialog_EditViewport::onCmdOk(), TraCIServerAPI_GUI::processSet(), GUISettingsHandler::setViewport(), and GUICompleteSchemeStorage::setViewport().
void GUISUMOAbstractView::setWindowCursorPosition | ( | FXint | x, |
FXint | y | ||
) | [inherited] |
Returns the information whether rotation is allowd.
Returns the gl-id of the object under the given coordinates
Definition at line 509 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myMouseHotspotX, GUISUMOAbstractView::myMouseHotspotY, GUISUMOAbstractView::myWindowCursorPositionX, and GUISUMOAbstractView::myWindowCursorPositionY.
Referenced by GUIDanielPerspectiveChanger::onMouseMove().
void GUISUMOAbstractView::showToolTipFor | ( | unsigned int | id | ) | [protected, inherited] |
invokes the tooltip for the given object
Definition at line 345 of file GUISUMOAbstractView.cpp.
References Position::add(), GLHelper::drawTextBox(), GUIGlObject::getFullName(), GUIGlObjectStorage::getObjectBlocking(), GUISUMOAbstractView::getPositionInformation(), GUIGlObjectStorage::gIDStorage, GLO_MAX, GUISUMOAbstractView::p2m(), and GUIGlObjectStorage::unblockObject().
Referenced by GUISUMOAbstractView::paintGL().
void GUISUMOAbstractView::showToolTips | ( | bool | val | ) | [inherited] |
Definition at line 908 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myUseToolTips.
Referenced by GUIGlChildWindow::onCmdShowToolTips().
void GUISUMOAbstractView::showViewportEditor | ( | ) | [inherited] |
Definition at line 886 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), GUISUMOAbstractView::myChanger, GUISUMOAbstractView::myViewportChooser, and GUIDialog_EditViewport::setOldValues().
Referenced by GUIGlChildWindow::onCmdEditViewport().
void GUIViewTraffic::showViewschemeEditor | ( | ) | [virtual] |
Implements GUISUMOAbstractView.
Definition at line 232 of file GUIViewTraffic.cpp.
References GUISUMOAbstractView::myDecals, GUISUMOAbstractView::myDecalsLock, GUISUMOAbstractView::myVisualizationChanger, GUISUMOAbstractView::myVisualizationSettings, and GUIDialog_ViewSettings::setCurrent().
void GUIViewTraffic::startTrack | ( | int | id | ) | [virtual] |
Starts vehicle tracking.
[in] | id | The glID of the vehicle to track |
Reimplemented from GUISUMOAbstractView.
Definition at line 214 of file GUIViewTraffic.cpp.
References myTrackedID.
void GUIViewTraffic::stopTrack | ( | ) | [virtual] |
Stops vehicle tracking.
Reimplemented from GUISUMOAbstractView.
Definition at line 220 of file GUIViewTraffic.cpp.
References myTrackedID.
void GUISUMOAbstractView::updatePositionInformation | ( | ) | const [protected, inherited] |
Definition at line 179 of file GUISUMOAbstractView.cpp.
References GeoConvHelper::cartesian2geo(), GEO_OUTPUT_ACCURACY, GUIMainWindow::getCartesianLabel(), GeoConvHelper::getFinal(), GUIMainWindow::getGeoLabel(), GUISUMOAbstractView::getPositionInformation(), GUISUMOAbstractView::myApp, toString(), Position::x(), and Position::y().
Referenced by GUISUMOAbstractView::onMouseMove().
void GUISUMOAbstractView::updateToolTip | ( | ) | [inherited] |
A method that updates the tooltip.
Definition at line 160 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::myUseToolTips.
Referenced by GUIDanielPerspectiveChanger::onMouseMove(), and GUIDanielPerspectiveChanger::onMouseWheel().
std::map<GUIGlObject*, int> GUISUMOAbstractView::myAdditionallyDrawn [protected, inherited] |
List of objects for which GUIGlObject::drawGLAdditional is called.
Definition at line 391 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::addAdditionalGLVisualisation(), doPaintGL(), and GUISUMOAbstractView::removeAdditionalGLVisualisation().
bool GUISUMOAbstractView::myAmInitialised [protected, inherited] |
Internal information whether doInit() was called.
Definition at line 368 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::onConfigure(), GUISUMOAbstractView::onPaint(), and GUISUMOAbstractView::openObjectDialog().
GUIMainWindow* GUISUMOAbstractView::myApp [protected, inherited] |
The application.
Definition at line 340 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::getObjectsInBoundary(), GUISUMOAbstractView::onLeftBtnRelease(), GUISUMOAbstractView::onRightBtnRelease(), GUISUMOAbstractView::openObjectDialog(), setColorScheme(), and GUISUMOAbstractView::updatePositionInformation().
GUIPerspectiveChanger* GUISUMOAbstractView::myChanger [protected, inherited] |
The perspective changer.
Definition at line 349 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::applyGLTransform(), GUISUMOAbstractView::centerTo(), GUISUMOAbstractView::getChanger(), GUISUMOAbstractView::getObjectsInBoundary(), GUISUMOAbstractView::getPositionInformation(), GUISUMOAbstractView::getVisibleBoundary(), GUISUMOAbstractView::m2p(), GUISUMOAbstractView::makeSnapshot(), GUISUMOAbstractView::onLeftBtnPress(), GUISUMOAbstractView::onLeftBtnRelease(), GUISUMOAbstractView::onMouseMove(), GUISUMOAbstractView::onMouseWheel(), GUISUMOAbstractView::onRightBtnPress(), GUISUMOAbstractView::onRightBtnRelease(), GUISUMOAbstractView::openObjectDialog(), GUISUMOAbstractView::p2m(), GUISUMOAbstractView::paintGL(), GUISUMOAbstractView::recenterView(), GUISUMOAbstractView::setViewport(), GUISUMOAbstractView::showViewportEditor(), and GUISUMOAbstractView::~GUISUMOAbstractView().
std::vector<Decal> GUISUMOAbstractView::myDecals [protected, inherited] |
The list of decals to show.
Definition at line 379 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::addDecals(), GUISUMOAbstractView::drawDecals(), and showViewschemeEditor().
MFXMutex GUISUMOAbstractView::myDecalsLock [protected, inherited] |
The mutex to use before accessing the decals list in order to avoid thread conficts.
Definition at line 382 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::drawDecals(), and showViewschemeEditor().
SUMORTree* GUISUMOAbstractView::myGrid [protected, inherited] |
The visualization speed-up.
Definition at line 346 of file GUISUMOAbstractView.h.
Referenced by doPaintGL(), GUISUMOAbstractView::getGridHeight(), GUISUMOAbstractView::getGridWidth(), GUISUMOAbstractView::makeSnapshot(), GUISUMOAbstractView::paintGLGrid(), and GUISUMOAbstractView::recenterView().
bool GUISUMOAbstractView::myInEditMode [protected, inherited] |
Information whether too-tip informations shall be generated.
Definition at line 352 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::isInEditMode().
int GUISUMOAbstractView::myMouseHotspotX [protected, inherited] |
Offset to the mouse-hotspot from the mouse position.
Definition at line 358 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::setWindowCursorPosition().
int GUISUMOAbstractView::myMouseHotspotY [protected, inherited] |
Definition at line 358 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::setWindowCursorPosition().
GUIGlChildWindow* GUISUMOAbstractView::myParent [protected, inherited] |
The parent window.
Definition at line 343 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::getColoringSchemesCombo().
MFXMutex GUISUMOAbstractView::myPolyDrawLock [mutable, protected, inherited] |
Definition at line 388 of file GUISUMOAbstractView.h.
GUIGLObjectPopupMenu* GUISUMOAbstractView::myPopup [protected, inherited] |
The current popup-menu.
Definition at line 361 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::destroyPopup(), GUISUMOAbstractView::openObjectDialog(), and GUISUMOAbstractView::~GUISUMOAbstractView().
std::map<SUMOTime, std::string> GUISUMOAbstractView::mySnapshots [protected, inherited] |
Definition at line 386 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::checkSnapshots(), and GUISUMOAbstractView::setSnapshots().
int GUIViewTraffic::myTrackedID [private] |
Definition at line 107 of file GUIViewTraffic.h.
Referenced by getTrackedID(), startTrack(), and stopTrack().
bool GUISUMOAbstractView::myUseToolTips [protected, inherited] |
Definition at line 365 of file GUISUMOAbstractView.h.
Referenced by doPaintGL(), GUISUMOAbstractView::makeSnapshot(), GUISUMOAbstractView::paintGL(), GUISUMOAbstractView::showToolTips(), and GUISUMOAbstractView::updateToolTip().
GUIDialog_EditViewport* GUISUMOAbstractView::myViewportChooser [protected, inherited] |
Definition at line 371 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::onMouseMove(), GUISUMOAbstractView::remove(), GUISUMOAbstractView::showViewportEditor(), and GUISUMOAbstractView::~GUISUMOAbstractView().
GUIDialog_ViewSettings* GUISUMOAbstractView::myVisualizationChanger [protected, inherited] |
Definition at line 372 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::remove(), setColorScheme(), showViewschemeEditor(), and GUISUMOAbstractView::~GUISUMOAbstractView().
GUIVisualizationSettings* GUISUMOAbstractView::myVisualizationSettings [protected, inherited] |
Definition at line 363 of file GUISUMOAbstractView.h.
Referenced by buildViewToolBars(), doPaintGL(), GUISUMOAbstractView::getVisualisationSettings(), GUISUMOAbstractView::makeSnapshot(), GUISUMOAbstractView::onConfigure(), GUISUMOAbstractView::paintGL(), GUISUMOAbstractView::paintGLGrid(), setColorScheme(), showViewschemeEditor(), and GUISUMOAbstractView::~GUISUMOAbstractView().
FXint GUISUMOAbstractView::myWindowCursorPositionX [protected, inherited] |
Position of the cursor relative to the window.
Definition at line 355 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::getPositionInformation(), and GUISUMOAbstractView::setWindowCursorPosition().
FXint GUISUMOAbstractView::myWindowCursorPositionY [protected, inherited] |
Definition at line 355 of file GUISUMOAbstractView.h.
Referenced by GUISUMOAbstractView::getPositionInformation(), and GUISUMOAbstractView::setWindowCursorPosition().