Eclipse SUMO - Simulation of Urban MObility
GUISUMOAbstractView.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
21 // The base class for a view
22 /****************************************************************************/
23 #pragma once
24 #include <config.h>
25 
26 #include <string>
27 #include <vector>
28 #include <map>
30 // fx3d includes windows.h so we need to guard against macro pollution
31 #ifdef WIN32
32 #define NOMINMAX
33 #endif
34 #include <fx3d.h>
35 #ifdef WIN32
36 #undef NOMINMAX
37 #endif
38 
39 #include <utils/geom/Boundary.h>
40 #include <utils/geom/Position.h>
41 #include <utils/common/RGBColor.h>
42 #include <utils/common/SUMOTime.h>
45 
46 
47 // ===========================================================================
48 // class declarations
49 // ===========================================================================
50 class GUIGlChildWindow;
51 class GUIVehicle;
53 class GUIMainWindow;
55 class GUIGlObject;
59 class GUILane;
60 
63  bool operator()(const GUIGlObject* const a, const GUIGlObject* const b) const {
64  if (a->getClickPriority() == b->getClickPriority()) {
65  // sorty by GUIGlID as second criterion to simplify
66  // duplicate removal
67  return a->getGlID() > b->getGlID();
68  } else {
69  return a->getClickPriority() > b->getClickPriority();
70  }
71  }
72 };
73 
74 // ===========================================================================
75 // class definitions
76 // ===========================================================================
83 class GUISUMOAbstractView : public FXGLCanvas {
84  FXDECLARE(GUISUMOAbstractView)
85 
86 public:
88  GUISUMOAbstractView(FXComposite* p, GUIMainWindow& app, GUIGlChildWindow* parent, const SUMORTree& grid, FXGLVisual* glVis, FXGLCanvas* share);
89 
91  virtual ~GUISUMOAbstractView();
92 
94  virtual void recalculateBoundaries() { };
95 
98 
100  virtual void recenterView();
101 
108  virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist = 20);
109 
116  virtual void centerTo(const Position& pos, bool applyZoom, double zoomDist = 20);
117 
119  void centerTo(const Boundary& bound);
120 
122  virtual void setViewportFromToRot(const Position& lookFrom, const Position& lookAt, double rotation);
123 
125  virtual void copyViewportTo(GUISUMOAbstractView* view);
126 
128  double m2p(double meter) const;
129 
131  double p2m(double pixel) const;
132 
134  GUIMainWindow* getMainWindow() const;
135 
138 
140  void setWindowCursorPosition(FXint x, FXint y);
141 
143  FXbool makeCurrent();
144 
146  bool isInEditMode();
147 
150 
153 
155  virtual bool is3DView() const;
156 
158  virtual void zoom2Pos(Position& camera, Position& lookAt, double zoom);
159 
161 
162  virtual long onConfigure(FXObject*, FXSelector, void*);
163  virtual long onPaint(FXObject*, FXSelector, void*);
164  virtual long onLeftBtnPress(FXObject*, FXSelector, void*);
165  virtual long onLeftBtnRelease(FXObject*, FXSelector, void*);
166  virtual long onMiddleBtnPress(FXObject*, FXSelector, void*);
167  virtual long onMiddleBtnRelease(FXObject*, FXSelector, void*);
168  virtual long onRightBtnPress(FXObject*, FXSelector, void*);
169  virtual long onRightBtnRelease(FXObject*, FXSelector, void*);
170  virtual long onDoubleClicked(FXObject*, FXSelector, void*);
171  virtual long onMouseWheel(FXObject*, FXSelector, void*);
172  virtual long onMouseMove(FXObject*, FXSelector, void*);
173  virtual long onMouseLeft(FXObject*, FXSelector, void*);
175 
177 
178  virtual long onKeyPress(FXObject* o, FXSelector sel, void* data);
179  virtual long onKeyRelease(FXObject* o, FXSelector sel, void* data);
181 
183  virtual long onCmdCloseLane(FXObject*, FXSelector, void*);
184  virtual long onCmdCloseEdge(FXObject*, FXSelector, void*);
185  virtual long onCmdAddRerouter(FXObject*, FXSelector, void*);
186 
188  virtual long onCmdShowReachability(FXObject*, FXSelector, void*);
189 
191  virtual long onVisualizationChange(FXObject*, FXSelector, void*);
192 
194  std::vector<GUIGlObject*> filterContextObjects(const std::vector<GUIGlObject*>& objects);
195 
197  virtual void openObjectDialogAtCursor(const FXEvent* ev);
198 
200  void openObjectDialog(const std::vector<GUIGlObject*>& objects, const bool filter = true);
201 
203  void updateToolTip();
204 
207 
213  void addSnapshot(SUMOTime time, const std::string& file, const int w = -1, const int h = -1);
214 
224  std::string makeSnapshot(const std::string& destFile, const int w = -1, const int h = -1);
225 
227  virtual void saveFrame(const std::string& destFile, FXColor* buf);
228 
230  virtual void endSnapshot() {}
231 
233  virtual void checkSnapshots();
234 
235  void waitForSnapshots(const SUMOTime snapshotTime);
236 
238  virtual SUMOTime getCurrentTimeStep() const;
239 
241 
244 
246  virtual void updateViewportValues();
247 
249  virtual void showViewportEditor();
250 
252  void showViewschemeEditor();
253 
255  virtual bool setColorScheme(const std::string&);
256 
259 
262 
264  virtual void buildColorRainbow(const GUIVisualizationSettings& /*s*/, GUIColorScheme& /*scheme*/, int /*active*/, GUIGlObjectType /*objectType*/,
265  bool hide = false, double hideThreshold = 0,
266  bool hide2 = false, double hideThreshold2 = 0) {
267  UNUSED_PARAMETER(hide);
268  UNUSED_PARAMETER(hideThreshold);
269  UNUSED_PARAMETER(hide2);
270  UNUSED_PARAMETER(hideThreshold2);
271  }
272 
274  virtual std::vector<std::string> getEdgeDataAttrs() const {
275  return std::vector<std::string>();
276  }
277 
279  virtual std::vector<std::string> getMeanDataIDs() const {
280  return std::vector<std::string>();
281  }
282 
284  virtual std::vector<std::string> getMeanDataAttrs(const std::string& meanDataID) const {
285  UNUSED_PARAMETER(meanDataID);
286  return std::vector<std::string>();
287  }
288 
290  virtual std::vector<std::string> getRelDataAttrs() const {
291  return std::vector<std::string>();
292  }
293 
295  virtual std::vector<std::string> getEdgeLaneParamKeys(bool /*edgeKeys*/) const {
296  return std::vector<std::string>();
297  }
298 
300  virtual std::vector<std::string> getVehicleParamKeys(bool /*vTypeKeys*/) const {
301  return std::vector<std::string>();
302  }
303 
305  virtual std::vector<std::string> getPOIParamKeys() const {
306  return std::vector<std::string>();
307  }
308 
311 
314 
316  // @todo: check why this is here
317  double getGridWidth() const;
318 
320  // @todo: check why this is here
321  double getGridHeight() const;
322 
324  virtual void startTrack(int /*id*/);
325 
327  virtual void stopTrack();
328 
330  virtual GUIGlID getTrackedID() const;
331 
333  virtual void onGamingClick(Position /*pos*/);
334  virtual void onGamingRightClick(Position /*pos*/);
335 
338 
344  bool addAdditionalGLVisualisation(GUIGlObject* const which);
345 
351  bool removeAdditionalGLVisualisation(GUIGlObject* const which);
352 
357  bool isAdditionalGLVisualisationEnabled(GUIGlObject* const which) const;
358 
360 
362  const Position& getPopupPosition() const;
363 
365  void destroyPopup();
366 
368  void replacePopup(GUIGLObjectPopupMenu* popUp);
369 
372  struct Decal {
373 
375  Decal() {};
376 
378  std::string filename;
379 
381  double centerX = 0;
382 
384  double centerY = 0;
385 
387  double centerZ = 0;
388 
390  double width = 0;
391 
393  double height = 0;
394 
396  double altitude = 0;
397 
399  double rot = 0;
400 
402  double tilt = 0;
403 
405  double roll = 0;
406 
408  double layer = 0;
409 
411  bool initialised = false;
412 
414  bool skip2D = false;
415 
417  bool screenRelative = false;
418 
420  int glID = -1;
421 
423  FXImage* image = nullptr;
424  };
425 
427  std::vector<Decal>& getDecals();
428 
430  FXMutex& getDecalsLockMutex();
431 
434 
436  virtual Position getPositionInformation() const;
437 
441  Position snapToActiveGrid(const Position& pos, bool snapXY = true) const;
442 
444  Position screenPos2NetPos(int x, int y) const;
445 
447  void addDecals(const std::vector<Decal>& decals);
448 
450  double getDelay() const;
451 
453  void setDelay(double delay);
454 
456  void setBreakpoints(const std::vector<SUMOTime>& breakpoints);
457 
459  virtual const std::vector<SUMOTime> retrieveBreakpoints() const {
460  return std::vector<SUMOTime>();
461  }
462 
464  double getFPS() const;
465 
468 
471  virtual void drawPedestrianNetwork(const GUIVisualizationSettings& /*s*/) const { };
472 
475  virtual void changePedestrianNetworkColor(const GUIVisualizationSettings& /*s*/) const { };
476 
477 protected:
479  FOX_CONSTRUCTOR(GUISUMOAbstractView)
480 
481 
482  void paintGL();
483 
485  virtual void updatePositionInformationLabel() const;
486 
488  virtual int doPaintGL(int /*mode*/, const Boundary& /*boundary*/);
489 
491  virtual void doInit();
492 
494  void paintGLGrid() const;
495 
497  void displayLegend();
498 
500  void displayLegends();
501 
503  void displayColorLegend(const GUIColorScheme& scheme, bool leftSide);
504 
506  void drawFPS();
507 
509  virtual GUILane* getLaneUnderCursor();
510 
512  virtual GUIGlID getToolTipID();
513 
516 
518  std::vector<GUIGlID> getObjectsUnderCursor();
519 
521  std::vector<GUIGlObject*> getGUIGlObjectsUnderCursor();
522 
524  std::vector<GUIGlObject*> getGUIGlObjectsUnderSnappedCursor();
525 
528 
530  std::vector<GUIGlID> getObjectsAtPosition(Position pos, double radius);
531 
533  std::vector<GUIGlObject*> getGUIGlObjectsAtPosition(Position pos, double radius);
534 
536  std::vector<GUIGlID> getObjectsInBoundary(Boundary bound);
537 
539  std::vector<GUIGlObject*> filterInternalLanes(const std::vector<GUIGlObject*>& objects) const;
540 
542  bool showToolTipFor(const GUIGlID idToolTip);
543 
545  void drawDecals();
546 
548  void openPopupDialog();
549 
553  Boundary applyGLTransform(bool fixRatio = true);
554 
556  FXImage* checkGDALImage(Decal& d);
557 
560 
563 
566 
569 
571  bool myPanning = false;
572 
574  bool myInEditMode = false;
575 
578 
581 
584 
587 
589  std::vector<GUIGlObject*> myCurrentObjectsDialog;
590 
593 
595  bool myAmInitialised = false;
596 
599 
602 
605 
608 
610  std::vector<Decal> myDecals;
611 
614 
616 
618  std::map<SUMOTime, std::vector<std::tuple<std::string, int, int> > > mySnapshots;
619 
622 
624  FXCondition mySnapshotCondition;
625 
627  mutable FXMutex myPolyDrawLock;
628 
630  std::map<GUIGlObject*, int> myAdditionallyDrawn;
631 
633  long myFrameDrawTime = 0;
634 
635 private:
637  struct LayerObject : public std::pair<double, std::pair<GUIGlObjectType, std::string> > {
638 
639  public:
641  LayerObject(double layer, GUIGlObject* object);
642 
644  LayerObject(GUIGlObject* object);
645 
647  GUIGlObject* getGLObject() const;
648 
649  private:
652  };
653 
654  // @brief sensitivity for "<>AtPosition(...) functions
655  static const double SENSITIVITY;
656 };
long long int SUMOTime
Definition: GUI.h:35
unsigned int GUIGlID
Definition: GUIGlObject.h:43
GUIGlObjectType
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:30
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
A dialog to change the viewport.
The dialog to change the view (gui) settings.
The popup menu of a globject.
virtual double getClickPriority() const
Returns the priority of receiving mouse clicks.
Definition: GUIGlObject.h:161
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.h:104
Representation of a lane in the micro simulation (gui-version)
Definition: GUILane.h:60
MFXComboBoxIcon * getColoringSchemesCombo()
get coloring schemes combo
virtual std::vector< std::string > getMeanDataAttrs(const std::string &meanDataID) const
return list of available attributes for the given meanData id
bool myAmInitialised
Internal information whether doInit() was called.
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.
std::vector< GUIGlObject * > myCurrentObjectsDialog
vector with current objects dialog
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.
void updateToolTip()
A method that updates the tooltip.
virtual std::vector< std::string > getPOIParamKeys() const
return list of available vehicle parameters
void addDecals(const std::vector< Decal > &decals)
add decals
virtual void checkSnapshots()
Checks whether it is time for a snapshot.
void showViewschemeEditor()
show viewsscheme editor
GUISUMOAbstractView(FXComposite *p, GUIMainWindow &app, GUIGlChildWindow *parent, const SUMORTree &grid, FXGLVisual *glVis, FXGLCanvas *share)
constructor
static const double SENSITIVITY
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
void displayLegend()
Draws a line with ticks, and the length information.
virtual long onVisualizationChange(FXObject *, FXSelector, void *)
hook to react on change in visualization settings
std::vector< GUIGlObject * > getGUIGlObjectsUnderCursor()
returns the GUIGlObject under the cursor using GL_SELECT (including overlapped objects)
long myFrameDrawTime
counter for measuring rendering time
void replacePopup(GUIGLObjectPopupMenu *popUp)
replace PopUp
std::vector< GUIGlID > getObjectsAtPosition(Position pos, double radius)
returns the ids of the object at position within the given (rectangular) radius using GL_SELECT
virtual void endSnapshot()
Ends a video snapshot.
const SUMORTree * myGrid
The visualization speed-up.
void openObjectDialog(const std::vector< GUIGlObject * > &objects, const bool filter=true)
open object dialog for the given object
virtual void saveFrame(const std::string &destFile, FXColor *buf)
Adds a frame to a video snapshot which will be initialized if necessary.
virtual void recenterView()
recenters the view
virtual SUMOTime getCurrentTimeStep() const
get the current simulation time
void paintGLGrid() const
paints a grid
virtual std::vector< std::string > getMeanDataIDs() const
return list of loaded edgeData ids (being computed in the current simulation)
FXbool makeCurrent()
A reimplementation due to some internal reasons.
Position myClickedPopupPosition
clicked poup position
int myMouseHotspotX
Offset to the mouse-hotspot from the mouse position.
GUIMainWindow * getMainWindow() const
get main window
bool isInEditMode()
returns true, if the edit button was pressed
virtual long onMiddleBtnRelease(FXObject *, FXSelector, void *)
virtual long onMouseMove(FXObject *, FXSelector, void *)
bool myPanning
Panning flag.
bool isAdditionalGLVisualisationEnabled(GUIGlObject *const which) const
Check if an object is added in the additional GL visualitation.
FXMutex myDecalsLockMutex
The mutex to use before accessing the decals list in order to avoid thread conflicts.
FXCondition mySnapshotCondition
the semaphore when waiting for snapshots to finish
virtual GUIGlID getToolTipID()
returns the id of object under cursor to show their tooltip
Position myPopupPosition
The current popup-menu position.
virtual void doInit()
doInit
std::vector< GUIGlObject * > filterContextObjects(const std::vector< GUIGlObject * > &objects)
filter out duplicate and forbidden objects
virtual long onCmdCloseEdge(FXObject *, FXSelector, void *)
virtual int doPaintGL(int, const Boundary &)
paint GL
virtual void buildViewToolBars(GUIGlChildWindow *)
builds the view toolbars
virtual void showViewportEditor()
show viewport editor
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
void setDelay(double delay)
Sets the delay of the parent application.
Boundary getVisibleBoundary() const
get visible boundary
FXMutex myPolyDrawLock
poly draw lock
virtual std::vector< std::string > getRelDataAttrs() const
return list of loaded edgeRelation and tazRelation attributes
Position screenPos2NetPos(int x, int y) const
Translate screen position to network position.
void addSnapshot(SUMOTime time, const std::string &file, const int w=-1, const int h=-1)
Sets the snapshot time to file map.
GUIGlID getObjectUnderCursor()
returns the id of the front object under the cursor using GL_SELECT
GUIPerspectiveChanger & getChanger() const
get changer
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
GUIMainWindow * myApp
The application.
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
virtual void zoom2Pos(Position &camera, Position &lookAt, double zoom)
zoom interface for 3D view
virtual const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
std::vector< GUIGlID > getObjectsInBoundary(Boundary bound)
returns the ids of all objects in the given boundary
virtual long onCmdCloseLane(FXObject *, FXSelector, void *)
interaction with the simulation
void drawFPS()
Draws frames-per-second indicator.
virtual long onMouseWheel(FXObject *, FXSelector, void *)
double getGridWidth() const
get grid width
std::vector< Decal > & getDecals()
The list of decals to show.
bool removeAdditionalGLVisualisation(GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
GUIGlChildWindow * myGlChildWindowParent
The parent window.
GUIGlChildWindow * getGUIGlChildWindow()
get GUIGlChildWindow
double getDelay() const
Returns the delay of the parent application.
virtual void updatePositionInformationLabel() const
update position information labels
std::vector< GUIGlObject * > getGUIGlObjectsAtPosition(Position pos, double radius)
returns the GUIGlObjects at position within the given (rectangular) radius using GL_SELECT
virtual long onLeftBtnPress(FXObject *, FXSelector, void *)
virtual void setViewportFromToRot(const Position &lookFrom, const Position &lookAt, double rotation)
applies the given viewport settings
double p2m(double pixel) const
pixels-to-meters conversion method
std::vector< Decal > myDecals
The list of decals to show.
const Position & getPopupPosition() const
get position of current popup
double m2p(double meter) const
meter-to-pixels conversion method
virtual GUILane * getLaneUnderCursor()
returns the GUILane at cursor position (implementation depends on view)
virtual void openObjectDialogAtCursor(const FXEvent *ev)
open object dialog at the cursor position
virtual void onGamingClick(Position)
on gaming click
bool myInEditMode
Information whether too-tip informations shall be generated.
GUIVisualizationSettings * editVisualisationSettings() const
edit visualization settings (allow modify VisualizationSetings, use carefully)
GUIVisualizationSettings * myVisualizationSettings
visualization settings
void destroyPopup()
destroys the popup
virtual std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
virtual void buildColorRainbow(const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, bool hide=false, double hideThreshold=0, bool hide2=false, double hideThreshold2=0)
recalibrate color scheme according to the current value range
Position getWindowCursorPosition() const
return windows cursor position
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
GUIDialog_EditViewport * myGUIDialogEditViewport
viewport chooser
virtual long onMiddleBtnPress(FXObject *, FXSelector, void *)
void paintGL()
FOX needs this.
virtual void drawPedestrianNetwork(const GUIVisualizationSettings &) const
Draw (or not) the JuPedSim pedestrian network.
virtual void stopTrack()
stop track
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
GUIGlID getObjectAtPosition(Position pos)
returns the id of the object at position using GL_SELECT
std::vector< GUIGlObject * > getGUIGlObjectsUnderSnappedCursor()
returns the GUIGlObject under the gripped cursor using GL_SELECT (including overlapped objects)
bool showToolTipFor(const GUIGlID idToolTip)
invokes the tooltip for the given object
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
GUIDialog_ViewSettings * myGUIDialogViewSettings
Visualization changer.
virtual std::vector< std::string > getVehicleParamKeys(bool) const
return list of available vehicle parameters
virtual void onGamingRightClick(Position)
virtual void recalculateBoundaries()
recalculate boundaries
void setWindowCursorPosition(FXint x, FXint y)
Returns the gl-id of the object under the given coordinates.
double getFPS() const
retrieve FPS
virtual long onCmdShowReachability(FXObject *, FXSelector, void *)
highlight edges according to reachability
std::map< GUIGlObject *, int > myAdditionallyDrawn
List of objects for which GUIGlObject::drawGLAdditional is called.
void drawDecals()
Draws the stored decals.
std::vector< GUIGlID > getObjectsUnderCursor()
returns the id of the objects under the cursor using GL_SELECT (including overlapped objects)
virtual std::vector< std::string > getEdgeLaneParamKeys(bool) const
return list of available edge parameters
Boundary applyGLTransform(bool fixRatio=true)
applies gl-transformations to fit the Boundary given by myChanger onto the canvas....
virtual void updateViewportValues()
update the viewport chooser with the current view values
FXImage * checkGDALImage(Decal &d)
check whether we can read image data or position with gdal
double getGridHeight() const
get grid height
virtual void startTrack(int)
star track
virtual long onDoubleClicked(FXObject *, FXSelector, void *)
FXMutex & getDecalsLockMutex()
The mutex to use before accessing the decals list in order to avoid thread conflicts.
virtual bool is3DView() const
return whether this is a 3D view
void displayLegends()
Draws the configured legends.
void displayColorLegend(const GUIColorScheme &scheme, bool leftSide)
Draws a legend for the given scheme.
FXMutex mySnapshotsMutex
The mutex to use before accessing the decals list in order to avoid thread conflicts.
virtual long onMouseLeft(FXObject *, FXSelector, void *)
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
FXint myWindowCursorPositionX
Position of the cursor relative to the window.
GUIPerspectiveChanger * myChanger
The perspective changer.
GUIGLObjectPopupMenu * myPopup
The current popup-menu.
virtual void copyViewportTo(GUISUMOAbstractView *view)
copy the viewport to the given view
virtual void changePedestrianNetworkColor(const GUIVisualizationSettings &) const
Change the color of the JuPedSim pedestrian network.
void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
void waitForSnapshots(const SUMOTime snapshotTime)
bool addAdditionalGLVisualisation(GUIGlObject *const which)
Adds an object to call its additional visualisation method.
virtual bool setColorScheme(const std::string &)
set color scheme
virtual long onCmdAddRerouter(FXObject *, FXSelector, void *)
std::vector< GUIGlObject * > filterInternalLanes(const std::vector< GUIGlObject * > &objects) const
filter internal lanes in Objects under cursor
virtual long onPaint(FXObject *, FXSelector, void *)
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
virtual ~GUISUMOAbstractView()
destructor
virtual long onConfigure(FXObject *, FXSelector, void *)
mouse functions
std::map< SUMOTime, std::vector< std::tuple< std::string, int, int > > > mySnapshots
Snapshots.
void remove(GUIDialog_EditViewport *)
remove viewport
virtual GUIGlID getTrackedID() const
get tracked id
void openPopupDialog()
open popup dialog
A MSVehicle extended by some values for usage within the gui.
Definition: GUIVehicle.h:51
Stores the information about how to visualize structures.
ComboBox with icon.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
static const Position INVALID
used to indicate that a position is valid
Definition: Position.h:317
A RT-tree for efficient storing of SUMO's GL-objects.
Definition: SUMORTree.h:66
comparator for resolving clicks
bool operator()(const GUIGlObject *const a, const GUIGlObject *const b) const
A decal (an image) that can be shown.
double tilt
The tilt of the image to the ground plane (in degrees)
double centerX
The center of the image in x-direction (net coordinates, in m)
double height
The height of the image (net coordinates in y-direction, in m)
bool skip2D
Whether this image should be skipped in 2D-views.
double width
The width of the image (net coordinates in x-direction, in m)
bool initialised
Whether this image was initialised (inserted as a texture)
FXImage * image
The image pointer for later cleanup.
double rot
The rotation of the image in the ground plane (in degrees)
double layer
The layer of the image.
double altitude
The altitude of the image (net coordinates in z-direction, in m)
double centerY
The center of the image in y-direction (net coordinates, in m)
double centerZ
The center of the image in z-direction (net coordinates, in m)
std::string filename
The path to the file the image is located at.
int glID
whether the decal shall be drawn in screen coordinates, rather than network coordinates
double roll
The roll of the image to the ground plane (in degrees)
bool screenRelative
Whether this image should be skipped in 2D-views.
struct used for sorting objects by layer
GUIGlObject * getGLObject() const
get GLObject
LayerObject(double layer, GUIGlObject *object)
constructor for shapes