|
SUMO - Simulation of Urban MObility
|
#include <GUISUMOAbstractView.h>
Data Structures | |
| struct | Decal |
| A decal (an image) that can be shown. More... | |
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 () |
| SUMOReal | getGridHeight () const |
| SUMOReal | getGridWidth () const |
| Position | getPositionInformation () const |
| Returns the cursor's x/y position within the network. | |
| virtual int | getTrackedID () const |
| Boundary | getVisibleBoundary () const |
| const GUIVisualizationSettings * | getVisualisationSettings () |
| GUISUMOAbstractView (FXComposite *p, GUIMainWindow &app, GUIGlChildWindow *parent, const SUMORTree &grid, 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. | |
| long | onConfigure (FXObject *, FXSelector, void *) |
| virtual void | onGamingClick (Position) |
| long | onKeyPress (FXObject *o, FXSelector sel, void *data) |
| 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 *) |
| 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 *) |
| virtual bool | setColorScheme (const std::string &) |
| 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 () |
| virtual void | showViewschemeEditor ()=0 |
| virtual void | startTrack (int) |
| virtual void | stopTrack () |
| void | updateToolTip () |
| A method that updates the tooltip. | |
| virtual | ~GUISUMOAbstractView () |
| 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. | |
| virtual SUMOTime | getCurrentTimeStep () const |
| get the current simulation time | |
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 () |
| virtual int | doPaintGL (int, const Boundary &) |
| 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 | |
| GUISUMOAbstractView () | |
| 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. | |
This class is meant to be pure virtual later; It shall be the main class to inherit views of the simulation (micro- or macroscopic ones) from it.
Definition at line 70 of file GUISUMOAbstractView.h.
JunctionColoringScheme This enumeration holds the possible vehicle colouring schemes
Definition at line 232 of file GUISUMOAbstractView.h.
| GUISUMOAbstractView::GUISUMOAbstractView | ( | FXComposite * | p, |
| GUIMainWindow & | app, | ||
| GUIGlChildWindow * | parent, | ||
| const SUMORTree & | grid, | ||
| FXGLVisual * | glVis, | ||
| FXGLCanvas * | share | ||
| ) |
constructor
Definition at line 108 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::gaming, GUICompleteSchemeStorage::getDefault(), gSchemeStorage, and GUICompleteSchemeStorage::setViewport().
| GUISUMOAbstractView::~GUISUMOAbstractView | ( | ) | [virtual] |
destructor
Definition at line 138 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), gSchemeStorage, myChanger, myPopup, myViewportChooser, myVisualizationChanger, myVisualizationSettings, GUIVisualizationSettings::name, GUICompleteSchemeStorage::saveViewport(), and GUICompleteSchemeStorage::setDefault().
| GUISUMOAbstractView::GUISUMOAbstractView | ( | ) | [inline, protected] |
Definition at line 390 of file GUISUMOAbstractView.h.
| bool GUISUMOAbstractView::addAdditionalGLVisualisation | ( | GUIGlObject *const | which | ) |
Adds an object to call its additional visualisation method.
| [in] | which | The object to add |
Definition at line 965 of file GUISUMOAbstractView.cpp.
References myAdditionallyDrawn.
| void GUISUMOAbstractView::addDecals | ( | const std::vector< Decal > & | decals | ) | [inline] |
Definition at line 276 of file GUISUMOAbstractView.h.
References myDecals.
Referenced by GUIApplicationWindow::handleEvent_SimulationLoaded().
| void GUISUMOAbstractView::applyGLTransform | ( | bool | fixRatio = true | ) | [protected] |
Definition at line 996 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), GLO_MAX, myChanger, SUMOReal, Boundary::xmin(), and Boundary::ymin().
Referenced by getObjectsInBoundary(), makeSnapshot(), and paintGL().
| virtual void GUISUMOAbstractView::buildViewToolBars | ( | GUIGlChildWindow & | ) | [inline, virtual] |
builds the view toolbars
Reimplemented in GUIViewTraffic.
Definition at line 82 of file GUISUMOAbstractView.h.
Referenced by GUISUMOViewParent::init().
| void GUISUMOAbstractView::centerTo | ( | const Boundary & | bound | ) |
centers to the chosen artifact
Definition at line 491 of file GUISUMOAbstractView.cpp.
References myChanger, and GUIPerspectiveChanger::setViewport().
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 476 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::centerTo(), Boundary::getCenter(), GUIGlObject::getCenteringBoundary(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObjectStorage::gIDStorage, myChanger, GUIPerspectiveChanger::setViewport(), and GUIGlObjectStorage::unblockObject().
Referenced by GUIGLObjectPopupMenu::onCmdCenter(), paintGL(), TraCIServerAPI_GUI::processSet(), and GUIGlChildWindow::setView().
| void GUISUMOAbstractView::checkSnapshots | ( | ) |
Checks whether it is time for a snapshot.
Definition at line 870 of file GUISUMOAbstractView.cpp.
References getCurrentTimeStep(), makeSnapshot(), mySnapshots, and WRITE_WARNING.
Referenced by onConfigure(), and GUISUMOViewParent::onSimStep().
| void GUISUMOAbstractView::destroyPopup | ( | ) |
destoys the popup
Definition at line 550 of file GUISUMOAbstractView.cpp.
References myPopup.
Referenced by onLeftBtnPress(), onLeftBtnRelease(), onRightBtnPress(), and onRightBtnRelease().
| void GUISUMOAbstractView::displayLegend | ( | ) | [protected] |
brief Draws the size legend
Draws a line with ticks, and the length information.
Definition at line 386 of file GUISUMOAbstractView.cpp.
References m2p(), pfDrawString(), pfSetPosition(), pfSetScaleXY(), SUMOReal, and text().
Referenced by makeSnapshot(), and paintGL().
| virtual void GUISUMOAbstractView::doInit | ( | ) | [inline, protected, virtual] |
Definition at line 297 of file GUISUMOAbstractView.h.
Referenced by onConfigure().
| virtual int GUISUMOAbstractView::doPaintGL | ( | int | , |
| const Boundary & | |||
| ) | [inline, protected, virtual] |
Reimplemented in GUIViewTraffic.
Definition at line 293 of file GUISUMOAbstractView.h.
Referenced by getObjectsInBoundary(), makeSnapshot(), and paintGL().
| void GUISUMOAbstractView::drawDecals | ( | ) | [protected] |
Draws the stored decals.
Definition at line 929 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(), myDecals, myDecalsLock, GUISUMOAbstractView::Decal::rot, MFXImageHelper::scalePower2(), SUMOReal, MFXMutex::unlock(), GUISUMOAbstractView::Decal::width, WRITE_ERROR, and WRITE_WARNING.
Referenced by GUIViewTraffic::doPaintGL(), and makeSnapshot().
| GUIPerspectiveChanger& GUISUMOAbstractView::getChanger | ( | ) | const [inline] |
Definition at line 118 of file GUISUMOAbstractView.h.
References myChanger.
Referenced by TraCIServerAPI_GUI::processGet(), and TraCIServerAPI_GUI::processSet().
| FXComboBox & GUISUMOAbstractView::getColoringSchemesCombo | ( | ) |
Definition at line 923 of file GUISUMOAbstractView.cpp.
References GUIGlChildWindow::getColoringSchemesCombo(), and myParent.
Referenced by GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), and TraCIServerAPI_GUI::processGet().
| virtual SUMOTime GUISUMOAbstractView::getCurrentTimeStep | ( | ) | const [inline, virtual] |
get the current simulation time
Reimplemented in GUIViewTraffic.
Definition at line 167 of file GUISUMOAbstractView.h.
Referenced by checkSnapshots().
| SUMOReal GUISUMOAbstractView::getGridHeight | ( | ) | const |
Definition at line 917 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), and myGrid.
Referenced by GUIDialog_ViewSettings::onCmdEditTable().
| SUMOReal GUISUMOAbstractView::getGridWidth | ( | ) | const |
Definition at line 911 of file GUISUMOAbstractView.cpp.
References Boundary::getWidth(), and myGrid.
Referenced by GUIDialog_ViewSettings::onCmdEditTable().
returns the id of the object at position using GL_SELECT
Definition at line 253 of file GUISUMOAbstractView.cpp.
References Boundary::add(), GUIGlObject::getGlID(), GUIGlObjectStorage::getObjectBlocking(), getObjectsInBoundary(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_MAX, GLO_SHAPE, Boundary::grow(), SUMOReal, and GUIGlObjectStorage::unblockObject().
Referenced by getObjectUnderCursor().
| std::vector< GUIGlID > GUISUMOAbstractView::getObjectsInBoundary | ( | const Boundary & | bound | ) | [protected] |
returns the ids of all objects in the given boundary
Definition at line 309 of file GUISUMOAbstractView.cpp.
References applyGLTransform(), doPaintGL(), GUIPerspectiveChanger::getViewport(), myApp, myChanger, GUIMainWindow::setStatusBarText(), GUIPerspectiveChanger::setViewport(), and toString().
Referenced by getObjectAtPosition().
| GUIGlID GUISUMOAbstractView::getObjectUnderCursor | ( | ) | [protected] |
returns the id of the object under the cursor using GL_SELECT
Definition at line 247 of file GUISUMOAbstractView.cpp.
References getObjectAtPosition(), and getPositionInformation().
Referenced by onLeftBtnPress(), openObjectDialog(), and paintGL().
| Position GUISUMOAbstractView::getPositionInformation | ( | ) | const |
Returns the cursor's x/y position within the network.
Definition at line 164 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), myChanger, myWindowCursorPositionX, myWindowCursorPositionY, SUMOReal, Boundary::xmin(), and Boundary::ymin().
Referenced by getObjectUnderCursor(), onLeftBtnRelease(), GUIDanielPerspectiveChanger::onMouseWheel(), GUIDanielPerspectiveChanger::onRightBtnPress(), showToolTipFor(), and updatePositionInformation().
| virtual int GUISUMOAbstractView::getTrackedID | ( | ) | const [inline, virtual] |
Reimplemented in GUIViewTraffic.
Definition at line 197 of file GUISUMOAbstractView.h.
Referenced by paintGL(), and removeAdditionalGLVisualisation().
| Boundary GUISUMOAbstractView::getVisibleBoundary | ( | ) | const |
Definition at line 189 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), and myChanger.
Referenced by TraCIServerAPI_GUI::processGet().
| const GUIVisualizationSettings* GUISUMOAbstractView::getVisualisationSettings | ( | ) | [inline] |
Definition at line 281 of file GUISUMOAbstractView.h.
References myVisualizationSettings.
| bool GUISUMOAbstractView::isInEditMode | ( | ) |
returns true, if the edit button was pressed
Definition at line 149 of file GUISUMOAbstractView.cpp.
References myInEditMode.
| SUMOReal GUISUMOAbstractView::m2p | ( | SUMOReal | meter | ) | const |
meter-to-pixels conversion method
Definition at line 458 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), and myChanger.
Referenced by displayLegend(), GUIViewTraffic::doPaintGL(), and makeSnapshot().
| FXbool GUISUMOAbstractView::makeCurrent | ( | ) |
A reimplementation due to some internal reasons.
Definition at line 512 of file GUISUMOAbstractView.cpp.
Referenced by makeSnapshot(), onConfigure(), onLeftBtnPress(), onPaint(), and openObjectDialog().
| std::string GUISUMOAbstractView::makeSnapshot | ( | const std::string & | destFile | ) |
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 727 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::antialiase, applyGLTransform(), GUIVisualizationSettings::backgroundColor, RGBColor::blue(), displayLegend(), GUIVisualizationSettings::dither, doPaintGL(), 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(), m2p(), makeCurrent(), myChanger, myGrid, myUseToolTips, myVisualizationSettings, 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 checkSnapshots(), GUISUMOViewParent::onCmdMakeSnapshot(), and TraCIServerAPI_GUI::processSet().
| long GUISUMOAbstractView::onConfigure | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Definition at line 519 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::backgroundColor, RGBColor::blue(), checkSnapshots(), doInit(), RGBColor::green(), makeCurrent(), myAmInitialised, myVisualizationSettings, and RGBColor::red().
| virtual void GUISUMOAbstractView::onGamingClick | ( | Position | ) | [inline, virtual] |
Reimplemented in GUIViewTraffic.
Definition at line 201 of file GUISUMOAbstractView.h.
Referenced by onLeftBtnRelease().
| long GUISUMOAbstractView::onKeyPress | ( | FXObject * | o, |
| FXSelector | sel, | ||
| void * | data | ||
| ) |
Definition at line 680 of file GUISUMOAbstractView.cpp.
| long GUISUMOAbstractView::onKeyRelease | ( | FXObject * | o, |
| FXSelector | sel, | ||
| void * | data | ||
| ) |
Definition at line 709 of file GUISUMOAbstractView.cpp.
| long GUISUMOAbstractView::onLeftBtnPress | ( | FXObject * | , |
| FXSelector | , | ||
| void * | data | ||
| ) | [virtual] |
Definition at line 557 of file GUISUMOAbstractView.cpp.
References destroyPopup(), getObjectUnderCursor(), gSelected, makeCurrent(), myChanger, GUIPerspectiveChanger::onLeftBtnPress(), and GUISelectedStorage::toggleSelection().
| long GUISUMOAbstractView::onLeftBtnRelease | ( | FXObject * | , |
| FXSelector | , | ||
| void * | data | ||
| ) | [virtual] |
Definition at line 583 of file GUISUMOAbstractView.cpp.
References destroyPopup(), getPositionInformation(), GUIMainWindow::isGaming(), myApp, myChanger, onGamingClick(), and GUIPerspectiveChanger::onLeftBtnRelease().
| long GUISUMOAbstractView::onMouseLeft | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) | [virtual] |
Definition at line 642 of file GUISUMOAbstractView.cpp.
| long GUISUMOAbstractView::onMouseMove | ( | FXObject * | , |
| FXSelector | , | ||
| void * | data | ||
| ) | [virtual] |
Definition at line 622 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), GUIDialog_EditViewport::haveGrabbed(), myChanger, myViewportChooser, GUIPerspectiveChanger::onMouseMove(), GUIDialog_EditViewport::setValues(), SUMOReal, and updatePositionInformation().
| long GUISUMOAbstractView::onMouseWheel | ( | FXObject * | , |
| FXSelector | , | ||
| void * | data | ||
| ) | [virtual] |
Definition at line 615 of file GUISUMOAbstractView.cpp.
References myChanger, and GUIPerspectiveChanger::onMouseWheel().
| long GUISUMOAbstractView::onPaint | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Definition at line 537 of file GUISUMOAbstractView.cpp.
References makeCurrent(), myAmInitialised, and paintGL().
| long GUISUMOAbstractView::onRightBtnPress | ( | FXObject * | , |
| FXSelector | , | ||
| void * | data | ||
| ) | [virtual] |
Definition at line 595 of file GUISUMOAbstractView.cpp.
References destroyPopup(), myChanger, and GUIPerspectiveChanger::onRightBtnPress().
| long GUISUMOAbstractView::onRightBtnRelease | ( | FXObject * | , |
| FXSelector | , | ||
| void * | data | ||
| ) | [virtual] |
Definition at line 604 of file GUISUMOAbstractView.cpp.
References destroyPopup(), GUIMainWindow::isGaming(), myApp, myChanger, GUIPerspectiveChanger::onRightBtnRelease(), and openObjectDialog().
| void GUISUMOAbstractView::openObjectDialog | ( | ) | [virtual] |
Definition at line 648 of file GUISUMOAbstractView.cpp.
References GUIGlObjectStorage::getNetObject(), GUIGlObjectStorage::getObjectBlocking(), getObjectUnderCursor(), GUIGlObject::getPopUpMenu(), GUIGlObjectStorage::gIDStorage, makeCurrent(), myAmInitialised, myApp, myChanger, myPopup, GUIPerspectiveChanger::onRightBtnRelease(), and GUIGlObjectStorage::unblockObject().
Referenced by onRightBtnRelease().
| SUMOReal GUISUMOAbstractView::p2m | ( | SUMOReal | pixel | ) | const |
pixels-to-meters conversion method
Definition at line 464 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), and myChanger.
Referenced by GUIDanielPerspectiveChanger::changeCanvassLeft(), GUIDanielPerspectiveChanger::move(), and showToolTipFor().
| void GUISUMOAbstractView::paintGL | ( | ) | [protected] |
performs the painting of the simulation
Definition at line 194 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::antialiase, applyGLTransform(), GUIVisualizationSettings::backgroundColor, RGBColor::blue(), centerTo(), displayLegend(), GUIVisualizationSettings::dither, doPaintGL(), getObjectUnderCursor(), getTrackedID(), GUIPerspectiveChanger::getViewport(), RGBColor::green(), myChanger, myUseToolTips, myVisualizationSettings, RGBColor::red(), GUIVisualizationSettings::showSizeLegend, and showToolTipFor().
Referenced by onPaint().
| void GUISUMOAbstractView::paintGLGrid | ( | ) | [protected] |
paints a grid
Definition at line 354 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::gridXSize, GUIVisualizationSettings::gridYSize, myGrid, myVisualizationSettings, SUMOReal, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by GUIViewTraffic::doPaintGL(), and makeSnapshot().
| void GUISUMOAbstractView::recenterView | ( | ) |
recenters the view
Definition at line 470 of file GUISUMOAbstractView.cpp.
References myChanger, myGrid, and GUIPerspectiveChanger::setViewport().
Referenced by GUIGlChildWindow::onCmdRecenterView().
| void GUISUMOAbstractView::remove | ( | GUIDialog_ViewSettings * | ) | [inline] |
Definition at line 185 of file GUISUMOAbstractView.h.
References myVisualizationChanger.
| void GUISUMOAbstractView::remove | ( | GUIDialog_EditViewport * | ) | [inline] |
Definition at line 181 of file GUISUMOAbstractView.h.
References myViewportChooser.
Referenced by GUIDialog_ViewSettings::~GUIDialog_ViewSettings().
| bool GUISUMOAbstractView::removeAdditionalGLVisualisation | ( | GUIGlObject *const | which | ) |
Removes an object from the list of objects that show additional things.
| [in] | which | The object to remoe |
Definition at line 977 of file GUISUMOAbstractView.cpp.
References GUIGlObject::getGlID(), getTrackedID(), myAdditionallyDrawn, and stopTrack().
| virtual bool GUISUMOAbstractView::setColorScheme | ( | const std::string & | ) | [inline, virtual] |
Reimplemented in GUIViewTraffic.
Definition at line 177 of file GUISUMOAbstractView.h.
Referenced by GUIGlChildWindow::onCmdChangeColorScheme(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), and TraCIServerAPI_GUI::processSet().
| void GUISUMOAbstractView::setSnapshots | ( | std::map< SUMOTime, std::string > | snaps | ) |
Sets the snapshot time to file map.
| [in] | snaps | The snapshots to take at certain times |
Definition at line 721 of file GUISUMOAbstractView.cpp.
References mySnapshots.
| void GUISUMOAbstractView::setViewport | ( | SUMOReal | zoom, |
| SUMOReal | xPos, | ||
| SUMOReal | yPos | ||
| ) | [virtual] |
applies the given viewport settings
Definition at line 897 of file GUISUMOAbstractView.cpp.
References myChanger, and GUIPerspectiveChanger::setViewport().
Referenced by GUIDialog_EditViewport::onCmdCancel(), GUIDialog_EditViewport::onCmdChanged(), GUIDialog_EditViewport::onCmdLoad(), GUIDialog_EditViewport::onCmdOk(), and TraCIServerAPI_GUI::processSet().
| void GUISUMOAbstractView::setWindowCursorPosition | ( | FXint | x, |
| FXint | y | ||
| ) |
Returns the information whether rotation is allowd.
Returns the gl-id of the object under the given coordinates
Definition at line 505 of file GUISUMOAbstractView.cpp.
References myMouseHotspotX, myMouseHotspotY, myWindowCursorPositionX, and myWindowCursorPositionY.
Referenced by GUIDanielPerspectiveChanger::onMouseMove().
| void GUISUMOAbstractView::showToolTipFor | ( | unsigned int | id | ) | [protected] |
invokes the tooltip for the given object
Definition at line 340 of file GUISUMOAbstractView.cpp.
References Position::add(), GLHelper::drawTextBox(), GUIGlObject::getFullName(), GUIGlObjectStorage::getObjectBlocking(), getPositionInformation(), GUIGlObjectStorage::gIDStorage, GLO_MAX, p2m(), and GUIGlObjectStorage::unblockObject().
Referenced by paintGL().
| void GUISUMOAbstractView::showToolTips | ( | bool | val | ) |
Definition at line 904 of file GUISUMOAbstractView.cpp.
References myUseToolTips.
Referenced by GUIGlChildWindow::onCmdShowToolTips().
| void GUISUMOAbstractView::showViewportEditor | ( | ) |
Definition at line 882 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), myChanger, myViewportChooser, and GUIDialog_EditViewport::setOldValues().
Referenced by GUIGlChildWindow::onCmdEditViewport().
| virtual void GUISUMOAbstractView::showViewschemeEditor | ( | ) | [pure virtual] |
Implemented in GUIViewTraffic.
Referenced by GUIGlChildWindow::onCmdEditViewScheme().
| virtual void GUISUMOAbstractView::startTrack | ( | int | ) | [inline, virtual] |
Reimplemented in GUIViewTraffic.
Definition at line 195 of file GUISUMOAbstractView.h.
Referenced by TraCIServerAPI_GUI::processSet().
| virtual void GUISUMOAbstractView::stopTrack | ( | ) | [inline, virtual] |
Reimplemented in GUIViewTraffic.
Definition at line 196 of file GUISUMOAbstractView.h.
Referenced by TraCIServerAPI_GUI::processSet(), and removeAdditionalGLVisualisation().
| void GUISUMOAbstractView::updatePositionInformation | ( | ) | const [protected] |
Definition at line 174 of file GUISUMOAbstractView.cpp.
References GeoConvHelper::cartesian2geo(), GEO_OUTPUT_ACCURACY, GUIMainWindow::getCartesianLabel(), GeoConvHelper::getDefaultInstance(), GUIMainWindow::getGeoLabel(), getPositionInformation(), myApp, text(), toString(), Position::x(), and Position::y().
Referenced by onMouseMove().
| void GUISUMOAbstractView::updateToolTip | ( | ) |
A method that updates the tooltip.
Definition at line 155 of file GUISUMOAbstractView.cpp.
References myUseToolTips.
Referenced by GUIDanielPerspectiveChanger::onMouseMove(), and GUIDanielPerspectiveChanger::onMouseWheel().
std::map<GUIGlObject*, int> GUISUMOAbstractView::myAdditionallyDrawn [protected] |
List of objects for which GUIGlObject::drawGLAdditional is called.
Definition at line 386 of file GUISUMOAbstractView.h.
Referenced by addAdditionalGLVisualisation(), GUIViewTraffic::doPaintGL(), and removeAdditionalGLVisualisation().
bool GUISUMOAbstractView::myAmInitialised [protected] |
Internal information whether doInit() was called.
Definition at line 363 of file GUISUMOAbstractView.h.
Referenced by onConfigure(), onPaint(), and openObjectDialog().
GUIMainWindow* GUISUMOAbstractView::myApp [protected] |
The application.
Definition at line 335 of file GUISUMOAbstractView.h.
Referenced by getObjectsInBoundary(), onLeftBtnRelease(), onRightBtnRelease(), openObjectDialog(), GUIViewTraffic::setColorScheme(), and updatePositionInformation().
GUIPerspectiveChanger* GUISUMOAbstractView::myChanger [protected] |
The perspective changer.
Definition at line 344 of file GUISUMOAbstractView.h.
Referenced by applyGLTransform(), centerTo(), getChanger(), getObjectsInBoundary(), getPositionInformation(), getVisibleBoundary(), m2p(), makeSnapshot(), onLeftBtnPress(), onLeftBtnRelease(), onMouseMove(), onMouseWheel(), onRightBtnPress(), onRightBtnRelease(), openObjectDialog(), p2m(), paintGL(), recenterView(), setViewport(), showViewportEditor(), and ~GUISUMOAbstractView().
std::vector<Decal> GUISUMOAbstractView::myDecals [protected] |
The list of decals to show.
Definition at line 374 of file GUISUMOAbstractView.h.
Referenced by addDecals(), drawDecals(), and GUIViewTraffic::showViewschemeEditor().
MFXMutex GUISUMOAbstractView::myDecalsLock [protected] |
The mutex to use before accessing the decals list in order to avoid thread conficts.
Definition at line 377 of file GUISUMOAbstractView.h.
Referenced by drawDecals(), and GUIViewTraffic::showViewschemeEditor().
SUMORTree* GUISUMOAbstractView::myGrid [protected] |
The visualization speed-up.
Definition at line 341 of file GUISUMOAbstractView.h.
Referenced by GUIViewTraffic::doPaintGL(), getGridHeight(), getGridWidth(), makeSnapshot(), paintGLGrid(), and recenterView().
bool GUISUMOAbstractView::myInEditMode [protected] |
Information whether too-tip informations shall be generated.
Definition at line 347 of file GUISUMOAbstractView.h.
Referenced by isInEditMode().
int GUISUMOAbstractView::myMouseHotspotX [protected] |
Offset to the mouse-hotspot from the mouse position.
Definition at line 353 of file GUISUMOAbstractView.h.
Referenced by setWindowCursorPosition().
int GUISUMOAbstractView::myMouseHotspotY [protected] |
Definition at line 353 of file GUISUMOAbstractView.h.
Referenced by setWindowCursorPosition().
GUIGlChildWindow* GUISUMOAbstractView::myParent [protected] |
The parent window.
Definition at line 338 of file GUISUMOAbstractView.h.
Referenced by getColoringSchemesCombo().
MFXMutex GUISUMOAbstractView::myPolyDrawLock [mutable, protected] |
Definition at line 383 of file GUISUMOAbstractView.h.
GUIGLObjectPopupMenu* GUISUMOAbstractView::myPopup [protected] |
The current popup-menu.
Definition at line 356 of file GUISUMOAbstractView.h.
Referenced by destroyPopup(), openObjectDialog(), and ~GUISUMOAbstractView().
std::map<SUMOTime, std::string> GUISUMOAbstractView::mySnapshots [protected] |
Definition at line 381 of file GUISUMOAbstractView.h.
Referenced by checkSnapshots(), and setSnapshots().
bool GUISUMOAbstractView::myUseToolTips [protected] |
Definition at line 360 of file GUISUMOAbstractView.h.
Referenced by GUIViewTraffic::doPaintGL(), makeSnapshot(), paintGL(), showToolTips(), and updateToolTip().
Definition at line 366 of file GUISUMOAbstractView.h.
Referenced by onMouseMove(), remove(), showViewportEditor(), and ~GUISUMOAbstractView().
Definition at line 367 of file GUISUMOAbstractView.h.
Referenced by remove(), GUIViewTraffic::setColorScheme(), GUIViewTraffic::showViewschemeEditor(), and ~GUISUMOAbstractView().
Definition at line 358 of file GUISUMOAbstractView.h.
Referenced by GUIViewTraffic::buildViewToolBars(), GUIViewTraffic::doPaintGL(), getVisualisationSettings(), makeSnapshot(), onConfigure(), paintGL(), paintGLGrid(), GUIViewTraffic::setColorScheme(), GUIViewTraffic::showViewschemeEditor(), and ~GUISUMOAbstractView().
FXint GUISUMOAbstractView::myWindowCursorPositionX [protected] |
Position of the cursor relative to the window.
Definition at line 350 of file GUISUMOAbstractView.h.
Referenced by getPositionInformation(), and setWindowCursorPosition().
FXint GUISUMOAbstractView::myWindowCursorPositionY [protected] |
Definition at line 350 of file GUISUMOAbstractView.h.
Referenced by getPositionInformation(), and setWindowCursorPosition().