![]() |
SUMO - Simulation of Urban MObility
|
#include <GUISUMOAbstractView.h>
Data Structures | |
struct | Decal |
A decal (an image) that can be shown. More... | |
Public Member Functions | |
void | addDecals (const std::vector< Decal > &decals) |
virtual void | buildViewToolBars (GUIGlChildWindow &) |
builds the view toolbars More... | |
virtual void | centerTo (GUIGlID id, bool applyZoom, SUMOReal zoomDist=20) |
centers to the chosen artifact More... | |
void | centerTo (const Boundary &bound) |
centers to the chosen artifact More... | |
void | destroyPopup () |
destoys the popup More... | |
GUIPerspectiveChanger & | getChanger () const |
FXComboBox & | getColoringSchemesCombo () |
SUMOReal | getDelay () const |
Returns the delay of the parent application. More... | |
SUMOReal | getGridHeight () const |
SUMOReal | getGridWidth () const |
Position | getPositionInformation () const |
Returns the cursor's x/y position within the network. More... | |
virtual int | getTrackedID () const |
GUIDialog_EditViewport * | getViewportEditor () |
get the viewport and create it on first access More... | |
Boundary | getVisibleBoundary () const |
GUIVisualizationSettings * | getVisualisationSettings () const |
GUIVisualizationSettings * | getVisualisationSettings () |
GUISUMOAbstractView (FXComposite *p, GUIMainWindow &app, GUIGlChildWindow *parent, const SUMORTree &grid, FXGLVisual *glVis, FXGLCanvas *share) | |
constructor More... | |
bool | isInEditMode () |
returns true, if the edit button was pressed More... | |
SUMOReal | m2p (SUMOReal meter) const |
meter-to-pixels conversion method More... | |
FXbool | makeCurrent () |
A reimplementation due to some internal reasons. More... | |
virtual long | onConfigure (FXObject *, FXSelector, void *) |
virtual void | onGamingClick (Position) |
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 | onMiddleBtnPress (FXObject *, FXSelector, void *) |
virtual long | onMiddleBtnRelease (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 More... | |
virtual void | recenterView () |
recenters the view More... | |
void | remove (GUIDialog_EditViewport *) |
void | remove (GUIDialog_ViewSettings *) |
virtual bool | setColorScheme (const std::string &) |
void | setDelay (SUMOReal delay) |
Sets the delay of the parent application. More... | |
virtual void | setViewport (const Position &lookFrom, const Position &lookAt) |
applies the given viewport settings More... | |
void | setWindowCursorPosition (FXint x, FXint y) |
Returns the information whether rotation is allowd. More... | |
void | showToolTips (bool val) |
virtual void | showViewportEditor () |
void | showViewschemeEditor () |
virtual void | startTrack (int) |
virtual void | stopTrack () |
void | updateToolTip () |
A method that updates the tooltip. More... | |
virtual | ~GUISUMOAbstractView () |
destructor More... | |
Dealing with snapshots | |
void | setSnapshots (std::map< SUMOTime, std::string > snaps) |
Sets the snapshot time to file map. More... | |
std::string | makeSnapshot (const std::string &destFile) |
Takes a snapshots and writes it into the given file. More... | |
virtual void | saveFrame (const std::string &destFile, FXColor *buf) |
Adds a frame to a video snapshot which will be initialized if neccessary. More... | |
virtual void | endSnapshot () |
Ends a video snapshot. More... | |
virtual void | checkSnapshots () |
Checks whether it is time for a snapshot. More... | |
virtual SUMOTime | getCurrentTimeStep () const |
get the current simulation time More... | |
Additional visualisations | |
bool | addAdditionalGLVisualisation (GUIGlObject *const which) |
Adds an object to call its additional visualisation method. More... | |
bool | removeAdditionalGLVisualisation (GUIGlObject *const which) |
Removes an object from the list of objects that show additional things. More... | |
Protected Member Functions | |
void | applyGLTransform (bool fixRatio=true) |
FXImage * | checkGDALImage (Decal &d) |
check whether we can read image data or position with gdal More... | |
void | displayLegend () |
virtual void | doInit () |
virtual int | doPaintGL (int, const Boundary &) |
void | drawDecals () |
Draws the stored decals. More... | |
GUIGlID | getObjectAtPosition (Position pos) |
returns the id of the object at position using GL_SELECT More... | |
std::vector< GUIGlID > | getObjectsAtPosition (Position pos, SUMOReal radius) |
returns the ids of the object at position within the given (rectangular) radius using GL_SELECT More... | |
std::vector< GUIGlID > | getObjectsInBoundary (const Boundary &bound) |
returns the ids of all objects in the given boundary More... | |
GUIGlID | getObjectUnderCursor () |
returns the id of the object under the cursor using GL_SELECT More... | |
GUISUMOAbstractView () | |
void | paintGL () |
performs the painting of the simulation More... | |
void | paintGLGrid () |
paints a grid More... | |
void | showToolTipFor (unsigned int id) |
invokes the tooltip for the given object More... | |
void | updatePositionInformation () const |
Protected Attributes | |
std::map< GUIGlObject *, int > | myAdditionallyDrawn |
List of objects for which GUIGlObject::drawGLAdditional is called. More... | |
bool | myAmInitialised |
Internal information whether doInit() was called. More... | |
GUIMainWindow * | myApp |
The application. More... | |
GUIPerspectiveChanger * | myChanger |
The perspective changer. More... | |
SUMORTree * | myGrid |
The visualization speed-up. More... | |
bool | myInEditMode |
Information whether too-tip informations shall be generated. More... | |
int | myMouseHotspotX |
Offset to the mouse-hotspot from the mouse position. More... | |
int | myMouseHotspotY |
GUIGlChildWindow * | myParent |
The parent window. More... | |
MFXMutex | myPolyDrawLock |
GUIGLObjectPopupMenu * | myPopup |
The current popup-menu. More... | |
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. More... | |
FXint | myWindowCursorPositionY |
Optionally shown decals | |
std::vector< Decal > | myDecals |
The list of decals to show. More... | |
MFXMutex | myDecalsLock |
The mutex to use before accessing the decals list in order to avoid thread conficts. More... | |
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 82 of file GUISUMOAbstractView.h.
GUISUMOAbstractView::GUISUMOAbstractView | ( | FXComposite * | p, |
GUIMainWindow & | app, | ||
GUIGlChildWindow * | parent, | ||
const SUMORTree & | grid, | ||
FXGLVisual * | glVis, | ||
FXGLCanvas * | share | ||
) |
constructor
Definition at line 110 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::gaming, GUICompleteSchemeStorage::getDefault(), gSchemeStorage, and GUICompleteSchemeStorage::setViewport().
|
virtual |
destructor
Definition at line 142 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), gSchemeStorage, myChanger, myDecals, myPopup, myViewportChooser, myVisualizationChanger, myVisualizationSettings, GUIVisualizationSettings::name, GUICompleteSchemeStorage::saveViewport(), and GUICompleteSchemeStorage::setDefault().
|
inlineprotected |
Definition at line 451 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 1085 of file GUISUMOAbstractView.cpp.
References myAdditionallyDrawn.
Referenced by GUIBaseVehicle::addActiveAddVisualisation(), GUIPerson::addActiveAddVisualisation(), and onGamingClick().
|
inline |
Definition at line 322 of file GUISUMOAbstractView.h.
References myDecals.
Referenced by GNEApplicationWindow::handleEvent_NetworkLoaded(), and GUIApplicationWindow::handleEvent_SimulationLoaded().
|
protected |
Definition at line 1116 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), GLO_MAX, myChanger, SUMOReal, Boundary::xmin(), and Boundary::ymin().
Referenced by doInit(), getObjectsInBoundary(), makeSnapshot(), and paintGL().
|
inlinevirtual |
builds the view toolbars
Reimplemented in GNEViewNet, and GUIViewTraffic.
Definition at line 94 of file GUISUMOAbstractView.h.
References centerTo(), isInEditMode(), m2p(), makeCurrent(), p2m(), recenterView(), setViewport(), setWindowCursorPosition(), and SUMOReal.
Referenced by GUISUMOViewParent::init().
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 506 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::centerTo(), Boundary::getCenter(), GUIGlObject::getCenteringBoundary(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObjectStorage::gIDStorage, myChanger, GUIPerspectiveChanger::setViewport(), GUIGlObjectStorage::unblockObject(), and updatePositionInformation().
Referenced by buildViewToolBars(), GUIGLObjectPopupMenu::onCmdCenter(), paintGL(), TraCIServerAPI_GUI::processSet(), and GUIGlChildWindow::setView().
void GUISUMOAbstractView::centerTo | ( | const Boundary & | bound | ) |
centers to the chosen artifact
Definition at line 523 of file GUISUMOAbstractView.cpp.
References myChanger, and GUIPerspectiveChanger::setViewport().
|
protected |
check whether we can read image data or position with gdal
Definition at line 965 of file GUISUMOAbstractView.cpp.
References GUISUMOAbstractView::Decal::centerX, GUISUMOAbstractView::Decal::centerY, GUISUMOAbstractView::Decal::filename, getGridHeight(), getGridWidth(), GeoConvHelper::getProcessing(), GUISUMOAbstractView::Decal::height, GUISUMOAbstractView::Decal::width, WRITE_MESSAGE, WRITE_WARNING, Position::x(), GeoConvHelper::x2cartesian(), and Position::y().
Referenced by doInit(), and drawDecals().
|
virtual |
Checks whether it is time for a snapshot.
Reimplemented in GUIViewTraffic.
Definition at line 886 of file GUISUMOAbstractView.cpp.
References getCurrentTimeStep(), makeSnapshot(), mySnapshots, and WRITE_WARNING.
Referenced by GUIViewTraffic::checkSnapshots(), endSnapshot(), onConfigure(), and GUISUMOViewParent::onSimStep().
void GUISUMOAbstractView::destroyPopup | ( | ) |
destoys the popup
Definition at line 582 of file GUISUMOAbstractView.cpp.
References myPopup.
Referenced by GNEInternalLane::onDefault(), onGamingClick(), onLeftBtnPress(), onLeftBtnRelease(), onRightBtnPress(), and onRightBtnRelease().
|
protected |
brief Draws the size legend
Draws a line with ticks, and the length information.
Definition at line 419 of file GUISUMOAbstractView.cpp.
References m2p(), pfDrawString(), pfSetPosition(), pfSetScaleXY(), and SUMOReal.
Referenced by doInit(), makeSnapshot(), and paintGL().
|
inlineprotectedvirtual |
Reimplemented in GNEViewNet.
Definition at line 351 of file GUISUMOAbstractView.h.
References applyGLTransform(), checkGDALImage(), displayLegend(), drawDecals(), getObjectAtPosition(), getObjectsAtPosition(), getObjectsInBoundary(), getObjectUnderCursor(), paintGLGrid(), showToolTipFor(), and SUMOReal.
Referenced by onConfigure().
|
inlineprotectedvirtual |
Reimplemented in GNEViewNet, and GUIViewTraffic.
Definition at line 347 of file GUISUMOAbstractView.h.
Referenced by getObjectsInBoundary(), makeSnapshot(), and paintGL().
|
protected |
Draws the stored decals.
Definition at line 1044 of file GUISUMOAbstractView.cpp.
References GUITexturesHelper::add(), GUISUMOAbstractView::Decal::centerX, GUISUMOAbstractView::Decal::centerY, checkGDALImage(), GUITexturesHelper::drawTexturedBox(), GUISUMOAbstractView::Decal::filename, GUITexturesHelper::getMaxTextureSize(), GUISUMOAbstractView::Decal::glID, GUISUMOAbstractView::Decal::height, GUISUMOAbstractView::Decal::image, GUISUMOAbstractView::Decal::initialised, GUISUMOAbstractView::Decal::layer, MFXImageHelper::loadImage(), MFXMutex::lock(), myDecals, myDecalsLock, GUISUMOAbstractView::Decal::rot, MFXImageHelper::scalePower2(), GUISUMOAbstractView::Decal::skip2D, SUMOReal, MFXMutex::unlock(), GUISUMOAbstractView::Decal::width, WRITE_ERROR, and WRITE_WARNING.
Referenced by doInit(), GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), and makeSnapshot().
|
inlinevirtual |
Ends a video snapshot.
Reimplemented in GUIViewTraffic.
Definition at line 193 of file GUISUMOAbstractView.h.
References checkSnapshots().
Referenced by GUISUMOViewParent::onCmdMakeSnapshot().
|
inline |
Definition at line 131 of file GUISUMOAbstractView.h.
References getVisibleBoundary(), myChanger, onConfigure(), onLeftBtnPress(), onLeftBtnRelease(), and onPaint().
Referenced by GUIApplicationWindow::onCmdNetedit(), TraCIServerAPI_GUI::processGet(), and TraCIServerAPI_GUI::processSet().
FXComboBox & GUISUMOAbstractView::getColoringSchemesCombo | ( | ) |
Definition at line 959 of file GUISUMOAbstractView.cpp.
References GUIGlChildWindow::getColoringSchemesCombo(), and myParent.
Referenced by GUISettingsHandler::addSettings(), GUIDialog_ViewSettings::onCmdColorChange(), and GUIDialog_ViewSettings::onCmdSaveSetting().
|
inlinevirtual |
get the current simulation time
Reimplemented in GUIViewTraffic.
Definition at line 201 of file GUISUMOAbstractView.h.
References getViewportEditor(), showToolTips(), showViewportEditor(), and showViewschemeEditor().
Referenced by checkSnapshots().
SUMOReal GUISUMOAbstractView::getDelay | ( | ) | const |
Returns the delay of the parent application.
Definition at line 1134 of file GUISUMOAbstractView.cpp.
References GUIMainWindow::getDelay(), and myApp.
Referenced by getVisualisationSettings(), and GUIDialog_ViewSettings::onCmdExportSetting().
SUMOReal GUISUMOAbstractView::getGridHeight | ( | ) | const |
Definition at line 953 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), and myGrid.
Referenced by checkGDALImage(), GUIDialog_ViewSettings::onCmdEditTable(), and remove().
SUMOReal GUISUMOAbstractView::getGridWidth | ( | ) | const |
Definition at line 947 of file GUISUMOAbstractView.cpp.
References Boundary::getWidth(), myGrid, and SUMOReal.
Referenced by checkGDALImage(), GUIDialog_ViewSettings::onCmdEditTable(), and remove().
returns the id of the object at position using GL_SELECT
Definition at line 261 of file GUISUMOAbstractView.cpp.
References Boundary::add(), GUIGlObject::getGlID(), GUIGlObjectStorage::getObjectBlocking(), getObjectsInBoundary(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_LANE, GLO_POI, GLO_POLYGON, Boundary::grow(), max, SUMOReal, GUIGlObjectStorage::unblockObject(), and GUIVisualizationSettings::UseMesoSim.
Referenced by doInit(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), and getObjectUnderCursor().
|
protected |
returns the ids of the object at position within the given (rectangular) radius using GL_SELECT
Definition at line 306 of file GUISUMOAbstractView.cpp.
References Boundary::add(), GUIGlObject::getGlID(), GUIGlObjectStorage::getObjectBlocking(), getObjectsInBoundary(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, Boundary::grow(), and GUIGlObjectStorage::unblockObject().
Referenced by doInit(), and GNEViewNet::getEdgesAtCursorPosition().
|
protected |
returns the ids of all objects in the given boundary
Definition at line 334 of file GUISUMOAbstractView.cpp.
References applyGLTransform(), doPaintGL(), GUIVisualizationSettings::drawForSelecting, GUIPerspectiveChanger::getViewport(), myApp, myChanger, myVisualizationSettings, GUIMainWindow::setStatusBarText(), GUIPerspectiveChanger::setViewport(), and toString().
Referenced by doInit(), getObjectAtPosition(), getObjectsAtPosition(), GNEViewNet::mergeJunctions(), and GNEViewNet::onLeftBtnRelease().
|
protected |
returns the id of the object under the cursor using GL_SELECT
Definition at line 255 of file GUISUMOAbstractView.cpp.
References getObjectAtPosition(), and getPositionInformation().
Referenced by doInit(), GUIViewTraffic::getLaneUnderCursor(), GNEViewNet::onLeftBtnPress(), onLeftBtnPress(), openObjectDialog(), and paintGL().
Position GUISUMOAbstractView::getPositionInformation | ( | ) | const |
Returns the cursor's x/y position within the network.
Definition at line 172 of file GUISUMOAbstractView.cpp.
References Boundary::getHeight(), GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), myChanger, myWindowCursorPositionX, myWindowCursorPositionY, SUMOReal, Boundary::xmin(), and Boundary::ymin().
Referenced by getObjectUnderCursor(), GUIEdge::getParameterWindow(), GNELane::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUILane::getPopUpMenu(), GNEViewNet::markPopupPosition(), GUIDanielPerspectiveChanger::onKeyPress(), GNEViewNet::onLeftBtnPress(), onLeftBtnRelease(), GNEViewNet::onMouseMove(), GUIDanielPerspectiveChanger::onMouseWheel(), GUIDanielPerspectiveChanger::onRightBtnPress(), showToolTipFor(), and updatePositionInformation().
|
inlinevirtual |
Reimplemented in GUIViewTraffic.
Definition at line 238 of file GUISUMOAbstractView.h.
Referenced by GUIPerson::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), paintGL(), and removeAdditionalGLVisualisation().
GUIDialog_EditViewport * GUISUMOAbstractView::getViewportEditor | ( | ) |
get the viewport and create it on first access
Definition at line 912 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), myChanger, myViewportChooser, and GUIDialog_EditViewport::setValues().
Referenced by getCurrentTimeStep(), GUIDialog_ViewSettings::onCmdExportSetting(), and showViewportEditor().
Boundary GUISUMOAbstractView::getVisibleBoundary | ( | ) | const |
Definition at line 197 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), and myChanger.
Referenced by getChanger(), and TraCIServerAPI_GUI::processGet().
|
inline |
Definition at line 218 of file GUISUMOAbstractView.h.
References myVisualizationSettings.
Referenced by GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIApplicationWindow::onCmdEditChosen(), and TraCIServerAPI_GUI::processGet().
|
inline |
Definition at line 327 of file GUISUMOAbstractView.h.
References getDelay(), myVisualizationSettings, paintGL(), setDelay(), SUMOReal, and updatePositionInformation().
bool GUISUMOAbstractView::isInEditMode | ( | ) |
returns true, if the edit button was pressed
Definition at line 157 of file GUISUMOAbstractView.cpp.
References myInEditMode.
Referenced by buildViewToolBars().
meter-to-pixels conversion method
Definition at line 488 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), myChanger, and SUMOReal.
Referenced by buildViewToolBars(), displayLegend(), GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), and makeSnapshot().
FXbool GUISUMOAbstractView::makeCurrent | ( | ) |
A reimplementation due to some internal reasons.
Definition at line 544 of file GUISUMOAbstractView.cpp.
Referenced by buildViewToolBars(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getEdgesAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), GUIViewTraffic::getLaneUnderCursor(), makeSnapshot(), GNEViewNet::mergeJunctions(), onConfigure(), GNEViewNet::onLeftBtnPress(), onLeftBtnPress(), GNEViewNet::onLeftBtnRelease(), 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. If compiled with ffmpeg and a video format is requested it will instantiate a video encoder.
[in] | destFile | The name of the file to write the snapshot into |
Definition at line 731 of file GUISUMOAbstractView.cpp.
References RGBColor::alpha(), GUIVisualizationSettings::antialiase, applyGLTransform(), GUIVisualizationSettings::backgroundColor, RGBColor::blue(), displayLegend(), GUIVisualizationSettings::dither, doPaintGL(), drawDecals(), GUIPerspectiveChanger::getViewport(), RGBColor::green(), m2p(), makeCurrent(), myChanger, myGrid, myUseToolTips, myVisualizationSettings, paintGLGrid(), RGBColor::red(), saveFrame(), MFXImageHelper::saveImage(), GUIVisualizationSettings::scale, SUMORTree::Search(), GUIVisualizationSettings::showGrid, GUIVisualizationSettings::showSizeLegend, FXSingleEventThread::sleep(), SUMO_const_laneWidth, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by GUIViewTraffic::checkSnapshots(), checkSnapshots(), GUIApplicationWindow::handleEvent_Screenshot(), GNEViewParent::onCmdMakeSnapshot(), GUISUMOViewParent::onCmdMakeSnapshot(), and onMiddleBtnRelease().
|
virtual |
Definition at line 551 of file GUISUMOAbstractView.cpp.
References RGBColor::alpha(), GUIVisualizationSettings::backgroundColor, RGBColor::blue(), checkSnapshots(), doInit(), RGBColor::green(), makeCurrent(), myAmInitialised, myVisualizationSettings, and RGBColor::red().
Referenced by getChanger().
|
inlinevirtual |
Reimplemented in GUIViewTraffic.
Definition at line 242 of file GUISUMOAbstractView.h.
References addAdditionalGLVisualisation(), destroyPopup(), and removeAdditionalGLVisualisation().
Referenced by onLeftBtnRelease().
|
virtual |
Definition at line 710 of file GUISUMOAbstractView.cpp.
References myChanger, and GUIPerspectiveChanger::onKeyPress().
Referenced by GNEViewParent::onKeyPress(), GUISUMOViewParent::onKeyPress(), and onMiddleBtnRelease().
|
virtual |
Definition at line 717 of file GUISUMOAbstractView.cpp.
References myChanger, and GUIPerspectiveChanger::onKeyRelease().
Referenced by GNEViewParent::onKeyRelease(), GUISUMOViewParent::onKeyRelease(), and onMiddleBtnRelease().
|
virtual |
Reimplemented in GNEViewNet.
Definition at line 589 of file GUISUMOAbstractView.cpp.
References destroyPopup(), getObjectUnderCursor(), gSelected, makeCurrent(), myChanger, GUIPerspectiveChanger::onLeftBtnPress(), and GUISelectedStorage::toggleSelection().
Referenced by getChanger(), and GNEViewNet::onLeftBtnPress().
|
virtual |
Reimplemented in GNEViewNet.
Definition at line 616 of file GUISUMOAbstractView.cpp.
References destroyPopup(), getPositionInformation(), GUIMainWindow::isGaming(), myApp, myChanger, onGamingClick(), and GUIPerspectiveChanger::onLeftBtnRelease().
Referenced by getChanger(), and GNEViewNet::onLeftBtnRelease().
|
inlinevirtual |
Definition at line 141 of file GUISUMOAbstractView.h.
|
inlinevirtual |
Definition at line 144 of file GUISUMOAbstractView.h.
References makeSnapshot(), onKeyPress(), onKeyRelease(), onMouseLeft(), onMouseMove(), onMouseWheel(), onRightBtnPress(), onRightBtnRelease(), openObjectDialog(), setSnapshots(), and updateToolTip().
|
virtual |
Definition at line 672 of file GUISUMOAbstractView.cpp.
Referenced by onMiddleBtnRelease().
|
virtual |
Reimplemented in GNEViewNet.
Definition at line 659 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), GUIDialog_EditViewport::haveGrabbed(), myChanger, myViewportChooser, GUIPerspectiveChanger::onMouseMove(), GUIDialog_EditViewport::setValues(), and updatePositionInformation().
Referenced by onMiddleBtnRelease(), GNEViewNet::onMouseMove(), and onRightBtnRelease().
|
virtual |
Definition at line 649 of file GUISUMOAbstractView.cpp.
References GUIMainWindow::isGaming(), myApp, myChanger, GUIPerspectiveChanger::onMouseWheel(), and updatePositionInformation().
Referenced by onMiddleBtnRelease().
|
virtual |
Definition at line 569 of file GUISUMOAbstractView.cpp.
References makeCurrent(), myAmInitialised, and paintGL().
Referenced by getChanger(), and GNEViewNet::updateModeSpecificControls().
|
virtual |
Definition at line 628 of file GUISUMOAbstractView.cpp.
References destroyPopup(), myChanger, and GUIPerspectiveChanger::onRightBtnPress().
Referenced by onMiddleBtnRelease().
|
virtual |
Definition at line 637 of file GUISUMOAbstractView.cpp.
References destroyPopup(), GUIMainWindow::isGaming(), myApp, myChanger, onMouseMove(), GUIPerspectiveChanger::onRightBtnRelease(), and openObjectDialog().
Referenced by onMiddleBtnRelease().
|
virtual |
Definition at line 678 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 onMiddleBtnRelease(), and onRightBtnRelease().
pixels-to-meters conversion method
Definition at line 494 of file GUISUMOAbstractView.cpp.
References GUIPerspectiveChanger::getViewport(), Boundary::getWidth(), and myChanger.
Referenced by buildViewToolBars(), GUIDanielPerspectiveChanger::changeCanvassLeft(), GUIDanielPerspectiveChanger::move(), and showToolTipFor().
|
protected |
performs the painting of the simulation
Definition at line 202 of file GUISUMOAbstractView.cpp.
References RGBColor::alpha(), 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 getVisualisationSettings(), and onPaint().
|
protected |
paints a grid
Definition at line 387 of file GUISUMOAbstractView.cpp.
References GUIVisualizationSettings::gridXSize, GUIVisualizationSettings::gridYSize, myGrid, myVisualizationSettings, SUMOReal, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by doInit(), GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), and makeSnapshot().
|
virtual |
recenters the view
Definition at line 500 of file GUISUMOAbstractView.cpp.
References myChanger, myGrid, and GUIPerspectiveChanger::setViewport().
Referenced by buildViewToolBars(), GUIGlChildWindow::onCmdRecenterView(), GUIDanielPerspectiveChanger::onKeyPress(), and GUICompleteSchemeStorage::setViewport().
|
inline |
Definition at line 222 of file GUISUMOAbstractView.h.
References myViewportChooser.
Referenced by GUIDialog_ViewSettings::~GUIDialog_ViewSettings().
|
inline |
Definition at line 226 of file GUISUMOAbstractView.h.
References getGridHeight(), getGridWidth(), myVisualizationChanger, and SUMOReal.
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 1097 of file GUISUMOAbstractView.cpp.
References GUIGlObject::getGlID(), getTrackedID(), myAdditionallyDrawn, and stopTrack().
Referenced by onGamingClick(), GUIBaseVehicle::removeActiveAddVisualisation(), and GUIPerson::removeActiveAddVisualisation().
|
inlinevirtual |
Adds a frame to a video snapshot which will be initialized if neccessary.
Reimplemented in GUIViewTraffic.
Definition at line 185 of file GUISUMOAbstractView.h.
References UNUSED_PARAMETER.
Referenced by makeSnapshot().
|
inlinevirtual |
Reimplemented in GNEViewNet, and GUIViewTraffic.
Definition at line 214 of file GUISUMOAbstractView.h.
Referenced by GUISettingsHandler::addSettings(), GUIGlChildWindow::onCmdChangeColorScheme(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), and TraCIServerAPI_GUI::processSet().
void GUISUMOAbstractView::setDelay | ( | SUMOReal | delay | ) |
Sets the delay of the parent application.
Definition at line 1140 of file GUISUMOAbstractView.cpp.
References myApp, and GUIMainWindow::setDelay().
Referenced by getVisualisationSettings(), and GUIDialog_ViewSettings::loadSettings().
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 725 of file GUISUMOAbstractView.cpp.
References mySnapshots.
Referenced by onMiddleBtnRelease(), and GUISettingsHandler::setSnapshots().
|
virtual |
applies the given viewport settings
Definition at line 933 of file GUISUMOAbstractView.cpp.
References myChanger, GUIPerspectiveChanger::setViewport(), Position::x(), Position::y(), and Position::z().
Referenced by buildViewToolBars(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIDialog_ViewSettings::loadSettings(), 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 | ||
) |
Returns the information whether rotation is allowd.
Returns the gl-id of the object under the given coordinates
Definition at line 537 of file GUISUMOAbstractView.cpp.
References myMouseHotspotX, myMouseHotspotY, myWindowCursorPositionX, and myWindowCursorPositionY.
Referenced by buildViewToolBars(), and GUIDanielPerspectiveChanger::onMouseMove().
|
protected |
invokes the tooltip for the given object
Definition at line 373 of file GUISUMOAbstractView.cpp.
References Position::add(), RGBColor::BLACK, GLHelper::drawTextBox(), GUIGlObject::getFullName(), GUIGlObjectStorage::getObjectBlocking(), getPositionInformation(), GUIGlObjectStorage::gIDStorage, GLO_MAX, p2m(), and GUIGlObjectStorage::unblockObject().
void GUISUMOAbstractView::showToolTips | ( | bool | val | ) |
Definition at line 940 of file GUISUMOAbstractView.cpp.
References myUseToolTips, and SUMOReal.
Referenced by getCurrentTimeStep(), and GUIGlChildWindow::onCmdShowToolTips().
|
virtual |
Definition at line 924 of file GUISUMOAbstractView.cpp.
References getViewportEditor(), GUIPerspectiveChanger::getXPos(), GUIPerspectiveChanger::getYPos(), GUIPerspectiveChanger::getZoom(), Position::INVALID, myChanger, myViewportChooser, and GUIDialog_EditViewport::setOldValues().
Referenced by getCurrentTimeStep(), and GUIGlChildWindow::onCmdEditViewport().
void GUISUMOAbstractView::showViewschemeEditor | ( | ) |
Definition at line 898 of file GUISUMOAbstractView.cpp.
References myDecals, myDecalsLock, myVisualizationChanger, myVisualizationSettings, and GUIDialog_ViewSettings::setCurrent().
Referenced by getCurrentTimeStep(), GUIGlChildWindow::onCmdEditViewScheme(), and GUIDanielPerspectiveChanger::onKeyPress().
|
inlinevirtual |
Reimplemented in GUIViewTraffic.
Definition at line 236 of file GUISUMOAbstractView.h.
Referenced by GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), and TraCIServerAPI_GUI::processSet().
|
inlinevirtual |
Reimplemented in GUIViewTraffic.
Definition at line 237 of file GUISUMOAbstractView.h.
Referenced by GUIPerson::GUIPersonPopupMenu::onCmdStopTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStopTrack(), TraCIServerAPI_GUI::processSet(), and removeAdditionalGLVisualisation().
|
protected |
Definition at line 182 of file GUISUMOAbstractView.cpp.
References GeoConvHelper::cartesian2geo(), GEO_OUTPUT_ACCURACY, GUIMainWindow::getCartesianLabel(), GeoConvHelper::getFinal(), GUIMainWindow::getGeoLabel(), getPositionInformation(), myApp, toString(), Position::x(), and Position::y().
Referenced by centerTo(), getVisualisationSettings(), onMouseMove(), and onMouseWheel().
void GUISUMOAbstractView::updateToolTip | ( | ) |
A method that updates the tooltip.
Definition at line 163 of file GUISUMOAbstractView.cpp.
References myUseToolTips.
Referenced by GUIDanielPerspectiveChanger::onKeyPress(), onMiddleBtnRelease(), GUIDanielPerspectiveChanger::onMouseMove(), and GUIDanielPerspectiveChanger::onMouseWheel().
|
protected |
List of objects for which GUIGlObject::drawGLAdditional is called.
Definition at line 447 of file GUISUMOAbstractView.h.
Referenced by addAdditionalGLVisualisation(), GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), and removeAdditionalGLVisualisation().
|
protected |
Internal information whether doInit() was called.
Definition at line 421 of file GUISUMOAbstractView.h.
Referenced by onConfigure(), onPaint(), and openObjectDialog().
|
protected |
The application.
Definition at line 396 of file GUISUMOAbstractView.h.
Referenced by getDelay(), getObjectsInBoundary(), onLeftBtnRelease(), onMouseWheel(), onRightBtnRelease(), openObjectDialog(), GUIViewTraffic::saveFrame(), GUIViewTraffic::setColorScheme(), setDelay(), GNEViewNet::setEditMode(), GNEViewNet::setStatusBarText(), and updatePositionInformation().
|
protected |
The perspective changer.
Definition at line 405 of file GUISUMOAbstractView.h.
Referenced by applyGLTransform(), centerTo(), getChanger(), getObjectsInBoundary(), getPositionInformation(), getViewportEditor(), getVisibleBoundary(), m2p(), makeSnapshot(), onKeyPress(), onKeyRelease(), onLeftBtnPress(), onLeftBtnRelease(), onMouseMove(), onMouseWheel(), onRightBtnPress(), onRightBtnRelease(), openObjectDialog(), p2m(), paintGL(), recenterView(), setViewport(), showViewportEditor(), GNEViewNet::updateModeSpecificControls(), and ~GUISUMOAbstractView().
|
protected |
The list of decals to show.
Definition at line 435 of file GUISUMOAbstractView.h.
Referenced by addDecals(), drawDecals(), showViewschemeEditor(), and ~GUISUMOAbstractView().
|
protected |
The mutex to use before accessing the decals list in order to avoid thread conficts.
Definition at line 438 of file GUISUMOAbstractView.h.
Referenced by drawDecals(), and showViewschemeEditor().
|
protected |
The visualization speed-up.
Definition at line 402 of file GUISUMOAbstractView.h.
Referenced by GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), getGridHeight(), getGridWidth(), makeSnapshot(), paintGLGrid(), and recenterView().
|
protected |
Information whether too-tip informations shall be generated.
Definition at line 408 of file GUISUMOAbstractView.h.
Referenced by isInEditMode().
|
protected |
Offset to the mouse-hotspot from the mouse position.
Definition at line 411 of file GUISUMOAbstractView.h.
Referenced by setWindowCursorPosition().
|
protected |
Definition at line 411 of file GUISUMOAbstractView.h.
Referenced by setWindowCursorPosition().
|
protected |
The parent window.
Definition at line 399 of file GUISUMOAbstractView.h.
Referenced by getColoringSchemesCombo().
|
mutableprotected |
Definition at line 444 of file GUISUMOAbstractView.h.
|
protected |
The current popup-menu.
Definition at line 414 of file GUISUMOAbstractView.h.
Referenced by destroyPopup(), openObjectDialog(), and ~GUISUMOAbstractView().
|
protected |
Definition at line 442 of file GUISUMOAbstractView.h.
Referenced by checkSnapshots(), and setSnapshots().
|
protected |
Definition at line 418 of file GUISUMOAbstractView.h.
Referenced by GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), makeSnapshot(), paintGL(), showToolTips(), and updateToolTip().
|
protected |
Definition at line 423 of file GUISUMOAbstractView.h.
Referenced by getViewportEditor(), onMouseMove(), remove(), showViewportEditor(), and ~GUISUMOAbstractView().
|
protected |
Definition at line 428 of file GUISUMOAbstractView.h.
Referenced by remove(), GUIViewTraffic::setColorScheme(), GNEViewNet::setColorScheme(), showViewschemeEditor(), and ~GUISUMOAbstractView().
|
protected |
Definition at line 416 of file GUISUMOAbstractView.h.
Referenced by GUIViewTraffic::buildViewToolBars(), GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), getObjectsInBoundary(), getVisualisationSettings(), makeSnapshot(), onConfigure(), paintGL(), paintGLGrid(), GUIViewTraffic::setColorScheme(), GNEViewNet::setColorScheme(), GNEViewNet::setEditMode(), GNEViewNet::setSelectionScaling(), showViewschemeEditor(), and ~GUISUMOAbstractView().
|
protected |
Position of the cursor relative to the window.
Definition at line 426 of file GUISUMOAbstractView.h.
Referenced by getPositionInformation(), and setWindowCursorPosition().
|
protected |
Definition at line 426 of file GUISUMOAbstractView.h.
Referenced by getPositionInformation(), and setWindowCursorPosition().