Eclipse SUMO - Simulation of Urban MObility
GUIGlObject.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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// Base class for all objects that may be displayed within the openGL-gui
22/****************************************************************************/
23#include <config.h>
24
25#include <string>
26#include <stack>
42
43#include "GUIGlObject.h"
44#include "GUIGlObjectStorage.h"
45
46// ===========================================================================
47// static members
48// ===========================================================================
49
51 {"network", GLO_NETWORK},
52 //
53 {"networkElement", GLO_NETWORKELEMENT},
54 {"edge", GLO_EDGE},
55 {"lane", GLO_LANE},
56 {"junction", GLO_JUNCTION},
57 {"connection", GLO_CONNECTION},
58 {"crossing", GLO_CROSSING},
59 {"walkingArea", GLO_WALKINGAREA},
60 {"tlLogic", GLO_TLLOGIC},
61 {"type", GLO_TYPE},
62 //
63 {"parentChildLine", GLO_PARENTCHILDLINE},
64 //
65 {"additional", GLO_ADDITIONALELEMENT},
66 {"busStop", GLO_BUS_STOP},
67 {"access", GLO_ACCESS},
68 {"taz", GLO_TAZ},
69 {"containerStop", GLO_CONTAINER_STOP},
70 {"chargingStation", GLO_CHARGING_STATION},
71 {"overheadWireSegment", GLO_OVERHEAD_WIRE_SEGMENT},
72 {"parkingArea", GLO_PARKING_AREA},
73 {"parkingSpace", GLO_PARKING_SPACE},
74 {"e1Detector", GLO_E1DETECTOR},
75 {"e1DetectorME", GLO_E1DETECTOR_ME},
76 {"e1DetectorInstant", GLO_E1DETECTOR_INSTANT},
77 {"e2Detector", GLO_E2DETECTOR},
78 {"e3Detector", GLO_E3DETECTOR},
79 {"entryDetector", GLO_DET_ENTRY},
80 {"exitDetector", GLO_DET_EXIT},
81 {"rerouter", GLO_REROUTER},
82 {"rerouterInterval", GLO_REROUTER_INTERVAL},
83 {"closingreroute", GLO_REROUTER_CLOSINGREROUTE},
84 {"closingLaneReroute", GLO_REROUTER_CLOSINGLANEREROUTE},
85 {"parkingAreaReroute", GLO_REROUTER_PARKINGAREAREROUTE},
86 {"destProbReroute", GLO_REROUTER_DESTPROBREROUTE},
87 {"routeProbReroute", GLO_REROUTER_ROUTEPROBREROUTE},
88 {"rerouterEdge", GLO_REROUTER_EDGE},
89 {"variableSpeedSign", GLO_VSS},
90 {"variableSpeedSignStep", GLO_VSS_STEP},
91 {"calibrator", GLO_CALIBRATOR},
92 {"routeProbe", GLO_ROUTEPROBE},
93 {"vaporizer", GLO_VAPORIZER},
94 {"wire", GLO_WIRE},
95 {"tractionsubstation", GLO_TRACTIONSUBSTATION},
96 //
97 {"laneArrows", GLO_LANEARROWS},
98 //
99 {"shape", GLO_SHAPE},
100 {"polygon", GLO_POLYGON},
101 {"poi", GLO_POI},
102 //
103 {"routeElement", GLO_ROUTEELEMENT},
104 {"vType", GLO_VTYPE},
105 //
106 {"route", GLO_ROUTE},
107 //
108 {"ride", GLO_RIDE},
109 {"walk", GLO_WALK},
110 {"personTrip", GLO_PERSONTRIP},
111 {"transport", GLO_TRANSPORT},
112 {"tranship", GLO_TRANSHIP},
113 //
114 {"stop", GLO_STOP},
115 {"stopPerson", GLO_STOP_PERSON},
116 {"stopContainer", GLO_STOP_CONTAINER},
117 //
118 {"vehicle", GLO_VEHICLE},
119 {"trip", GLO_TRIP},
120 {"flow", GLO_FLOW},
121 {"routeFlow", GLO_ROUTEFLOW},
122 //
123 {"container", GLO_CONTAINER},
124 {"containerFlow", GLO_CONTAINERFLOW},
125 //
126 {"person", GLO_PERSON},
127 {"personFlow", GLO_PERSONFLOW},
128 //
129 {"edgeData", GLO_EDGEDATA},
130 {"edgeRelData", GLO_EDGERELDATA},
131 {"TAZRelData", GLO_TAZRELDATA},
132 //
133 {"lockIcon", GLO_LOCKICON},
134 {"textName", GLO_TEXTNAME},
135 {"frontElement", GLO_DOTTEDCONTOUR_FRONT},
136 {"dottedContour", GLO_DOTTEDCONTOUR_INSPECTED},
137 {"temporalShape", GLO_TEMPORALSHAPE},
138 {"rectangleSelection", GLO_RECTANGLESELECTION},
139 {"testElement", GLO_TESTELEMENT},
140 //
141 {"undefined", GLO_MAX}
142};
143
144
145StringBijection<GUIGlObjectType> GUIGlObject::TypeNames(GUIGlObjectTypeNamesInitializer, GLO_MAX);
147
148// ===========================================================================
149// method definitionsas
150// ===========================================================================
151
152GUIGlObject::GUIGlObject(GUIGlObjectType type, const std::string& microsimID, FXIcon* icon) :
153#ifdef _MSC_VER
154#pragma warning(push)
155 /* Disable warning about using "this" in the constructor */
156#pragma warning(disable: 4355)
157#endif
158 myGlID(GUIGlObjectStorage::gIDStorage.registerObject(this)),
159#ifdef _MSC_VER
160#pragma warning(pop)
161#endif
162 myGLObjectType(type),
163 myMicrosimID(microsimID),
164 myIcon(icon),
165 myAmBlocked(false) {
166 // make sure that reserved GLO_ADDITIONALELEMENT isn't used
170}
171
172
174 // remove all paramWindow related with this object
175 for (const auto& paramWindow : myParamWindows) {
176 paramWindow->removeObject(this);
177 }
178 // remove object from GLObjectValuePassConnector and GUIGlObjectStorage
181}
182
183
184std::string
187}
188
189
190FXIcon*
192 return myIcon;
193}
194
195
198 UNUSED_PARAMETER(&app);
199 UNUSED_PARAMETER(&parent);
200 return nullptr;
201}
202
203
204bool
206 // by default unlocked
207 return false;
208}
209
210
211void
213 // by default nothing to do
214}
215
216
217void
219 // by default nothing to do
220}
221
222
223void
225 // by default nothing to do
226}
227
228
229void
231 // by default nothing to update
232}
233
234
235const std::string
237 return "";
238}
239
240
241void
242GUIGlObject::setMicrosimID(const std::string& newID) {
243 myMicrosimID = newID;
246}
247
248
249void
252 UNUSED_PARAMETER(parent);
253}
254
255#ifdef HAVE_OSG
256
257osg::Node*
258GUIGlObject::getNode() const {
259 return myOSGNode;
260}
261
262
263void
264GUIGlObject::setNode(osg::Node* node) {
265 myOSGNode = node;
266}
267
268#endif
269
270void
272 new MFXMenuHeader(ret, app.getBoldFont(), getFullName().c_str(), myIcon, nullptr, 0);
273 if (addSeparator) {
274 new FXMenuSeparator(ret);
275 }
276}
277
278
279void
282 if (addSeparator) {
283 new FXMenuSeparator(ret);
284 }
285}
286
287
288void
290 GUIDesigns::buildFXMenuCommand(ret, "Copy name to clipboard", nullptr, ret, MID_COPY_NAME);
291 GUIDesigns::buildFXMenuCommand(ret, "Copy typed name to clipboard", nullptr, ret, MID_COPY_TYPED_NAME);
292 if (addSeparator) {
293 new FXMenuSeparator(ret);
294 }
295}
296
297
298void
302 } else {
304 }
305 if (addSeparator) {
306 new FXMenuSeparator(ret);
307 }
308}
309
310
311void
314 if (addSeparator) {
315 new FXMenuSeparator(ret);
316 }
317}
318
319
320void
323 if (addSeparator) {
324 new FXMenuSeparator(ret);
325 }
326}
327
328
329void
331 GUIDesigns::buildFXMenuCommand(ret, "Copy cursor position to clipboard", nullptr, ret, MID_COPY_CURSOR_POSITION);
332 if (GeoConvHelper::getFinal().usingGeoProjection()) {
333 GUIDesigns::buildFXMenuCommand(ret, "Copy cursor geo-position to clipboard", nullptr, ret, MID_COPY_CURSOR_GEOPOSITION);
334 // create menu pane for edge operations
335 FXMenuPane* showCursorGeoPositionPane = new FXMenuPane(ret);
336 ret->insertMenuPaneChild(showCursorGeoPositionPane);
337 new FXMenuCascade(ret, "Show cursor geo-position in ", nullptr, showCursorGeoPositionPane);
338 for (const auto& mapper : app.getOnlineMaps()) {
339 if (mapper.first == "GeoHack") {
341 } else if (mapper.first == "GoogleSat") {
343 } else if (mapper.first == "OSM") {
345 } else {
346 GUIDesigns::buildFXMenuCommand(showCursorGeoPositionPane, mapper.first, nullptr, ret, MID_SHOW_GEOPOSITION_ONLINE);
347 }
348 }
349 }
350}
351
352
353void
356 if (addSeparator) {
357 new FXMenuSeparator(ret);
358 }
359}
360
361
362void
364 myParamWindows.insert(t);
365}
366
367
368void
370 std::set<GUIParameterTableWindow*>::iterator i = myParamWindows.find(t);
371 if (i != myParamWindows.end()) {
372 myParamWindows.erase(i);
373 }
374}
375
376
377void
379 assert(ret);
380 // build header (<tag>:<ID>
381 buildPopupHeader(ret, app, false);
382 // build center
384 // build copy name
386 // build select/unselect
388 // build show parameters
389 buildShowParamsPopupEntry(ret, false);
390 // build copy cursor position to clipboard
391 buildPositionCopyEntry(ret, app);
392 // only show type if isn't empty
393 if (type != "") {
394 GUIDesigns::buildFXMenuCommand(ret, ("type: " + type + "").c_str(), nullptr, nullptr, 0);
395 new FXMenuSeparator(ret);
396 }
397}
398
399
400void
402 assert(ret);
403 // build header (<tag>:<ID>
404 buildPopupHeader(ret, app, false);
405 // build center
407 // build copy name
409 // build select/unselect
411 // build show parameters
412 buildShowParamsPopupEntry(ret, false);
413 // build copy cursor position to clipboard
414 buildPositionCopyEntry(ret, app);
415 // only show type if isn't empty
416 if (type != "") {
417 GUIDesigns::buildFXMenuCommand(ret, ("type: " + type + "").c_str(), nullptr, nullptr, 0);
418 new FXMenuSeparator(ret);
419 }
420}
421
422
423void
424GUIGlObject::mouseWithinGeometry(const Position center, const double radius) const {
425 if (gPostDrawing.mousePos.distanceSquaredTo2D(center) <= (radius * radius)) {
427 }
428}
429
430
431void
433 if (shape.around(gPostDrawing.mousePos)) {
435 }
436}
437
438
439void
440GUIGlObject::mouseWithinGeometry(const PositionVector shape, const double width) const {
441 if (shape.distance2D(gPostDrawing.mousePos) <= width) {
443 }
444}
445
446
447void
448GUIGlObject::mouseWithinGeometry(const PositionVector shape, const double width, GUIGlObject* parent) const {
449 if (shape.distance2D(gPostDrawing.mousePos) <= width) {
451 }
452}
453
454
455void
456GUIGlObject::mouseWithinGeometry(const Position& pos, const double width, const double height,
457 const double offsetX, const double offsetY, const double rot) const {
458 // create shape
459 PositionVector shape;
460 // make rectangle
461 shape.push_back(Position(0 + width, 0 + height));
462 shape.push_back(Position(0 + width, 0 - height));
463 shape.push_back(Position(0 - width, 0 - height));
464 shape.push_back(Position(0 - width, 0 + height));
465 // move shape
466 shape.add(offsetX, offsetY, 0);
467 // rotate shape
468 shape.rotate2D(DEG2RAD((rot * -1) + 90));
469 // move to position
470 shape.add(pos);
471 // check if mouse is within new geometry
472 if (shape.around(gPostDrawing.mousePos)) {
474 }
475}
476
477
478std::string
481}
482
483
484void
485GUIGlObject::drawName(const Position& pos, const double scale, const GUIVisualizationTextSettings& settings, const double angle, bool forceShow) const {
486 if (settings.show(this) || forceShow) {
487 GLHelper::drawTextSettings(settings, getMicrosimID(), pos, scale, angle);
488 }
489}
490
491
492/****************************************************************************/
@ MID_MANIP
Open the object's manipulator.
Definition: GUIAppEnum.h:480
@ MID_ADDSELECT
Add to selected items - menu entry.
Definition: GUIAppEnum.h:476
@ MID_COPY_CURSOR_GEOPOSITION
Copy cursor geo-coordinate position - popup entry.
Definition: GUIAppEnum.h:456
@ MID_CENTER
Center view to object - popup entry.
Definition: GUIAppEnum.h:446
@ MID_SHOW_GEOPOSITION_ONLINE
Show the cursor geo-coordinate position online in GeoHack - popup entry.
Definition: GUIAppEnum.h:458
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
Definition: GUIAppEnum.h:450
@ MID_COPY_CURSOR_POSITION
Copy cursor position - popup entry.
Definition: GUIAppEnum.h:454
@ MID_SHOWPARS
Show object parameter - popup entry.
Definition: GUIAppEnum.h:462
@ MID_COPY_NAME
Copy object name - popup entry.
Definition: GUIAppEnum.h:448
@ MID_SHOWTYPEPARS
Show object type parameter - popup entry.
Definition: GUIAppEnum.h:464
@ MID_REMOVESELECT
Remove from selected items - Menu Entry.
Definition: GUIAppEnum.h:478
unsigned int GUIGlID
Definition: GUIGlObject.h:43
GUIGlObjectType
@ GLO_EDGERELDATA
edge relation data
@ GLO_DET_EXIT
a DetExit detector
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_WALKINGAREA
a walkingArea
@ GLO_TEMPORALSHAPE
temporal shape (used in NETEDIT)
@ GLO_STOP_CONTAINER
a container stop
@ GLO_VTYPE
@bief vTypes
@ GLO_ROUTEELEMENT
reserved GLO type to pack all RouteElements (note: In this case the sorting of GLO_<element> is impor...
@ GLO_REROUTER_EDGE
a Rerouter over edge
@ GLO_TRIP
a trip
@ GLO_BUS_STOP
a busStop
@ GLO_REROUTER_DESTPROBREROUTE
a destiny probability reroute
@ GLO_TESTELEMENT
test element (used in NETEDIT)
@ GLO_DOTTEDCONTOUR_INSPECTED
dotted contour inspected element (used in NETEDIT)
@ GLO_E2DETECTOR
a E2 detector
@ GLO_DET_ENTRY
a DetEntry detector
@ GLO_TRANSHIP
a container tranship
@ GLO_ROUTEPROBE
a RouteProbe
@ GLO_E1DETECTOR
a E1 detector
@ GLO_ACCESS
a Acces
@ GLO_DOTTEDCONTOUR_FRONT
dotted contour front element (used in NETEDIT)
@ GLO_VAPORIZER
a Vaporizer
@ GLO_ROUTEFLOW
a routeFlow
@ GLO_WALK
a walk
@ GLO_CONTAINER_STOP
a containerStop
@ GLO_MAX
empty max
@ GLO_ROUTE
a route
@ GLO_WIRE
reserved GLO type for packing all wire elements
@ GLO_CALIBRATOR
a Calibrator
@ GLO_JUNCTION
a junction
@ GLO_E3DETECTOR
a E3 detector
@ GLO_LANE
a lane
@ GLO_RIDE
a ride
@ GLO_FLOW
a flow
@ GLO_TYPE
an edge_type
@ GLO_CHARGING_STATION
a chargingStation
@ GLO_PARKING_AREA
a ParkingArea
@ GLO_VSS_STEP
a Variable Speed Sign step
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
@ GLO_LANEARROWS
lane details
@ GLO_CONTAINER
a container
@ GLO_PARENTCHILDLINE
line between parent and childrens
@ GLO_EDGEDATA
edge data
@ GLO_CONNECTION
a connection
@ GLO_REROUTER_PARKINGAREAREROUTE
a parking area reroute
@ GLO_ADDITIONALELEMENT
reserved GLO type for packing all additionals elements
@ GLO_PERSONTRIP
a person trip
@ GLO_EDGE
an edge
@ GLO_VEHICLE
a vehicle
@ GLO_PERSON
a person
@ GLO_TRANSPORT
a container transport
@ GLO_STOP_PERSON
a person stop
@ GLO_NETWORK
The network - empty.
@ GLO_SHAPE
reserved GLO type to pack shapes
@ GLO_POI
a poi
@ GLO_REROUTER_CLOSINGLANEREROUTE
a closing lane reroute
@ GLO_RECTANGLESELECTION
rectangle selection shape (used in NETEDIT)
@ GLO_STOP
a stop
@ GLO_OVERHEAD_WIRE_SEGMENT
a segment of an overhead line
@ GLO_TEXTNAME
text element (used in NETEDIT)
@ GLO_NETWORKELEMENT
reserved GLO type to pack all network elements
@ GLO_REROUTER_CLOSINGREROUTE
a closing reroute
@ GLO_PARKING_SPACE
a ParkingSpace
@ GLO_CONTAINERFLOW
a person flow
@ GLO_POLYGON
a polygon
@ GLO_TLLOGIC
a tl-logic
@ GLO_E1DETECTOR_ME
a E1 detector
@ GLO_CROSSING
a tl-logic
@ GLO_REROUTER
a Rerouter
@ GLO_PERSONFLOW
a person flow
@ GLO_E1DETECTOR_INSTANT
a E1 detector
@ GLO_REROUTER_INTERVAL
a rerouter interval
@ GLO_REROUTER_ROUTEPROBREROUTE
a route probability reroute
@ GLO_TRACTIONSUBSTATION
a segment of an overhead line
@ GLO_VSS
a Variable Speed Sign
@ GLO_LOCKICON
Lock icon (used in NETEDIT)
GUIPostDrawing gPostDrawing
GUISelectedStorage gSelected
A global holder of selected objects.
@ RECENTERVIEW
@ GEOHACK
icons for geo tools
#define DEG2RAD(x)
Definition: GeomHelper.h:35
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:30
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048, const int align=0)
Definition: GLHelper.cpp:716
static void removeObject(GUIGlObject &o)
Removes all instances that pass values from the object with the given id.
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
Definition: GUIDesigns.cpp:42
The popup menu of a globject.
void insertMenuPaneChild(FXMenuPane *child)
Insert a sub-menu pane in this GUIGLObjectPopupMenu.
FXIcon * getGLIcon() const
get icon associated with this GL Object
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Definition: GUIGlObject.h:141
std::string myMicrosimID
ID of GL object.
Definition: GUIGlObject.h:320
virtual void markAsFrontElement()
mark element as front element (Currently used only in NETEDIT)
std::string myFullName
full name of GL Object
Definition: GUIGlObject.h:323
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
void buildShowManipulatorPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the manipulator window.
virtual void deleteGLObject()
delete GLObject (Currently used only in NETEDIT)
const GUIGlObjectType myGLObjectType
The type of the object.
Definition: GUIGlObject.h:317
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window (optional)
virtual const std::string getOptionalName() const
Returns the name of the object (default "")
static const GUIGlID INVALID_ID
Definition: GUIGlObject.h:71
void buildShapePopupOptions(GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
build basic shape popup options. Used to unify pop-ups menu in netedit and SUMO-GUI
static StringBijection< GUIGlObjectType >::Entry GUIGlObjectTypeNamesInitializer[]
vector for TypeNames Initializer
Definition: GUIGlObject.h:343
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
const std::string & getFullName() const
Definition: GUIGlObject.h:92
virtual std::string getParentName() const
Returns the name of the parent object (if any)
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
virtual void updateGLObject()
update GLObject (geometry, ID, etc.) (optional)
void mouseWithinGeometry(const Position center, const double radius) const
check if mouse is within elements geometry (for circles)
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
void addParameterTable(GUIParameterTableWindow *w)
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
static StringBijection< GUIGlObjectType > TypeNames
associates object types with strings
Definition: GUIGlObject.h:70
void buildAdditionalsPopupOptions(GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
build basic additional popup options. Used to unify pop-ups menu in netedit and SUMO-GUI
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.h:154
virtual ~GUIGlObject()
Destructor.
void removeParameterTable(GUIParameterTableWindow *w)
Lets this object know a parameter window showing the object's values was closed.
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additional, user-triggered visualisations.
virtual bool isGLObjectLocked()
check if element is locked (Currently used only in NETEDIT)
virtual void selectGLObject()
select GLObject (Currently used only in NETEDIT)
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
FXIcon * myIcon
icon associatd with this GL Object
Definition: GUIGlObject.h:326
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.h:102
std::string createFullName() const
create full name
std::set< GUIParameterTableWindow * > myParamWindows
Parameter table windows which refer to this object.
Definition: GUIGlObject.h:332
GUIGlObject(GUIGlObjectType type, const std::string &microsimID, FXIcon *icon)
Constructor.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
A storage for of displayed objects via their numerical id.
void changeName(GUIGlObject *object, const std::string &fullName)
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
bool remove(GUIGlID id)
Removes the named object from this container.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXFont * getBoldFont()
get bold front
const std::map< std::string, std::string > & getOnlineMaps() const
A window containing a gl-object's parameter.
void addElementUnderCursor(const GUIGlObject *GLObject)
add element into list of elements under cursor
Position mousePos
mouse position before rendering elements
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
Stores the information about how to visualize structures.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions)
Definition: Position.h:257
A list of positions.
void rotate2D(double angle)
void add(double xoff, double yoff, double zoff)
double distance2D(const Position &p, bool perpendicular=false) const
closest 2D-distance to point p (or -1 if perpendicular is true and the point is beyond this vector)
bool around(const Position &p, double offset=0) const
Returns the information whether the position vector describes a polygon lying around the given point.
const std::string & getString(const T key) const
static std::string emptyString
An empty string.
Definition: StringUtils.h:87
bool show(const GUIGlObject *o) const
whether to show the text