Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIGlObject.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2023 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>
43
44#include "GUIGlObject.h"
45#include "GUIGlObjectStorage.h"
46
47// ===========================================================================
48// static members
49// ===========================================================================
50
52 {"network", GLO_NETWORK},
53 //
54 {"networkElement", GLO_NETWORKELEMENT},
55 {"edge", GLO_EDGE},
56 {"lane", GLO_LANE},
57 {"junction", GLO_JUNCTION},
58 {"connection", GLO_CONNECTION},
59 {"crossing", GLO_CROSSING},
60 {"walkingArea", GLO_WALKINGAREA},
61 {"tlLogic", GLO_TLLOGIC},
62 {"edgeType", GLO_EDGETYPE},
63 {"laneType", GLO_LANETYPE},
64 //
65 {"parentChildLine", GLO_PARENTCHILDLINE},
66 //
67 {"additional", GLO_ADDITIONALELEMENT},
68 {"busStop", GLO_BUS_STOP},
69 {"access", GLO_ACCESS},
70 {"taz", GLO_TAZ},
71 {"containerStop", GLO_CONTAINER_STOP},
72 {"chargingStation", GLO_CHARGING_STATION},
73 {"overheadWireSegment", GLO_OVERHEAD_WIRE_SEGMENT},
74 {"parkingArea", GLO_PARKING_AREA},
75 {"parkingSpace", GLO_PARKING_SPACE},
76 {"e1Detector", GLO_E1DETECTOR},
77 {"e1DetectorME", GLO_E1DETECTOR_ME},
78 {"e1DetectorInstant", GLO_E1DETECTOR_INSTANT},
79 {"e2Detector", GLO_E2DETECTOR},
80 {"e3Detector", GLO_E3DETECTOR},
81 {"entryDetector", GLO_DET_ENTRY},
82 {"exitDetector", GLO_DET_EXIT},
83 {"rerouter", GLO_REROUTER},
84 {"rerouterInterval", GLO_REROUTER_INTERVAL},
85 {"closingreroute", GLO_REROUTER_CLOSINGREROUTE},
86 {"closingLaneReroute", GLO_REROUTER_CLOSINGLANEREROUTE},
87 {"parkingAreaReroute", GLO_REROUTER_PARKINGAREAREROUTE},
88 {"destProbReroute", GLO_REROUTER_DESTPROBREROUTE},
89 {"routeProbReroute", GLO_REROUTER_ROUTEPROBREROUTE},
90 {"rerouterEdge", GLO_REROUTER_EDGE},
91 {"variableSpeedSign", GLO_VSS},
92 {"variableSpeedSignStep", GLO_VSS_STEP},
93 {"calibrator", GLO_CALIBRATOR},
94 {"routeProbe", GLO_ROUTEPROBE},
95 {"vaporizer", GLO_VAPORIZER},
96 {"wire", GLO_WIRE},
97 {"tractionsubstation", GLO_TRACTIONSUBSTATION},
98 //
99 {"laneArrows", GLO_LANEARROWS},
100 //
101 {"shape", GLO_SHAPE},
102 {"polygon", GLO_POLYGON},
103 {"poi", GLO_POI},
104 //
105 {"routeElement", GLO_ROUTEELEMENT},
106 {"vType", GLO_VTYPE},
107 //
108 {"route", GLO_ROUTE},
109 //
110 {"ride", GLO_RIDE},
111 {"walk", GLO_WALK},
112 {"personTrip", GLO_PERSONTRIP},
113 {"transport", GLO_TRANSPORT},
114 {"tranship", GLO_TRANSHIP},
115 //
116 {"stop", GLO_STOP},
117 {"stopPerson", GLO_STOP_PERSON},
118 {"stopContainer", GLO_STOP_CONTAINER},
119 //
120 {"vehicle", GLO_VEHICLE},
121 {"trip", GLO_TRIP},
122 {"flow", GLO_FLOW},
123 {"routeFlow", GLO_ROUTEFLOW},
124 //
125 {"container", GLO_CONTAINER},
126 {"containerFlow", GLO_CONTAINERFLOW},
127 //
128 {"person", GLO_PERSON},
129 {"personFlow", GLO_PERSONFLOW},
130 //
131 {"edgeData", GLO_EDGEDATA},
132 {"edgeRelData", GLO_EDGERELDATA},
133 {"TAZRelData", GLO_TAZRELDATA},
134 //
135 {"lockIcon", GLO_LOCKICON},
136 {"textName", GLO_TEXTNAME},
137 {"frontElement", GLO_FRONTELEMENT},
138 {"geometryPoint", GLO_GEOMETRYPOINT},
139 {"dottedContour", GLO_DOTTEDCONTOUR_INSPECTED},
140 {"temporalShape", GLO_TEMPORALSHAPE},
141 {"rectangleSelection", GLO_RECTANGLESELECTION},
142 {"testElement", GLO_TESTELEMENT},
143 //
144 {"undefined", GLO_MAX}
145};
146
147
148StringBijection<GUIGlObjectType> GUIGlObject::TypeNames(GUIGlObjectTypeNamesInitializer, GLO_MAX);
150
151// ===========================================================================
152// method definitionsas
153// ===========================================================================
154
155GUIGlObject::GUIGlObject(GUIGlObjectType type, const std::string& microsimID, FXIcon* icon) :
156 myGlID(GUIGlObjectStorage::gIDStorage.registerObject(this)),
157 myGLObjectType(type),
158 myMicrosimID(microsimID),
159 myIcon(icon),
160 myAmBlocked(false) {
161 // make sure that reserved GLO_ADDITIONALELEMENT isn't used
165}
166
167
169 // remove all paramWindow related with this object
170 for (const auto& paramWindow : myParamWindows) {
171 paramWindow->removeObject(this);
172 }
173 // remove object from GLObjectValuePassConnector and GUIGlObjectStorage
176}
177
178
179std::string
183
184
185FXIcon*
187 return myIcon;
188}
189
190
193 UNUSED_PARAMETER(&app);
194 UNUSED_PARAMETER(&parent);
195 return nullptr;
196}
197
198
199bool
201 // by default unlocked
202 return false;
203}
204
205
206void
208 // by default nothing to do
209}
210
211
212void
214 // by default nothing to do
215}
216
217
218void
220 // by default nothing to do
221}
222
223
224void
226 // by default nothing to update
227}
228
229
230const std::string
232 return "";
233}
234
235
236void
242
243
244void
249
250#ifdef HAVE_OSG
251
252osg::Node*
253GUIGlObject::getNode() const {
254 return myOSGNode;
255}
256
257
258void
259GUIGlObject::setNode(osg::Node* node) {
260 myOSGNode = node;
261}
262
263#endif
264
265void
267 new MFXMenuHeader(ret, app.getBoldFont(), getFullName().c_str(), myIcon, nullptr, 0);
268 if (addSeparator) {
269 new FXMenuSeparator(ret);
270 }
271}
272
273
274void
277 if (addSeparator) {
278 new FXMenuSeparator(ret);
279 }
280}
281
282
283void
285 GUIDesigns::buildFXMenuCommand(ret, TL("Copy name to clipboard"), nullptr, ret, MID_COPY_NAME);
286 GUIDesigns::buildFXMenuCommand(ret, TL("Copy typed name to clipboard"), nullptr, ret, MID_COPY_TYPED_NAME);
287 if (addSeparator) {
288 new FXMenuSeparator(ret);
289 }
290}
291
292
293void
297 } else {
299 }
300 if (addSeparator) {
301 new FXMenuSeparator(ret);
302 }
303}
304
305
306void
309 if (addSeparator) {
310 new FXMenuSeparator(ret);
311 }
312}
313
314
315void
318 if (addSeparator) {
319 new FXMenuSeparator(ret);
320 }
321}
322
323
324void
326 GUIDesigns::buildFXMenuCommand(ret, TL("Copy cursor position to clipboard"), nullptr, ret, MID_COPY_CURSOR_POSITION);
327 if (GeoConvHelper::getFinal().usingGeoProjection()) {
328 GUIDesigns::buildFXMenuCommand(ret, TL("Copy cursor geo-position to clipboard"), nullptr, ret, MID_COPY_CURSOR_GEOPOSITION);
329 // create menu pane for edge operations
330 FXMenuPane* showCursorGeoPositionPane = new FXMenuPane(ret);
331 ret->insertMenuPaneChild(showCursorGeoPositionPane);
332 new FXMenuCascade(ret, TL("Show cursor geo-position in "), nullptr, showCursorGeoPositionPane);
333 for (const auto& mapper : app.getOnlineMaps()) {
334 if (mapper.first == "GeoHack") {
336 } else if (mapper.first == "GoogleSat") {
338 } else if (mapper.first == "OSM") {
340 } else {
341 GUIDesigns::buildFXMenuCommand(showCursorGeoPositionPane, mapper.first, nullptr, ret, MID_SHOW_GEOPOSITION_ONLINE);
342 }
343 }
344 }
345}
346
347
348void
351 if (addSeparator) {
352 new FXMenuSeparator(ret);
353 }
354}
355
356
357void
361
362
363void
365 std::set<GUIParameterTableWindow*>::iterator i = myParamWindows.find(t);
366 if (i != myParamWindows.end()) {
367 myParamWindows.erase(i);
368 }
369}
370
371
372void
374 assert(ret);
375 // build header (<tag>:<ID>
376 buildPopupHeader(ret, app, false);
377 // build center
379 // build copy name
381 // build select/unselect
383 // build show parameters
384 buildShowParamsPopupEntry(ret, false);
385 // build copy cursor position to clipboard
386 buildPositionCopyEntry(ret, app);
387 // only show type if isn't empty
388 if (type != "") {
389 GUIDesigns::buildFXMenuCommand(ret, TLF("type: %", type).c_str(), nullptr, nullptr, 0);
390 new FXMenuSeparator(ret);
391 }
392}
393
394
395void
397 assert(ret);
398 // build header (<tag>:<ID>
399 buildPopupHeader(ret, app, false);
400 // build center
402 // build copy name
404 // build select/unselect
406 // build show parameters
407 buildShowParamsPopupEntry(ret, false);
408 // build copy cursor position to clipboard
409 buildPositionCopyEntry(ret, app);
410 // only show type if isn't empty
411 if (type != "") {
412 GUIDesigns::buildFXMenuCommand(ret, TLF("type: %", type).c_str(), nullptr, nullptr, 0);
413 new FXMenuSeparator(ret);
414 }
415}
416
417
418bool
419GUIGlObject::mouseWithinGeometry(const Position center, const double radius) const {
420 if (gPostDrawing.mousePos.distanceSquaredTo2D(center) <= (radius * radius)) {
422 return true;
423 } else {
424 return false;
425 }
426}
427
428
429bool
431 if (shape.around(gPostDrawing.mousePos)) {
433 return true;
434 } else {
435 return false;
436 }
437}
438
439
440bool
441GUIGlObject::mouseWithinGeometry(const PositionVector shape, const double width) const {
442 if (shape.distance2D(gPostDrawing.mousePos) <= width) {
444 return true;
445 } else {
446 return false;
447 }
448}
449
450
451bool
452GUIGlObject::mouseWithinGeometry(const PositionVector shape, const double width, GUIGlObject* parent) const {
453 if (shape.distance2D(gPostDrawing.mousePos) <= width) {
455 return true;
456 } else {
457 return false;
458 }
459}
460
461
462bool
463GUIGlObject::mouseWithinGeometry(const Position& pos, const double width, const double height,
464 const double offsetX, const double offsetY, const double rot) const {
465 // create shape
466 PositionVector shape;
467 // make rectangle
468 shape.push_back(Position(0 + width, 0 + height));
469 shape.push_back(Position(0 + width, 0 - height));
470 shape.push_back(Position(0 - width, 0 - height));
471 shape.push_back(Position(0 - width, 0 + height));
472 // move shape
473 shape.add(offsetX, offsetY, 0);
474 // rotate shape
475 shape.rotate2D(DEG2RAD((rot * -1) + 90));
476 // move to position
477 shape.add(pos);
478 // check if mouse is within new geometry
479 if (shape.around(gPostDrawing.mousePos)) {
481 return true;
482 } else {
483 return false;
484 }
485}
486
487
488std::string
492
493
494void
495GUIGlObject::drawName(const Position& pos, const double scale, const GUIVisualizationTextSettings& settings, const double angle, bool forceShow) const {
496 if (settings.show(this) || forceShow) {
497 GLHelper::drawTextSettings(settings, getMicrosimID(), pos, scale, angle);
498 }
499}
500
501
502/****************************************************************************/
@ MID_MANIP
Open the object's manipulator.
Definition GUIAppEnum.h:482
@ MID_ADDSELECT
Add to selected items - menu entry.
Definition GUIAppEnum.h:478
@ 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:460
@ 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:464
@ MID_COPY_NAME
Copy object name - popup entry.
Definition GUIAppEnum.h:448
@ MID_SHOWTYPEPARS
Show object type parameter - popup entry.
Definition GUIAppEnum.h:466
@ MID_REMOVESELECT
Remove from selected items - Menu Entry.
Definition GUIAppEnum.h:480
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_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_FRONTELEMENT
front element (used in netedit)
@ GLO_LANE
a lane
@ GLO_RIDE
a ride
@ GLO_FLOW
a flow
@ GLO_GEOMETRYPOINT
geometry point (used in netedit)
@ GLO_CHARGING_STATION
a chargingStation
@ GLO_EDGETYPE
an edgeType
@ 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_LANETYPE
a laneType
@ 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 TL(string)
Definition MsgHandler.h:287
#define TLF(string,...)
Definition MsgHandler.h:288
#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
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.
std::string myMicrosimID
ID of GL object.
virtual void markAsFrontElement()
mark element as front element (Currently used only in netedit)
std::string myFullName
full name of GL Object
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.
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:51
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 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.
virtual ~GUIGlObject()
Destructor.
bool mouseWithinGeometry(const Position center, const double radius) const
check if mouse is within elements geometry (for circles)
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
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.
std::string createFullName() const
create full name
std::set< GUIParameterTableWindow * > myParamWindows
Parameter table windows which refer to this object.
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:259
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:86
bool show(const GUIGlObject *o) const
whether to show the text