Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUISUMOAbstractView Class Reference

#include <GUISUMOAbstractView.h>

Inheritance diagram for GUISUMOAbstractView:
[legend]
Collaboration diagram for GUISUMOAbstractView:
[legend]

Data Structures

struct  Decal
 A decal (an image) that can be shown. More...
struct  LayerObject
 struct used for sorting objects by layer More...

Public Member Functions

void addDecals (const std::vector< Decal > &decals)
 add decals
virtual void buildColorRainbow (const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, const GUIVisualizationRainbowSettings &)
 recalibrate color scheme according to the current value range
virtual void buildViewToolBars (GUIGlChildWindow *)
 builds the view toolbars
void centerTo (const Boundary &bound)
 centers to the chosen artifact
virtual void centerTo (const Position &pos, bool applyZoom)
 centers to the chosen position
virtual void centerTo (GUIGlID id, bool applyZoom, double zoomDist=20)
 centers to the chosen artifact
virtual void changePedestrianNetworkColor (const GUIVisualizationSettings &) const
 Change the color of the JuPedSim pedestrian network.
void clearDecals ()
 clear all decals
virtual void copyViewportTo (GUISUMOAbstractView *view)
 copy the viewport to the given view
void destroyPopup ()
 destroys the popup
virtual void drawPedestrianNetwork (const GUIVisualizationSettings &) const
 Draw (or not) the JuPedSim pedestrian network.
GUIVisualizationSettingseditVisualisationSettings () const
 edit visualization settings (allow modify VisualizationSetings, use carefully)
std::vector< GUIGlObject * > filterContextObjects (const std::vector< GUIGlObject * > &objects)
 filter out duplicate and forbidden objects
GUIPerspectiveChangergetChanger () const
 get changer
MFXComboBoxIcongetColoringSchemesCombo ()
 get coloring schemes combo
std::vector< Decal > & getDecals ()
 The list of decals to show.
FXMutex & getDecalsLockMutex ()
 The mutex to use before accessing the decals list in order to avoid thread conflicts.
double getDelay () const
 Returns the delay of the parent application.
virtual std::vector< std::string > getEdgeDataAttrs () const
 return list of loaded edgeData attributes
virtual std::vector< std::string > getEdgeLaneParamKeys (bool) const
 return list of available edge parameters
double getFPS () const
 retrieve FPS
double getGridHeight () const
 get grid height
double getGridWidth () const
 get grid width
GUIGlChildWindowgetGUIGlChildWindow ()
 get GUIGlChildWindow
GUIMainWindowgetMainWindow () const
 get main window
virtual std::vector< std::string > getMeanDataAttrs (const std::string &meanDataID) const
 return list of available attributes for the given meanData id
virtual std::vector< std::string > getMeanDataIDs () const
 return list of loaded edgeData ids (being computed in the current simulation)
virtual std::vector< std::string > getPOIParamKeys () const
 return list of available vehicle parameters
GUIGLObjectPopupMenugetPopup () const
 ge the current popup-menu
const PositiongetPopupPosition () const
 get position of current popup
virtual Position getPositionInformation () const
 Returns the cursor's x/y position within the network.
virtual std::vector< std::string > getRelDataAttrs () const
 return list of loaded edgeRelation and tazRelation attributes
virtual GUIGlID getTrackedID () const
 get tracked id
virtual std::vector< std::string > getVehicleParamKeys (bool) const
 return list of available vehicle parameters
GUIDialog_EditViewportgetViewportEditor ()
 get the viewport and create it on first access
Boundary getVisibleBoundary () const
 get visible boundary
const GUIVisualizationSettingsgetVisualisationSettings () const
 get visualization settings (read only)
Position getWindowCursorPosition () const
 return windows cursor position
 GUISUMOAbstractView (FXComposite *p, GUIMainWindow &app, GUIGlChildWindow *parent, const SUMORTree &grid, FXGLVisual *glVis, FXGLCanvas *share)
 constructor
virtual bool is3DView () const
 return whether this is a 3D view
bool isInEditMode ()
 returns true, if the edit button was pressed
double m2p (double meter) const
 meter-to-pixels conversion method
FXbool makeCurrent ()
 A reimplementation due to some internal reasons.
virtual long onCmdAddRerouter (FXObject *, FXSelector, void *)
virtual long onCmdCloseEdge (FXObject *, FXSelector, void *)
virtual long onCmdCloseLane (FXObject *, FXSelector, void *)
 interaction with the simulation
virtual long onCmdShowReachability (FXObject *, FXSelector, void *)
 highlight edges according to reachability
virtual long onConfigure (FXObject *, FXSelector, void *)
 mouse functions
virtual long onDoubleClicked (FXObject *, FXSelector, void *)
virtual void onGamingClick (Position)
 on gaming click
virtual void onGamingRightClick (Position)
virtual long onKeyPress (FXObject *o, FXSelector sel, void *data)
 keyboard functions
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 long onVisualizationChange (FXObject *, FXSelector, void *)
 hook to react on change in visualization settings
void openObjectDialog (const std::vector< GUIGlObject * > &objects, const bool filter=true)
 open object dialog for the given object
virtual void openObjectDialogAtCursor (const FXEvent *ev)
 open object dialog at the cursor position
double p2m (double pixel) const
 pixels-to-meters conversion method
void processPendingTextureDeletes ()
 process pending texture deletions
void queueTextureDelete (unsigned int textureId)
 queue a texture for deletion
virtual void recalculateBoundaries ()
 recalculate boundaries
virtual void recenterView ()
 recenters the view
void remove (GUIDialog_EditViewport *)
 remove viewport
void remove (GUIDialog_ViewSettings *)
 remove view settings
void replacePopup (GUIGLObjectPopupMenu *popUp)
 replace PopUp
virtual const std::vector< SUMOTimeretrieveBreakpoints () const
 retrieve breakpoints if provided by the application
Position screenPos2NetPos (int x, int y) const
 Translate screen position to network position.
void setBreakpoints (const std::vector< SUMOTime > &breakpoints)
 Sets the breakpoints of the parent application.
virtual bool setColorScheme (const std::string &)
 set color scheme
void setDelay (double delay)
 Sets the delay of the parent application.
virtual void setViewportFromToRot (const Position &lookFrom, const Position &lookAt, double rotation)
 applies the given viewport settings
void setWindowCursorPosition (FXint x, FXint y)
 Returns the gl-id of the object under the given coordinates.
virtual void showViewportEditor ()
 show viewport editor
void showViewschemeEditor ()
 show viewsscheme editor
Position snapToActiveGrid (const Position &pos, bool snapXY=true) const
 Returns a position that is mapped to the closest grid point if the grid is active.
virtual void startTrack (int)
 star track
virtual void stopTrack ()
 stop track
void updateToolTip ()
 A method that updates the tooltip.
virtual void updateViewportValues ()
 update the viewport chooser with the current view values
virtual void zoom2Pos (Position &camera, Position &lookAt, double zoom)
 zoom interface for 3D view
virtual ~GUISUMOAbstractView ()
 destructor
Dealing with snapshots
void addSnapshot (SUMOTime time, const std::string &file, const int w=-1, const int h=-1)
 Sets the snapshot time to file map.
std::string makeSnapshot (const std::string &destFile, const int w=-1, const int h=-1)
 Takes a snapshots and writes it into the given file.
virtual void saveFrame (const std::string &destFile, FXColor *buf)
 Adds a frame to a video snapshot which will be initialized if necessary.
virtual void endSnapshot ()
 Ends a video snapshot.
virtual void checkSnapshots ()
 Checks whether it is time for a snapshot.
void waitForSnapshots (const SUMOTime snapshotTime)
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.
bool isAdditionalGLVisualisationEnabled (GUIGlObject *const which) const
 Check if an object is added in the additional GL visualitation.

Protected Member Functions

Boundary applyGLTransform (bool fixRatio=true)
 applies gl-transformations to fit the Boundary given by myChanger onto the canvas. If fixRatio is true, this boundary will be enlarged to prevent anisotropic stretching. (this should be set to false when doing selections)
void buildMinMaxRainbow (const GUIVisualizationSettings &s, GUIColorScheme &scheme, const GUIVisualizationRainbowSettings &rs, double minValue, double maxValue, bool hasMissingData)
 helper function for buildColorRainbow
FXImage * checkGDALImage (Decal &d)
 check whether we can read image data or position with gdal
void displayColorLegend (const GUIColorScheme &scheme, bool leftSide, const std::string &key)
 Draws a legend for the given scheme.
void displayLegend ()
 Draws a line with ticks, and the length information.
void displayLegends ()
 Draws the configured legends.
virtual void doInit ()
 doInit
virtual int doPaintGL (int, const Boundary &)
 paint GL
void drawDecals ()
 Draws the stored decals.
void drawFPS ()
 Draws frames-per-second indicator.
std::vector< GUIGlObject * > filterInternalLanes (const std::vector< GUIGlObject * > &objects) const
 filter internal lanes in Objects under cursor
std::vector< GUIGlObject * > getGUIGlObjectsAtPosition (Position pos, double radius)
 returns the GUIGlObjects at position within the given (rectangular) radius using GL_SELECT
std::vector< GUIGlObject * > getGUIGlObjectsUnderCursor ()
 returns the GUIGlObject under the cursor using GL_SELECT (including overlapped objects)
std::vector< GUIGlObject * > getGUIGlObjectsUnderSnappedCursor ()
 returns the GUIGlObject under the gripped cursor using GL_SELECT (including overlapped objects)
virtual GUILanegetLaneUnderCursor ()
 returns the GUILane at cursor position (implementation depends on view)
GUIGlID getObjectAtPosition (Position pos, double sensitivity=SENSITIVITY)
 returns the id of the object at position using GL_SELECT
std::vector< GUIGlIDgetObjectsAtPosition (Position pos, double radius)
 returns the ids of the object at position within the given (rectangular) radius using GL_SELECT
std::vector< GUIGlIDgetObjectsInBoundary (Boundary bound)
 returns the ids of all objects in the given boundary
std::vector< GUIGlIDgetObjectsUnderCursor ()
 returns the id of the objects under the cursor using GL_SELECT (including overlapped objects)
GUIGlID getObjectUnderCursor (double sensitivity=SENSITIVITY)
 returns the id of the front object under the cursor using GL_SELECT
virtual GUIGlID getToolTipID ()
 returns the id of object under cursor to show their tooltip
void openPopupDialog ()
 open popup dialog
void paintGL ()
 FOX needs this.
void paintGLGrid () const
 paints a grid
bool showToolTipFor (const GUIGlID idToolTip)
 invokes the tooltip for the given object
virtual void updatePositionInformationLabel () const
 update position information labels

Protected Attributes

std::map< GUIGlObject *, int > myAdditionallyDrawn
 List of objects for which GUIGlObject::drawGLAdditional is called.
bool myAmInitialised = false
 Internal information whether doInit() was called.
GUIMainWindowmyApp
 The application.
GUIPerspectiveChangermyChanger = nullptr
 The perspective changer.
Position myClickedPopupPosition = Position::INVALID
 clicked poup position
std::vector< GUIGlObject * > myCurrentObjectsDialog
 vector with current objects dialog
long myFrameDrawTime = 0
 counter for measuring rendering time
GUIGlChildWindowmyGlChildWindowParent
 The parent window.
const SUMORTreemyGrid
 The visualization speed-up.
GUIDialog_EditViewportmyGUIDialogEditViewport = nullptr
 viewport chooser
GUIDialog_ViewSettingsmyGUIDialogViewSettings = nullptr
 Visualization changer.
bool myInEditMode = false
 Information whether too-tip informations shall be generated.
int myMouseHotspotX
 Offset to the mouse-hotspot from the mouse position.
int myMouseHotspotY
bool myPanning = false
 Panning flag.
FXMutex myPolyDrawLock
 poly draw lock
GUIGLObjectPopupMenumyPopup = nullptr
 The current popup-menu.
Position myPopupPosition = Position(0, 0)
 The current popup-menu position.
FXCondition mySnapshotCondition
 the semaphore when waiting for snapshots to finish
std::map< SUMOTime, std::vector< std::tuple< std::string, int, int > > > mySnapshots
 Snapshots.
FXMutex mySnapshotsMutex
 The mutex to use before accessing the decals list in order to avoid thread conflicts.
GUIVisualizationSettingsmyVisualizationSettings
 visualization settings
FXint myWindowCursorPositionX
 Position of the cursor relative to the window.
FXint myWindowCursorPositionY
Optionally shown decals
std::vector< DecalmyDecals
 The list of decals to show.
FXMutex myDecalsLockMutex
 The mutex to use before accessing the decals list in order to avoid thread conflicts.
std::vector< unsigned int > myPendingTextureDeletes
 texture IDs pending deletion
FXMutex myTextureDeleteMutex
 mutex for pending texture deletes

Static Protected Attributes

static const double SENSITIVITY = 0.1

Detailed Description

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 83 of file GUISUMOAbstractView.h.

Constructor & Destructor Documentation

◆ GUISUMOAbstractView()

GUISUMOAbstractView::GUISUMOAbstractView ( FXComposite * p,
GUIMainWindow & app,
GUIGlChildWindow * parent,
const SUMORTree & grid,
FXGLVisual * glVis,
FXGLCanvas * share )

constructor

Definition at line 136 of file GUISUMOAbstractView.cpp.

References gSchemeStorage, GUISUMOAbstractView(), MID_GLCANVAS, myApp, myChanger, myDecals, myGlChildWindowParent, myGrid, myMouseHotspotX, myMouseHotspotY, myVisualizationSettings, myWindowCursorPositionX, and myWindowCursorPositionY.

Referenced by copyViewportTo(), GNEViewNet::GNEViewNet(), GUISUMOAbstractView(), and GUIViewTraffic::GUIViewTraffic().

Here is the caller graph for this function:

◆ ~GUISUMOAbstractView()

Member Function Documentation

◆ addAdditionalGLVisualisation()

bool GUISUMOAbstractView::addAdditionalGLVisualisation ( GUIGlObject *const which)

Adds an object to call its additional visualisation method.

Parameters
[in]whichThe object to add
Returns
Always true
See also
GUIGlObject::drawGLAdditional

Definition at line 1935 of file GUISUMOAbstractView.cpp.

References myAdditionallyDrawn.

Referenced by GUIVehicle::drawOutsideNetwork().

Here is the caller graph for this function:

◆ addDecals()

void GUISUMOAbstractView::addDecals ( const std::vector< Decal > & decals)

add decals

Definition at line 242 of file GUISUMOAbstractView.cpp.

References myDecals, and myDecalsLockMutex.

Referenced by GNEApplicationWindow::handleEvent_FileLoaded(), and GUIApplicationWindow::handleEvent_SimulationLoaded().

Here is the caller graph for this function:

◆ addSnapshot()

void GUISUMOAbstractView::addSnapshot ( SUMOTime time,
const std::string & file,
const int w = -1,
const int h = -1 )

Sets the snapshot time to file map.

Parameters
[in]snapsThe snapshots to take at certain times
[in]wThe snapshot image width
[in]wThe snapshot image height

Definition at line 1391 of file GUISUMOAbstractView.cpp.

References mySnapshots, and mySnapshotsMutex.

Referenced by GUIViewTraffic::checkSnapshots(), and GUISettingsHandler::setSnapshots().

Here is the caller graph for this function:

◆ applyGLTransform()

Boundary GUISUMOAbstractView::applyGLTransform ( bool fixRatio = true)
protected

applies gl-transformations to fit the Boundary given by myChanger onto the canvas. If fixRatio is true, this boundary will be enlarged to prevent anisotropic stretching. (this should be set to false when doing selections)

Definition at line 1973 of file GUISUMOAbstractView.cpp.

References Boundary::add(), DEG2RAD, Boundary::getCenter(), Boundary::getHeight(), Boundary::getWidth(), GLO_MAX, myChanger, myVisualizationSettings, Position::rotateAround2D(), Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().

Referenced by getObjectsInBoundary(), makeSnapshot(), and paintGL().

Here is the caller graph for this function:

◆ buildColorRainbow()

virtual void GUISUMOAbstractView::buildColorRainbow ( const GUIVisualizationSettings & ,
GUIColorScheme & ,
int ,
GUIGlObjectType ,
const GUIVisualizationRainbowSettings &  )
inlinevirtual

recalibrate color scheme according to the current value range

Reimplemented in GNEViewNet, and GUIViewTraffic.

Definition at line 264 of file GUISUMOAbstractView.h.

◆ buildMinMaxRainbow()

◆ buildViewToolBars()

virtual void GUISUMOAbstractView::buildViewToolBars ( GUIGlChildWindow * )
inlinevirtual

builds the view toolbars

Reimplemented in GNEViewNet, and GUIViewTraffic.

Definition at line 97 of file GUISUMOAbstractView.h.

◆ centerTo() [1/3]

void GUISUMOAbstractView::centerTo ( const Boundary & bound)

centers to the chosen artifact

Definition at line 1002 of file GUISUMOAbstractView.cpp.

References myChanger.

◆ centerTo() [2/3]

void GUISUMOAbstractView::centerTo ( const Position & pos,
bool applyZoom )
virtual

centers to the chosen position

Parameters
[in]posPosition to center view
[in]applyZoomWhether to zoom in
[in]zoomDistThe distance in m to use for the zoom, values < 0 means: use the centeringBoundary
Note
caller is responsible for calling update

Definition at line 994 of file GUISUMOAbstractView.cpp.

References myChanger, and updatePositionInformationLabel().

◆ centerTo() [3/3]

void GUISUMOAbstractView::centerTo ( GUIGlID id,
bool applyZoom,
double zoomDist = 20 )
virtual

centers to the chosen artifact

Parameters
[in]idThe id of the artifact to center to
[in]applyZoomWhether to zoom in
[in]zoomDistThe distance in m to use for the zoom, values < 0 means: use the centeringBoundary
Note
caller is responsible for calling update

Reimplemented in GUIViewTraffic.

Definition at line 974 of file GUISUMOAbstractView.cpp.

References GUIGlObject::getCenteringBoundary(), GUIGlObjectStorage::gIDStorage, Position::INVALID, myChanger, and updatePositionInformationLabel().

Referenced by GUIViewTraffic::centerTo(), and paintGL().

Here is the caller graph for this function:

◆ changePedestrianNetworkColor()

virtual void GUISUMOAbstractView::changePedestrianNetworkColor ( const GUIVisualizationSettings & ) const
inlinevirtual

Change the color of the JuPedSim pedestrian network.

Parameters
sThe visualization settings

Reimplemented in GUIViewTraffic.

Definition at line 480 of file GUISUMOAbstractView.h.

◆ checkGDALImage()

FXImage * GUISUMOAbstractView::checkGDALImage ( Decal & d)
protected

check whether we can read image data or position with gdal

Definition at line 1781 of file GUISUMOAbstractView.cpp.

References GUISUMOAbstractView::Decal::centerX, GUISUMOAbstractView::Decal::centerY, GUISUMOAbstractView::Decal::filename, GeoConvHelper::getFinal(), getGridHeight(), getGridWidth(), GeoConvHelper::getOffset(), GUIDesignTextColorBlack, GUISUMOAbstractView::Decal::height, TL, GUISUMOAbstractView::Decal::width, WRITE_WARNINGF, Position::x(), and Position::y().

Referenced by drawDecals().

Here is the caller graph for this function:

◆ checkSnapshots()

void GUISUMOAbstractView::checkSnapshots ( )
virtual

Checks whether it is time for a snapshot.

Reimplemented in GUIViewTraffic.

Definition at line 1557 of file GUISUMOAbstractView.cpp.

References DELTA_T, getCurrentTimeStep(), joinToString(), makeSnapshot(), mySnapshotCondition, mySnapshots, mySnapshotsMutex, toString(), and WRITE_WARNING.

Referenced by GUIViewTraffic::checkSnapshots(), and onConfigure().

Here is the caller graph for this function:

◆ clearDecals()

void GUISUMOAbstractView::clearDecals ( )

clear all decals

Definition at line 1761 of file GUISUMOAbstractView.cpp.

References myDecals, myDecalsLockMutex, and queueTextureDelete().

Referenced by GUIApplicationWindow::closeAllWindows().

Here is the caller graph for this function:

◆ copyViewportTo()

void GUISUMOAbstractView::copyViewportTo ( GUISUMOAbstractView * view)
virtual

copy the viewport to the given view

Definition at line 1653 of file GUISUMOAbstractView.cpp.

References GUISUMOAbstractView(), myChanger, and setViewportFromToRot().

Referenced by GUIApplicationWindow::openNewView().

Here is the caller graph for this function:

◆ destroyPopup()

◆ displayColorLegend()

◆ displayLegend()

void GUISUMOAbstractView::displayLegend ( )
protected

Draws a line with ticks, and the length information.

Definition at line 667 of file GUISUMOAbstractView.cpp.

References RGBColor::BLACK, GLHelper::drawText(), FONS_ALIGN_LEFT, m2p(), GLHelper::popMatrix(), and GLHelper::pushMatrix().

Referenced by displayLegends().

Here is the caller graph for this function:

◆ displayLegends()

void GUISUMOAbstractView::displayLegends ( )
protected

Draws the configured legends.

Definition at line 733 of file GUISUMOAbstractView.cpp.

References displayColorLegend(), displayLegend(), myVisualizationSettings, GUIVisualizationSettings::SCHEME_NAME_EDGE_PARAM_NUMERICAL, GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL, GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL, and GUIVisualizationSettings::SCHEME_NAME_PARAM_NUMERICAL.

Referenced by makeSnapshot(), and paintGL().

Here is the caller graph for this function:

◆ doInit()

void GUISUMOAbstractView::doInit ( )
protectedvirtual

doInit

Reimplemented in GNEViewNet.

Definition at line 296 of file GUISUMOAbstractView.cpp.

Referenced by onConfigure().

Here is the caller graph for this function:

◆ doPaintGL()

int GUISUMOAbstractView::doPaintGL ( int ,
const Boundary &  )
protectedvirtual

paint GL

Reimplemented in GNEViewNet, and GUIViewTraffic.

Definition at line 290 of file GUISUMOAbstractView.cpp.

Referenced by getObjectsInBoundary(), makeSnapshot(), and paintGL().

Here is the caller graph for this function:

◆ drawDecals()

void GUISUMOAbstractView::drawDecals ( )
protected

◆ drawFPS()

void GUISUMOAbstractView::drawFPS ( )
protected

Draws frames-per-second indicator.

Definition at line 933 of file GUISUMOAbstractView.cpp.

References GLHelper::drawText(), FONS_ALIGN_LEFT, getFPS(), GLHelper::getMatrixCounter(), GLHelper::getVertexCounter(), GLHelper::popMatrix(), GLHelper::pushMatrix(), RGBColor::RED, and toString().

Referenced by paintGL().

Here is the caller graph for this function:

◆ drawPedestrianNetwork()

virtual void GUISUMOAbstractView::drawPedestrianNetwork ( const GUIVisualizationSettings & ) const
inlinevirtual

Draw (or not) the JuPedSim pedestrian network.

Parameters
sThe visualization settings

Reimplemented in GUIViewTraffic.

Definition at line 476 of file GUISUMOAbstractView.h.

◆ editVisualisationSettings()

GUIVisualizationSettings * GUISUMOAbstractView::editVisualisationSettings ( ) const

edit visualization settings (allow modify VisualizationSetings, use carefully)

Definition at line 1674 of file GUISUMOAbstractView.cpp.

References myVisualizationSettings.

Referenced by GUILane::getParameterWindow(), GUIApplicationWindow::onCmdEditChosen(), GUIApplicationWindow::onCmdToggleDrawJunctionShape(), and GUIApplicationWindow::onCmdToggleSecondaryShape().

Here is the caller graph for this function:

◆ endSnapshot()

virtual void GUISUMOAbstractView::endSnapshot ( )
inlinevirtual

Ends a video snapshot.

Reimplemented in GUIViewTraffic.

Definition at line 230 of file GUISUMOAbstractView.h.

◆ filterContextObjects()

std::vector< GUIGlObject * > GUISUMOAbstractView::filterContextObjects ( const std::vector< GUIGlObject * > & objects)

filter out duplicate and forbidden objects

Definition at line 1280 of file GUISUMOAbstractView.cpp.

References GUIGlObject::INVALID_PRIORITY.

Referenced by openObjectDialogAtCursor().

Here is the caller graph for this function:

◆ filterInternalLanes()

std::vector< GUIGlObject * > GUISUMOAbstractView::filterInternalLanes ( const std::vector< GUIGlObject * > & objects) const
protected

filter internal lanes in Objects under cursor

Definition at line 585 of file GUISUMOAbstractView.cpp.

References GLO_LANE, and myVisualizationSettings.

◆ getChanger()

GUIPerspectiveChanger & GUISUMOAbstractView::getChanger ( ) const

get changer

Definition at line 188 of file GUISUMOAbstractView.cpp.

References myChanger.

Referenced by GUISettingsHandler::applyViewport(), GUIApplicationWindow::closeAllWindows(), and GUIApplicationWindow::onCmdOpenInNetedit().

Here is the caller graph for this function:

◆ getColoringSchemesCombo()

MFXComboBoxIcon * GUISUMOAbstractView::getColoringSchemesCombo ( )

get coloring schemes combo

Definition at line 1775 of file GUISUMOAbstractView.cpp.

References myGlChildWindowParent.

Referenced by GUISettingsHandler::addSettings(), and GUIApplicationWindow::handleEvent_SimulationLoaded().

Here is the caller graph for this function:

◆ getCurrentTimeStep()

SUMOTime GUISUMOAbstractView::getCurrentTimeStep ( ) const
virtual

get the current simulation time

Reimplemented in GUIViewTraffic.

Definition at line 1599 of file GUISUMOAbstractView.cpp.

Referenced by checkSnapshots().

Here is the caller graph for this function:

◆ getDecals()

std::vector< GUISUMOAbstractView::Decal > & GUISUMOAbstractView::getDecals ( )

The list of decals to show.

Definition at line 1729 of file GUISUMOAbstractView.cpp.

References myDecals.

Referenced by GUIApplicationWindow::closeAllWindows().

Here is the caller graph for this function:

◆ getDecalsLockMutex()

FXMutex & GUISUMOAbstractView::getDecalsLockMutex ( )

The mutex to use before accessing the decals list in order to avoid thread conflicts.

Definition at line 1735 of file GUISUMOAbstractView.cpp.

References myDecalsLockMutex.

◆ getDelay()

double GUISUMOAbstractView::getDelay ( ) const

Returns the delay of the parent application.

Definition at line 2007 of file GUISUMOAbstractView.cpp.

References myApp.

◆ getEdgeDataAttrs()

virtual std::vector< std::string > GUISUMOAbstractView::getEdgeDataAttrs ( ) const
inlinevirtual

return list of loaded edgeData attributes

Reimplemented in GNEViewNet, and GUIViewTraffic.

Definition at line 269 of file GUISUMOAbstractView.h.

◆ getEdgeLaneParamKeys()

virtual std::vector< std::string > GUISUMOAbstractView::getEdgeLaneParamKeys ( bool ) const
inlinevirtual

return list of available edge parameters

Reimplemented in GNEViewNet, and GUIViewTraffic.

Definition at line 290 of file GUISUMOAbstractView.h.

◆ getFPS()

double GUISUMOAbstractView::getFPS ( ) const

retrieve FPS

Definition at line 921 of file GUISUMOAbstractView.cpp.

References MAX2(), and myFrameDrawTime.

Referenced by drawFPS(), and GUINet::getParameterWindow().

Here is the caller graph for this function:

◆ getGridHeight()

double GUISUMOAbstractView::getGridHeight ( ) const

get grid height

Definition at line 1698 of file GUISUMOAbstractView.cpp.

References myGrid.

Referenced by checkGDALImage().

Here is the caller graph for this function:

◆ getGridWidth()

double GUISUMOAbstractView::getGridWidth ( ) const

get grid width

Definition at line 1692 of file GUISUMOAbstractView.cpp.

References myGrid.

Referenced by checkGDALImage().

Here is the caller graph for this function:

◆ getGUIGlChildWindow()

GUIGlChildWindow * GUISUMOAbstractView::getGUIGlChildWindow ( )

get GUIGlChildWindow

Definition at line 927 of file GUISUMOAbstractView.cpp.

References myGlChildWindowParent.

◆ getGUIGlObjectsAtPosition()

std::vector< GUIGlObject * > GUISUMOAbstractView::getGUIGlObjectsAtPosition ( Position pos,
double radius )
protected

returns the GUIGlObjects at position within the given (rectangular) radius using GL_SELECT

Definition at line 515 of file GUISUMOAbstractView.cpp.

References Boundary::add(), GUIGlObject::getGlID(), getObjectsInBoundary(), GUIGlObjectStorage::gIDStorage, and Boundary::grow().

Referenced by getGUIGlObjectsUnderCursor(), getGUIGlObjectsUnderSnappedCursor(), and GUIViewTraffic::onGamingClick().

Here is the caller graph for this function:

◆ getGUIGlObjectsUnderCursor()

std::vector< GUIGlObject * > GUISUMOAbstractView::getGUIGlObjectsUnderCursor ( )
protected

returns the GUIGlObject under the cursor using GL_SELECT (including overlapped objects)

Definition at line 426 of file GUISUMOAbstractView.cpp.

References getGUIGlObjectsAtPosition(), getPositionInformation(), and SENSITIVITY.

Referenced by openObjectDialogAtCursor().

Here is the caller graph for this function:

◆ getGUIGlObjectsUnderSnappedCursor()

std::vector< GUIGlObject * > GUISUMOAbstractView::getGUIGlObjectsUnderSnappedCursor ( )
protected

returns the GUIGlObject under the gripped cursor using GL_SELECT (including overlapped objects)

Definition at line 432 of file GUISUMOAbstractView.cpp.

References getGUIGlObjectsAtPosition(), getPositionInformation(), SENSITIVITY, and snapToActiveGrid().

◆ getLaneUnderCursor()

GUILane * GUISUMOAbstractView::getLaneUnderCursor ( )
protectedvirtual

returns the GUILane at cursor position (implementation depends on view)

Reimplemented in GUIViewTraffic.

Definition at line 401 of file GUISUMOAbstractView.cpp.

◆ getMainWindow()

GUIMainWindow * GUISUMOAbstractView::getMainWindow ( ) const

get main window

Definition at line 1009 of file GUISUMOAbstractView.cpp.

References myApp.

Referenced by GUICursorDialog::buildDialogElements().

Here is the caller graph for this function:

◆ getMeanDataAttrs()

virtual std::vector< std::string > GUISUMOAbstractView::getMeanDataAttrs ( const std::string & meanDataID) const
inlinevirtual

return list of available attributes for the given meanData id

Reimplemented in GUIViewTraffic.

Definition at line 279 of file GUISUMOAbstractView.h.

References UNUSED_PARAMETER.

◆ getMeanDataIDs()

virtual std::vector< std::string > GUISUMOAbstractView::getMeanDataIDs ( ) const
inlinevirtual

return list of loaded edgeData ids (being computed in the current simulation)

Reimplemented in GUIViewTraffic.

Definition at line 274 of file GUISUMOAbstractView.h.

◆ getObjectAtPosition()

GUIGlID GUISUMOAbstractView::getObjectAtPosition ( Position pos,
double sensitivity = SENSITIVITY )
protected

returns the id of the object at position using GL_SELECT

Definition at line 438 of file GUISUMOAbstractView.cpp.

References Boundary::add(), Position::distanceTo2D(), GUIGlObject::getCenter(), GUIGlObject::getClickPriority(), GUIGlObject::getGlID(), getObjectsInBoundary(), GUIGlObjectStorage::gIDStorage, and Boundary::grow().

Referenced by getObjectUnderCursor().

Here is the caller graph for this function:

◆ getObjectsAtPosition()

std::vector< GUIGlID > GUISUMOAbstractView::getObjectsAtPosition ( Position pos,
double radius )
protected

returns the ids of the object at position within the given (rectangular) radius using GL_SELECT

Definition at line 480 of file GUISUMOAbstractView.cpp.

References Boundary::add(), GUIGlObject::getGlID(), getObjectsInBoundary(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_NETWORK, and Boundary::grow().

Referenced by getObjectsUnderCursor().

Here is the caller graph for this function:

◆ getObjectsInBoundary()

std::vector< GUIGlID > GUISUMOAbstractView::getObjectsInBoundary ( Boundary bound)
protected

returns the ids of all objects in the given boundary

Definition at line 545 of file GUISUMOAbstractView.cpp.

References applyGLTransform(), doPaintGL(), m2p(), myApp, myChanger, myVisualizationSettings, SUMO_const_laneWidth, and toString().

Referenced by getGUIGlObjectsAtPosition(), getObjectAtPosition(), getObjectsAtPosition(), GNEViewNet::onCmdAttachPOI(), and GNEViewNet::recalculateBoundaries().

Here is the caller graph for this function:

◆ getObjectsUnderCursor()

std::vector< GUIGlID > GUISUMOAbstractView::getObjectsUnderCursor ( )
protected

returns the id of the objects under the cursor using GL_SELECT (including overlapped objects)

Definition at line 419 of file GUISUMOAbstractView.cpp.

References getObjectsAtPosition(), getPositionInformation(), and SENSITIVITY.

◆ getObjectUnderCursor()

GUIGlID GUISUMOAbstractView::getObjectUnderCursor ( double sensitivity = SENSITIVITY)
protected

returns the id of the front object under the cursor using GL_SELECT

Definition at line 413 of file GUISUMOAbstractView.cpp.

References getObjectAtPosition(), and getPositionInformation().

Referenced by GUIViewTraffic::getLaneUnderCursor(), getToolTipID(), and onLeftBtnPress().

Here is the caller graph for this function:

◆ getPOIParamKeys()

virtual std::vector< std::string > GUISUMOAbstractView::getPOIParamKeys ( ) const
inlinevirtual

return list of available vehicle parameters

Reimplemented in GNEViewNet, and GUIViewTraffic.

Definition at line 300 of file GUISUMOAbstractView.h.

◆ getPopup()

GUIGLObjectPopupMenu * GUISUMOAbstractView::getPopup ( ) const

ge the current popup-menu

Definition at line 1068 of file GUISUMOAbstractView.cpp.

References myPopup.

◆ getPopupPosition()

const Position & GUISUMOAbstractView::getPopupPosition ( ) const

get position of current popup

Definition at line 1074 of file GUISUMOAbstractView.cpp.

References myPopupPosition.

Referenced by GNEViewNet::onCmdDeleteGeometryPoint(), GNEViewNet::onCmdEditEdgeEndpoint(), GNEViewNet::onCmdResetEdgeEndpoint(), GNEViewNet::onCmdSetFirstGeometryPoint(), GNEViewNet::onCmdSplitEdge(), and GNEViewNet::onCmdSplitEdgeBidi().

Here is the caller graph for this function:

◆ getPositionInformation()

◆ getRelDataAttrs()

virtual std::vector< std::string > GUISUMOAbstractView::getRelDataAttrs ( ) const
inlinevirtual

return list of loaded edgeRelation and tazRelation attributes

Reimplemented in GNEViewNet.

Definition at line 285 of file GUISUMOAbstractView.h.

◆ getToolTipID()

GUIGlID GUISUMOAbstractView::getToolTipID ( )
protectedvirtual

returns the id of object under cursor to show their tooltip

Reimplemented in GNEViewNet.

Definition at line 407 of file GUISUMOAbstractView.cpp.

References getObjectUnderCursor().

Referenced by paintGL().

Here is the caller graph for this function:

◆ getTrackedID()

GUIGlID GUISUMOAbstractView::getTrackedID ( ) const
virtual

get tracked id

Reimplemented in GUIViewTraffic.

Definition at line 1714 of file GUISUMOAbstractView.cpp.

References GUIGlObject::INVALID_ID.

Referenced by paintGL().

Here is the caller graph for this function:

◆ getVehicleParamKeys()

virtual std::vector< std::string > GUISUMOAbstractView::getVehicleParamKeys ( bool ) const
inlinevirtual

return list of available vehicle parameters

Reimplemented in GUIViewTraffic.

Definition at line 295 of file GUISUMOAbstractView.h.

◆ getViewportEditor()

GUIDialog_EditViewport * GUISUMOAbstractView::getViewportEditor ( )

get the viewport and create it on first access

Definition at line 1618 of file GUISUMOAbstractView.cpp.

References myGUIDialogEditViewport, TLC, and updateViewportValues().

Referenced by showViewportEditor().

Here is the caller graph for this function:

◆ getVisibleBoundary()

Boundary GUISUMOAbstractView::getVisibleBoundary ( ) const

get visible boundary

Definition at line 301 of file GUISUMOAbstractView.cpp.

References myChanger.

◆ getVisualisationSettings()

const GUIVisualizationSettings & GUISUMOAbstractView::getVisualisationSettings ( ) const

get visualization settings (read only)

Definition at line 1668 of file GUISUMOAbstractView.cpp.

References myVisualizationSettings.

Referenced by GNEAdditionalFrame::E2MultilaneLegendModule::E2MultilaneLegendModule(), GNEPathLegendModule::GNEPathLegendModule(), GNECrossingFrame::Information::Information(), GNEConnectorFrame::Legend::Legend(), GNEProhibitionFrame::Legend::Legend(), GUIApplicationWindow::onCmdToggleDrawJunctionShape(), and GUIApplicationWindow::onCmdToggleSecondaryShape().

Here is the caller graph for this function:

◆ getWindowCursorPosition()

Position GUISUMOAbstractView::getWindowCursorPosition ( ) const

return windows cursor position

Definition at line 1015 of file GUISUMOAbstractView.cpp.

References myWindowCursorPositionX, and myWindowCursorPositionY.

Referenced by updatePositionInformationLabel().

Here is the caller graph for this function:

◆ is3DView()

bool GUISUMOAbstractView::is3DView ( ) const
virtual

return whether this is a 3D view

Definition at line 307 of file GUISUMOAbstractView.cpp.

Referenced by GUISettingsHandler::applyViewport().

Here is the caller graph for this function:

◆ isAdditionalGLVisualisationEnabled()

bool GUISUMOAbstractView::isAdditionalGLVisualisationEnabled ( GUIGlObject *const which) const

Check if an object is added in the additional GL visualitation.

Parameters
[in]whichThe object to check
See also
GUIGlObject::drawGLAdditional

Definition at line 1963 of file GUISUMOAbstractView.cpp.

References myAdditionallyDrawn.

◆ isInEditMode()

bool GUISUMOAbstractView::isInEditMode ( )

returns true, if the edit button was pressed

Definition at line 182 of file GUISUMOAbstractView.cpp.

References myInEditMode.

◆ m2p()

double GUISUMOAbstractView::m2p ( double meter) const

meter-to-pixels conversion method

Definition at line 956 of file GUISUMOAbstractView.cpp.

References myChanger.

Referenced by displayLegend(), GUIViewTraffic::doPaintGL(), GNEViewNet::drawGLElements(), getObjectsInBoundary(), and makeSnapshot().

Here is the caller graph for this function:

◆ makeCurrent()

FXbool GUISUMOAbstractView::makeCurrent ( )

A reimplementation due to some internal reasons.

Definition at line 1028 of file GUISUMOAbstractView.cpp.

Referenced by GUIApplicationWindow::closeAllWindows(), GUIViewTraffic::getLaneUnderCursor(), makeSnapshot(), onConfigure(), GUIViewTraffic::onGamingClick(), onLeftBtnPress(), onPaint(), openObjectDialogAtCursor(), GNEViewNet::recalculateBoundaries(), and ~GUISUMOAbstractView().

Here is the caller graph for this function:

◆ makeSnapshot()

std::string GUISUMOAbstractView::makeSnapshot ( const std::string & destFile,
const int w = -1,
const int h = -1 )

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.

Parameters
[in]destFileThe name of the file to write the snapshot into
[in]wThe snapshot image width
[in]wThe snapshot image height
Returns
The error message, if an error occurred; "" otherwise

Definition at line 1401 of file GUISUMOAbstractView.cpp.

References applyGLTransform(), displayLegends(), doPaintGL(), drawDecals(), FILE, m2p(), makeCurrent(), myChanger, myGrid, myVisualizationSettings, paintGLGrid(), GLHelper::pushMatrix(), saveFrame(), MFXImageHelper::saveImage(), GLHelper::setGL2PS(), MFXSingleEventThread::sleep(), SUMO_const_laneWidth, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by checkSnapshots().

Here is the caller graph for this function:

◆ onCmdAddRerouter()

long GUISUMOAbstractView::onCmdAddRerouter ( FXObject * ,
FXSelector ,
void *  )
virtual

Reimplemented in GUIViewTraffic.

Definition at line 383 of file GUISUMOAbstractView.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCloseEdge()

long GUISUMOAbstractView::onCmdCloseEdge ( FXObject * ,
FXSelector ,
void *  )
virtual

Reimplemented in GUIViewTraffic.

Definition at line 377 of file GUISUMOAbstractView.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdCloseLane()

long GUISUMOAbstractView::onCmdCloseLane ( FXObject * ,
FXSelector ,
void *  )
virtual

interaction with the simulation

Reimplemented in GUIViewTraffic.

Definition at line 371 of file GUISUMOAbstractView.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdShowReachability()

long GUISUMOAbstractView::onCmdShowReachability ( FXObject * ,
FXSelector ,
void *  )
virtual

highlight edges according to reachability

Reimplemented in GUIViewTraffic.

Definition at line 389 of file GUISUMOAbstractView.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onConfigure()

long GUISUMOAbstractView::onConfigure ( FXObject * ,
FXSelector ,
void *  )
virtual

mouse functions

Definition at line 1035 of file GUISUMOAbstractView.cpp.

References checkSnapshots(), doInit(), makeCurrent(), myAmInitialised, and myVisualizationSettings.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onDoubleClicked()

long GUISUMOAbstractView::onDoubleClicked ( FXObject * ,
FXSelector ,
void *  )
virtual

Reimplemented in GUIViewTraffic.

Definition at line 1225 of file GUISUMOAbstractView.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onGamingClick()

void GUISUMOAbstractView::onGamingClick ( Position )
virtual

on gaming click

Reimplemented in GUIViewTraffic.

Definition at line 1720 of file GUISUMOAbstractView.cpp.

Referenced by onLeftBtnRelease().

Here is the caller graph for this function:

◆ onGamingRightClick()

void GUISUMOAbstractView::onGamingRightClick ( Position )
virtual

Reimplemented in GUIViewTraffic.

Definition at line 1724 of file GUISUMOAbstractView.cpp.

Referenced by onRightBtnRelease().

Here is the caller graph for this function:

◆ onKeyPress()

long GUISUMOAbstractView::onKeyPress ( FXObject * o,
FXSelector sel,
void * data )
virtual

keyboard functions

Reimplemented in GNEViewNet.

Definition at line 1352 of file GUISUMOAbstractView.cpp.

References myChanger, myPopup, and myVisualizationSettings.

Referenced by FXDEFMAP(), and GNEViewNet::onKeyPress().

Here is the caller graph for this function:

◆ onKeyRelease()

long GUISUMOAbstractView::onKeyRelease ( FXObject * o,
FXSelector sel,
void * data )
virtual

Reimplemented in GNEViewNet.

Definition at line 1378 of file GUISUMOAbstractView.cpp.

References myChanger, and myPopup.

Referenced by FXDEFMAP(), and GNEViewNet::onKeyRelease().

Here is the caller graph for this function:

◆ onLeftBtnPress()

long GUISUMOAbstractView::onLeftBtnPress ( FXObject * ,
FXSelector ,
void * ptr )
virtual

Reimplemented in GNEViewNet.

Definition at line 1108 of file GUISUMOAbstractView.cpp.

References destroyPopup(), getObjectUnderCursor(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_PERSON, GLO_VEHICLE, gSelected, makeCurrent(), myApp, myChanger, and startTrack().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onLeftBtnRelease()

long GUISUMOAbstractView::onLeftBtnRelease ( FXObject * ,
FXSelector ,
void * ptr )
virtual

Reimplemented in GNEViewNet.

Definition at line 1154 of file GUISUMOAbstractView.cpp.

References destroyPopup(), getPositionInformation(), myApp, myChanger, and onGamingClick().

Referenced by FXDEFMAP(), and GNEViewNet::onLeftBtnRelease().

Here is the caller graph for this function:

◆ onMiddleBtnPress()

long GUISUMOAbstractView::onMiddleBtnPress ( FXObject * ,
FXSelector ,
void * ptr )
virtual

Reimplemented in GNEViewNet.

Definition at line 1166 of file GUISUMOAbstractView.cpp.

References destroyPopup(), GUICursorSubSys::getCursor(), MOVEVIEW, myApp, myChanger, and myPanning.

Referenced by FXDEFMAP(), and GNEViewNet::onMiddleBtnPress().

Here is the caller graph for this function:

◆ onMiddleBtnRelease()

long GUISUMOAbstractView::onMiddleBtnRelease ( FXObject * ,
FXSelector ,
void * ptr )
virtual

Reimplemented in GNEViewNet.

Definition at line 1183 of file GUISUMOAbstractView.cpp.

References DEFAULT, destroyPopup(), GUICursorSubSys::getCursor(), myApp, myChanger, and myPanning.

Referenced by FXDEFMAP(), and GNEViewNet::onMiddleBtnRelease().

Here is the caller graph for this function:

◆ onMouseLeft()

long GUISUMOAbstractView::onMouseLeft ( FXObject * ,
FXSelector ,
void *  )
virtual

Definition at line 1275 of file GUISUMOAbstractView.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onMouseMove()

long GUISUMOAbstractView::onMouseMove ( FXObject * ,
FXSelector ,
void * ptr )
virtual

Reimplemented in GNEViewNet.

Definition at line 1247 of file GUISUMOAbstractView.cpp.

References destroyPopup(), getPositionInformation(), Position::INVALID, MID_CURSORDIALOG_FRONT, myChanger, myGUIDialogEditViewport, myPopup, myPopupPosition, and updatePositionInformationLabel().

Referenced by FXDEFMAP(), GNEViewNet::onMouseMove(), and onRightBtnRelease().

Here is the caller graph for this function:

◆ onMouseWheel()

long GUISUMOAbstractView::onMouseWheel ( FXObject * ,
FXSelector ,
void * ptr )
virtual

Definition at line 1231 of file GUISUMOAbstractView.cpp.

References myApp, myChanger, myGUIDialogEditViewport, and updatePositionInformationLabel().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onPaint()

long GUISUMOAbstractView::onPaint ( FXObject * ,
FXSelector ,
void *  )
virtual

Definition at line 1053 of file GUISUMOAbstractView.cpp.

References makeCurrent(), MID_RUNTESTS, myAmInitialised, myApp, and paintGL().

Referenced by FXDEFMAP(), GNEViewNet::updateDataModeSpecificControls(), GNEViewNet::updateDemandModeSpecificControls(), and GNEViewNet::updateNetworkModeSpecificControls().

Here is the caller graph for this function:

◆ onRightBtnPress()

long GUISUMOAbstractView::onRightBtnPress ( FXObject * ,
FXSelector ,
void * ptr )
virtual

Reimplemented in GNEViewNet.

Definition at line 1199 of file GUISUMOAbstractView.cpp.

References destroyPopup(), myApp, and myChanger.

Referenced by FXDEFMAP(), and GNEViewNet::onRightBtnPress().

Here is the caller graph for this function:

◆ onRightBtnRelease()

long GUISUMOAbstractView::onRightBtnRelease ( FXObject * o,
FXSelector sel,
void * ptr )
virtual

Reimplemented in GNEViewNet.

Definition at line 1210 of file GUISUMOAbstractView.cpp.

References destroyPopup(), getPositionInformation(), myApp, myChanger, onGamingRightClick(), onMouseMove(), and openObjectDialogAtCursor().

Referenced by FXDEFMAP(), and GNEViewNet::onRightBtnRelease().

Here is the caller graph for this function:

◆ onVisualizationChange()

long GUISUMOAbstractView::onVisualizationChange ( FXObject * ,
FXSelector ,
void *  )
virtual

hook to react on change in visualization settings

Definition at line 395 of file GUISUMOAbstractView.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ openObjectDialog()

void GUISUMOAbstractView::openObjectDialog ( const std::vector< GUIGlObject * > & objects,
const bool filter = true )

open object dialog for the given object

Definition at line 1321 of file GUISUMOAbstractView.cpp.

References myApp, myCurrentObjectsDialog, myPopup, openPopupDialog(), and GUIGLObjectPopupMenu::PROPERTIES.

Referenced by GNEViewNet::openObjectDialogAtCursor().

Here is the caller graph for this function:

◆ openObjectDialogAtCursor()

void GUISUMOAbstractView::openObjectDialogAtCursor ( const FXEvent * ev)
virtual

open object dialog at the cursor position

Reimplemented in GNEViewNet.

Definition at line 1293 of file GUISUMOAbstractView.cpp.

References filterContextObjects(), getGUIGlObjectsUnderCursor(), GUIGlObjectStorage::gIDStorage, makeCurrent(), myAmInitialised, myApp, myPopup, openPopupDialog(), and GUIGLObjectPopupMenu::PROPERTIES.

Referenced by onRightBtnRelease().

Here is the caller graph for this function:

◆ openPopupDialog()

void GUISUMOAbstractView::openPopupDialog ( )
protected

open popup dialog

Definition at line 1907 of file GUISUMOAbstractView.cpp.

References getPositionInformation(), MIN2(), myApp, myChanger, myPopup, and myPopupPosition.

Referenced by GNEViewNet::openDeleteDialogAtCursor(), openObjectDialog(), GNEViewNet::openObjectDialogAtCursor(), openObjectDialogAtCursor(), and GNEViewNet::openSelectDialogAtCursor().

Here is the caller graph for this function:

◆ p2m()

double GUISUMOAbstractView::p2m ( double pixel) const

pixels-to-meters conversion method

Definition at line 962 of file GUISUMOAbstractView.cpp.

References myChanger.

Referenced by drawDecals().

Here is the caller graph for this function:

◆ paintGL()

void GUISUMOAbstractView::paintGL ( )
protected

FOX needs this.

performs the painting of the simulation

Definition at line 317 of file GUISUMOAbstractView.cpp.

References applyGLTransform(), centerTo(), GLHelper::checkCounterMatrix(), GLHelper::checkCounterName(), displayLegends(), doPaintGL(), drawFPS(), SysUtils::getCurrentMillis(), getToolTipID(), getTrackedID(), GUIGlObject::INVALID_ID, myFrameDrawTime, myGlChildWindowParent, myVisualizationSettings, processPendingTextureDeletes(), GLHelper::resetMatrixCounter(), GLHelper::resetVertexCounter(), and showToolTipFor().

Referenced by onPaint().

Here is the caller graph for this function:

◆ paintGLGrid()

void GUISUMOAbstractView::paintGLGrid ( ) const
protected

paints a grid

Definition at line 625 of file GUISUMOAbstractView.cpp.

References myChanger, and myVisualizationSettings.

Referenced by GUIViewTraffic::doPaintGL(), GNEViewNet::drawGrid(), and makeSnapshot().

Here is the caller graph for this function:

◆ processPendingTextureDeletes()

void GUISUMOAbstractView::processPendingTextureDeletes ( )

process pending texture deletions

Definition at line 1748 of file GUISUMOAbstractView.cpp.

References myPendingTextureDeletes, and myTextureDeleteMutex.

Referenced by GUIApplicationWindow::closeAllWindows(), paintGL(), and ~GUISUMOAbstractView().

Here is the caller graph for this function:

◆ queueTextureDelete()

void GUISUMOAbstractView::queueTextureDelete ( unsigned int textureId)

queue a texture for deletion

Definition at line 1741 of file GUISUMOAbstractView.cpp.

References myPendingTextureDeletes, and myTextureDeleteMutex.

Referenced by clearDecals(), and ~GUISUMOAbstractView().

Here is the caller graph for this function:

◆ recalculateBoundaries()

virtual void GUISUMOAbstractView::recalculateBoundaries ( )
inlinevirtual

recalculate boundaries

Reimplemented in GNEViewNet.

Definition at line 94 of file GUISUMOAbstractView.h.

◆ recenterView()

void GUISUMOAbstractView::recenterView ( )
virtual

recenters the view

Definition at line 968 of file GUISUMOAbstractView.cpp.

References myChanger, and myGrid.

Referenced by GUISettingsHandler::applyViewport(), and GUICompleteSchemeStorage::setViewport().

Here is the caller graph for this function:

◆ remove() [1/2]

void GUISUMOAbstractView::remove ( GUIDialog_EditViewport * )

remove viewport

Definition at line 1680 of file GUISUMOAbstractView.cpp.

References myGUIDialogEditViewport.

◆ remove() [2/2]

void GUISUMOAbstractView::remove ( GUIDialog_ViewSettings * )

remove view settings

Definition at line 1686 of file GUISUMOAbstractView.cpp.

References myGUIDialogViewSettings.

◆ removeAdditionalGLVisualisation()

bool GUISUMOAbstractView::removeAdditionalGLVisualisation ( GUIGlObject *const which)

Removes an object from the list of objects that show additional things.

Parameters
[in]whichThe object to remove
Returns
True if the object was known, false otherwise
See also
GUIGlObject::drawGLAdditional

Definition at line 1947 of file GUISUMOAbstractView.cpp.

References myAdditionallyDrawn.

Referenced by GUIVehicle::drawOutsideNetwork().

Here is the caller graph for this function:

◆ replacePopup()

void GUISUMOAbstractView::replacePopup ( GUIGLObjectPopupMenu * popUp)

replace PopUp

Definition at line 1092 of file GUISUMOAbstractView.cpp.

References myChanger, and myPopup.

◆ retrieveBreakpoints()

virtual const std::vector< SUMOTime > GUISUMOAbstractView::retrieveBreakpoints ( ) const
inlinevirtual

retrieve breakpoints if provided by the application

Reimplemented in GUIViewTraffic.

Definition at line 464 of file GUISUMOAbstractView.h.

◆ saveFrame()

void GUISUMOAbstractView::saveFrame ( const std::string & destFile,
FXColor * buf )
virtual

Adds a frame to a video snapshot which will be initialized if necessary.

Reimplemented in GUIViewTraffic.

Definition at line 1550 of file GUISUMOAbstractView.cpp.

References UNUSED_PARAMETER.

Referenced by makeSnapshot().

Here is the caller graph for this function:

◆ screenPos2NetPos()

Position GUISUMOAbstractView::screenPos2NetPos ( int x,
int y ) const

Translate screen position to network position.

Definition at line 227 of file GUISUMOAbstractView.cpp.

References DEG2RAD, Boundary::getCenter(), Boundary::getHeight(), Boundary::getWidth(), myChanger, Position::rotateAround2D(), Boundary::xmin(), and Boundary::ymin().

Referenced by drawDecals(), and getPositionInformation().

Here is the caller graph for this function:

◆ setBreakpoints()

void GUISUMOAbstractView::setBreakpoints ( const std::vector< SUMOTime > & breakpoints)

Sets the breakpoints of the parent application.

Definition at line 2019 of file GUISUMOAbstractView.cpp.

References myApp.

◆ setColorScheme()

bool GUISUMOAbstractView::setColorScheme ( const std::string & )
virtual

set color scheme

Reimplemented in GNEViewNet, and GUIViewTraffic.

Definition at line 1662 of file GUISUMOAbstractView.cpp.

Referenced by GUISettingsHandler::addSettings(), and GUIApplicationWindow::handleEvent_SimulationLoaded().

Here is the caller graph for this function:

◆ setDelay()

void GUISUMOAbstractView::setDelay ( double delay)

Sets the delay of the parent application.

Definition at line 2013 of file GUISUMOAbstractView.cpp.

References myApp.

◆ setViewportFromToRot()

void GUISUMOAbstractView::setViewportFromToRot ( const Position & lookFrom,
const Position & lookAt,
double rotation )
virtual

applies the given viewport settings

Definition at line 1645 of file GUISUMOAbstractView.cpp.

References myChanger, Position::x(), Position::y(), and Position::z().

Referenced by GUISettingsHandler::applyViewport(), copyViewportTo(), GUIApplicationWindow::handleEvent_SimulationLoaded(), and GUICompleteSchemeStorage::setViewport().

Here is the caller graph for this function:

◆ setWindowCursorPosition()

void GUISUMOAbstractView::setWindowCursorPosition ( FXint x,
FXint y )

Returns the gl-id of the object under the given coordinates.

Definition at line 1021 of file GUISUMOAbstractView.cpp.

References myMouseHotspotX, myMouseHotspotY, myWindowCursorPositionX, and myWindowCursorPositionY.

◆ showToolTipFor()

bool GUISUMOAbstractView::showToolTipFor ( const GUIGlID idToolTip)
protected

invokes the tooltip for the given object

Definition at line 610 of file GUISUMOAbstractView.cpp.

References GUIGlObjectStorage::gIDStorage, GUIGlObject::INVALID_ID, and myGlChildWindowParent.

Referenced by paintGL().

Here is the caller graph for this function:

◆ showViewportEditor()

void GUISUMOAbstractView::showViewportEditor ( )
virtual

show viewport editor

Definition at line 1636 of file GUISUMOAbstractView.cpp.

References getViewportEditor(), Position::INVALID, myChanger, and myGUIDialogEditViewport.

◆ showViewschemeEditor()

void GUISUMOAbstractView::showViewschemeEditor ( )

show viewsscheme editor

Definition at line 1605 of file GUISUMOAbstractView.cpp.

References myGUIDialogViewSettings, and myVisualizationSettings.

◆ snapToActiveGrid()

Position GUISUMOAbstractView::snapToActiveGrid ( const Position & pos,
bool snapXY = true ) const

Returns a position that is mapped to the closest grid point if the grid is active.

note: formats are pos(x,y,0) por pos(0,0,z)

Definition at line 208 of file GUISUMOAbstractView.cpp.

References myVisualizationSettings, Position::x(), Position::y(), and Position::z().

Referenced by GNEMoveElement::calculateLaneOffset(), GNEMoveElement::commitMove(), GNEViewNet::drawTemporalDrawingShape(), GNEViewNet::drawTemporalJunction(), GNEViewNet::drawTemporalSplitJunction(), GNEViewNet::drawTestsCircle(), getGUIGlObjectsUnderSnappedCursor(), GNEMoveElement::moveElement(), and GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ startTrack()

void GUISUMOAbstractView::startTrack ( int )
virtual

star track

Reimplemented in GUIViewTraffic.

Definition at line 1704 of file GUISUMOAbstractView.cpp.

Referenced by onLeftBtnPress().

Here is the caller graph for this function:

◆ stopTrack()

void GUISUMOAbstractView::stopTrack ( )
virtual

stop track

Reimplemented in GUIViewTraffic.

Definition at line 1709 of file GUISUMOAbstractView.cpp.

◆ updatePositionInformationLabel()

void GUISUMOAbstractView::updatePositionInformationLabel ( ) const
protectedvirtual

update position information labels

Definition at line 265 of file GUISUMOAbstractView.cpp.

References GeoConvHelper::cartesian2geo(), GeoConvHelper::getFinal(), OptionsCont::getOptions(), getPositionInformation(), getWindowCursorPosition(), gPrecisionGeo, myApp, TL, toString(), Position::x(), and Position::y().

Referenced by centerTo(), centerTo(), onMouseMove(), and onMouseWheel().

Here is the caller graph for this function:

◆ updateToolTip()

void GUISUMOAbstractView::updateToolTip ( )

A method that updates the tooltip.

Definition at line 194 of file GUISUMOAbstractView.cpp.

References myGlChildWindowParent.

◆ updateViewportValues()

void GUISUMOAbstractView::updateViewportValues ( )
virtual

update the viewport chooser with the current view values

Definition at line 1628 of file GUISUMOAbstractView.cpp.

References myChanger, and myGUIDialogEditViewport.

Referenced by getViewportEditor().

Here is the caller graph for this function:

◆ waitForSnapshots()

void GUISUMOAbstractView::waitForSnapshots ( const SUMOTime snapshotTime)

Definition at line 1590 of file GUISUMOAbstractView.cpp.

References mySnapshotCondition, mySnapshots, and mySnapshotsMutex.

◆ zoom2Pos()

void GUISUMOAbstractView::zoom2Pos ( Position & camera,
Position & lookAt,
double zoom )
virtual

zoom interface for 3D view

Definition at line 312 of file GUISUMOAbstractView.cpp.

Field Documentation

◆ myAdditionallyDrawn

std::map<GUIGlObject*, int> GUISUMOAbstractView::myAdditionallyDrawn
protected

◆ myAmInitialised

bool GUISUMOAbstractView::myAmInitialised = false
protected

Internal information whether doInit() was called.

Definition at line 603 of file GUISUMOAbstractView.h.

Referenced by onConfigure(), onPaint(), GNEViewNet::openObjectDialogAtCursor(), and openObjectDialogAtCursor().

◆ myApp

◆ myChanger

◆ myClickedPopupPosition

Position GUISUMOAbstractView::myClickedPopupPosition = Position::INVALID
protected

◆ myCurrentObjectsDialog

std::vector<GUIGlObject*> GUISUMOAbstractView::myCurrentObjectsDialog
protected

vector with current objects dialog

Definition at line 597 of file GUISUMOAbstractView.h.

Referenced by destroyPopup(), GNEViewNet::drawTemporalRoundabout(), and openObjectDialog().

◆ myDecals

std::vector<Decal> GUISUMOAbstractView::myDecals
protected

The list of decals to show.

Definition at line 618 of file GUISUMOAbstractView.h.

Referenced by addDecals(), clearDecals(), drawDecals(), getDecals(), GUISUMOAbstractView(), and ~GUISUMOAbstractView().

◆ myDecalsLockMutex

FXMutex GUISUMOAbstractView::myDecalsLockMutex
protected

The mutex to use before accessing the decals list in order to avoid thread conflicts.

Definition at line 621 of file GUISUMOAbstractView.h.

Referenced by addDecals(), clearDecals(), drawDecals(), and getDecalsLockMutex().

◆ myFrameDrawTime

long GUISUMOAbstractView::myFrameDrawTime = 0
protected

counter for measuring rendering time

Definition at line 647 of file GUISUMOAbstractView.h.

Referenced by getFPS(), and paintGL().

◆ myGlChildWindowParent

GUIGlChildWindow* GUISUMOAbstractView::myGlChildWindowParent
protected

◆ myGrid

const SUMORTree* GUISUMOAbstractView::myGrid
protected

The visualization speed-up.

Definition at line 573 of file GUISUMOAbstractView.h.

Referenced by GNEViewNet::drawGLElements(), getGridHeight(), getGridWidth(), GUISUMOAbstractView(), makeSnapshot(), and recenterView().

◆ myGUIDialogEditViewport

GUIDialog_EditViewport* GUISUMOAbstractView::myGUIDialogEditViewport = nullptr
protected

◆ myGUIDialogViewSettings

GUIDialog_ViewSettings* GUISUMOAbstractView::myGUIDialogViewSettings = nullptr
protected

◆ myInEditMode

bool GUISUMOAbstractView::myInEditMode = false
protected

Information whether too-tip informations shall be generated.

Definition at line 582 of file GUISUMOAbstractView.h.

Referenced by isInEditMode().

◆ myMouseHotspotX

int GUISUMOAbstractView::myMouseHotspotX
protected

Offset to the mouse-hotspot from the mouse position.

Definition at line 585 of file GUISUMOAbstractView.h.

Referenced by GUISUMOAbstractView(), and setWindowCursorPosition().

◆ myMouseHotspotY

int GUISUMOAbstractView::myMouseHotspotY
protected

Definition at line 585 of file GUISUMOAbstractView.h.

Referenced by GUISUMOAbstractView(), and setWindowCursorPosition().

◆ myPanning

bool GUISUMOAbstractView::myPanning = false
protected

Panning flag.

Definition at line 579 of file GUISUMOAbstractView.h.

Referenced by onMiddleBtnPress(), onMiddleBtnRelease(), and GNEViewNet::updateCursor().

◆ myPendingTextureDeletes

std::vector<unsigned int> GUISUMOAbstractView::myPendingTextureDeletes
protected

texture IDs pending deletion

Definition at line 624 of file GUISUMOAbstractView.h.

Referenced by processPendingTextureDeletes(), and queueTextureDelete().

◆ myPolyDrawLock

FXMutex GUISUMOAbstractView::myPolyDrawLock
mutableprotected

poly draw lock

Definition at line 641 of file GUISUMOAbstractView.h.

◆ myPopup

◆ myPopupPosition

Position GUISUMOAbstractView::myPopupPosition = Position(0, 0)
protected

The current popup-menu position.

Definition at line 594 of file GUISUMOAbstractView.h.

Referenced by destroyPopup(), getPopupPosition(), onMouseMove(), and openPopupDialog().

◆ mySnapshotCondition

FXCondition GUISUMOAbstractView::mySnapshotCondition
protected

the semaphore when waiting for snapshots to finish

Definition at line 638 of file GUISUMOAbstractView.h.

Referenced by checkSnapshots(), and waitForSnapshots().

◆ mySnapshots

std::map<SUMOTime, std::vector<std::tuple<std::string, int, int> > > GUISUMOAbstractView::mySnapshots
protected

Snapshots.

Definition at line 632 of file GUISUMOAbstractView.h.

Referenced by addSnapshot(), checkSnapshots(), and waitForSnapshots().

◆ mySnapshotsMutex

FXMutex GUISUMOAbstractView::mySnapshotsMutex
protected

The mutex to use before accessing the decals list in order to avoid thread conflicts.

Definition at line 635 of file GUISUMOAbstractView.h.

Referenced by addSnapshot(), checkSnapshots(), and waitForSnapshots().

◆ myTextureDeleteMutex

FXMutex GUISUMOAbstractView::myTextureDeleteMutex
protected

mutex for pending texture deletes

Definition at line 627 of file GUISUMOAbstractView.h.

Referenced by processPendingTextureDeletes(), and queueTextureDelete().

◆ myVisualizationSettings

GUIVisualizationSettings* GUISUMOAbstractView::myVisualizationSettings
protected

◆ myWindowCursorPositionX

FXint GUISUMOAbstractView::myWindowCursorPositionX
protected

Position of the cursor relative to the window.

Definition at line 609 of file GUISUMOAbstractView.h.

Referenced by getPositionInformation(), getWindowCursorPosition(), GUISUMOAbstractView(), and setWindowCursorPosition().

◆ myWindowCursorPositionY

FXint GUISUMOAbstractView::myWindowCursorPositionY
protected

◆ SENSITIVITY

const double GUISUMOAbstractView::SENSITIVITY = 0.1
staticprotected

The documentation for this class was generated from the following files: