Eclipse SUMO - Simulation of Urban MObility
GNEParkingSpace.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 /****************************************************************************/
18 // A lane area vehicles can halt at (GNE version)
19 /****************************************************************************/
20 #include <netedit/GNENet.h>
21 #include <netedit/GNEUndoList.h>
22 #include <netedit/GNEViewNet.h>
24 #include <utils/gui/div/GLHelper.h>
26 
27 #include "GNEParkingSpace.h"
28 
29 
30 // ===========================================================================
31 // method definitions
32 // ===========================================================================
33 
36 {}, {}, {}, {}, {}, {}, {}, {},
37 std::map<std::string, std::string>()),
38 mySlope(0) {
39  // reset default values
41 }
42 
43 
44 GNEParkingSpace::GNEParkingSpace(GNENet* net, GNEAdditional* parkingAreaParent, const Position& pos,
45  const std::string& width, const std::string& length, const std::string& angle, double slope,
46  const std::string& name, const std::map<std::string, std::string>& parameters) :
48 {}, {}, {}, {parkingAreaParent}, {}, {}, {}, {},
49 parameters),
50 myPosition(pos),
51 myWidth(width),
52 myLength(length),
53 myAngle(angle),
54 mySlope(slope) {
55  // update centering boundary without updating grid
56  updateCenteringBoundary(false);
57 }
58 
59 
61 
62 
68  // get snap radius
70  // get mouse position
71  const Position mousePosition = myNet->getViewNet()->getPositionInformation();
72  // check if we're editing width or height
73  if (myShapeLength.back().distanceSquaredTo2D(mousePosition) <= (snap_radius * snap_radius)) {
74  // edit lenght
76  } else if (myShapeWidth.front().distanceSquaredTo2D(mousePosition) <= (snap_radius * snap_radius)) {
77  // edit width
79  } else if (myShapeWidth.back().distanceSquaredTo2D(mousePosition) <= (snap_radius * snap_radius)) {
80  // edit width
82  } else {
83  return nullptr;
84  }
85  } else {
86  // move entire space
87  return new GNEMoveOperation(this, myPosition);
88  }
89 }
90 
91 
92 void
94  device.openTag(getTagProperty().getTag());
95  if (!myAdditionalName.empty()) {
97  }
98  device.writeAttr(SUMO_ATTR_X, myPosition.x());
99  device.writeAttr(SUMO_ATTR_Y, myPosition.y());
100  if (myPosition.z() != 0) {
101  device.writeAttr(SUMO_ATTR_Z, myPosition.z());
102  }
103  if (myWidth.size() > 0) {
105  }
106  if (myLength.size() > 0) {
108  }
109  if (myAngle.size() > 0) {
111  }
114  }
115  // write parameters (Always after children to avoid problems with additionals.xsd)
116  writeParams(device);
117  device.closeTag();
118 }
119 
120 
121 void
123  // get width an lenght
124  const double width = getAttributeDouble(SUMO_ATTR_WIDTH) <= 0 ? POSITION_EPS : getAttributeDouble(SUMO_ATTR_WIDTH);
125  const double lenght = getAttributeDouble(SUMO_ATTR_LENGTH) <= 0 ? POSITION_EPS : getAttributeDouble(SUMO_ATTR_LENGTH);
126  // calculate shape lenght
127  myShapeLength.clear();
128  myShapeLength.push_back(Position(0, 0));
129  myShapeLength.push_back(Position(0, lenght));
130  // rotate
132  // move
134  // calculate shape width
135  PositionVector leftShape = myShapeLength;
136  leftShape.move2side(width * -0.5);
137  PositionVector rightShape = myShapeLength;
138  rightShape.move2side(width * 0.5);
139  myShapeWidth = {leftShape.getCentroid(), rightShape.getCentroid()};
140  // update centering boundary
142 }
143 
144 
145 Position
147  return myPosition;
148 }
149 
150 
151 void
152 GNEParkingSpace::updateCenteringBoundary(const bool /*updateGrid*/) {
153  // first reset boundary
155  // add position
157  // grow width and lenght
160  // grow
162  // update centering boundary of parent
163  getParentAdditionals().front()->updateCenteringBoundary(true);
164 }
165 
166 
167 void
168 GNEParkingSpace::splitEdgeGeometry(const double /*splitPosition*/, const GNENetworkElement* /*originalElement*/, const GNENetworkElement* /*newElement*/, GNEUndoList* /*undoList*/) {
169  // geometry of this element cannot be splitted
170 }
171 
172 
173 std::string
175  return getParentAdditionals().at(0)->getID();
176 }
177 
178 
179 void
181  // Set initial values
182  const double parkingAreaExaggeration = getExaggeration(s);
183  // first check if additional has to be drawn
184  if (myNet->getViewNet()->getDataViewOptions().showAdditionals() && s.drawAdditionals(parkingAreaExaggeration)) {
185  // obtain values
186  const double width = myShapeWidth.length2D() * 0.5 + (parkingAreaExaggeration * 0.1);
187  const double angle = getAttributeDouble(SUMO_ATTR_ANGLE);
188  // get colors
191  // draw parent and child lines
193  // push name
195  // push later matrix
197  // translate to front
199  // set contour color
200  GLHelper::setColor(contourColor);
201  // draw extern
203  // make a copy of myShapeLength and scale
204  PositionVector shapeLengthInner = myShapeLength;
205  shapeLengthInner.scaleAbsolute(-0.1);
206  // draw intern
207  if (!s.drawForRectangleSelection) {
208  // Traslate to front
209  glTranslated(0, 0, 0.1);
210  // set base color
211  GLHelper::setColor(baseColor);
212  //draw intern
213  GLHelper::drawBoxLines(shapeLengthInner, width - 0.1);
214  }
215  // draw geometry points
216  drawUpGeometryPoint(myNet->getViewNet(), myShapeLength.back(), angle, contourColor);
217  drawLeftGeometryPoint(myNet->getViewNet(), myShapeWidth.back(), angle - 90, contourColor);
218  drawRightGeometryPoint(myNet->getViewNet(), myShapeWidth.front(), angle - 90, contourColor);
219  // pop layer matrix
221  // pop name
223  // draw lock icon
225  // check if dotted contours has to be drawn
227  // draw using drawDottedContourClosedShape
229  }
230  if (myNet->getViewNet()->getFrontAttributeCarrier() == this) {
231  // draw using drawDottedContourClosedShape
233  }
234  // Draw additional ID
235  drawAdditionalID(s);
236  // draw additional name
238  }
239 }
240 
241 
242 std::string
244  switch (key) {
245  case SUMO_ATTR_ID:
246  return getID();
247  case SUMO_ATTR_POSITION:
248  return toString(myPosition);
249  case SUMO_ATTR_NAME:
250  return myAdditionalName;
251  case SUMO_ATTR_WIDTH:
252  return myWidth;
253  case SUMO_ATTR_LENGTH:
254  return myLength;
255  case SUMO_ATTR_ANGLE:
256  return myAngle;
257  case SUMO_ATTR_SLOPE:
258  return toString(mySlope);
259  case GNE_ATTR_PARENT:
260  return getParentAdditionals().at(0)->getID();
261  case GNE_ATTR_SELECTED:
263  case GNE_ATTR_PARAMETERS:
264  return getParametersStr();
265  default:
266  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
267  }
268 }
269 
270 
271 double
273  switch (key) {
274  case SUMO_ATTR_WIDTH:
275  return myWidth.empty() ? getParentAdditionals().front()->getAttributeDouble(SUMO_ATTR_WIDTH) : parse<double>(myWidth);
276  case SUMO_ATTR_LENGTH:
277  return myLength.empty() ? getParentAdditionals().front()->getAttributeDouble(SUMO_ATTR_LENGTH) : parse<double>(myLength);
278  case SUMO_ATTR_ANGLE:
279  return myAngle.empty() ? getParentAdditionals().front()->getAttributeDouble(SUMO_ATTR_ANGLE) : parse<double>(myAngle);
280  default:
281  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
282  }
283 }
284 
285 
286 void
287 GNEParkingSpace::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
288  if (value == getAttribute(key)) {
289  return; //avoid needless changes, later logic relies on the fact that attributes have changed
290  }
291  switch (key) {
292  case SUMO_ATTR_POSITION:
293  case SUMO_ATTR_NAME:
294  case SUMO_ATTR_WIDTH:
295  case SUMO_ATTR_LENGTH:
296  case SUMO_ATTR_ANGLE:
297  case SUMO_ATTR_SLOPE:
298  case GNE_ATTR_PARENT:
299  case GNE_ATTR_SELECTED:
300  case GNE_ATTR_PARAMETERS:
301  undoList->changeAttribute(new GNEChange_Attribute(this, key, value));
302  break;
303  default:
304  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
305  }
306 }
307 
308 
309 bool
310 GNEParkingSpace::isValid(SumoXMLAttr key, const std::string& value) {
311  switch (key) {
312  case SUMO_ATTR_POSITION:
313  return canParse<Position>(value);
314  case SUMO_ATTR_NAME:
316  case SUMO_ATTR_WIDTH:
317  return value.empty() || (canParse<double>(value) && (parse<double>(value) > 0));
318  case SUMO_ATTR_LENGTH:
319  return value.empty() || (canParse<double>(value) && (parse<double>(value) > 0));
320  case SUMO_ATTR_ANGLE:
321  return value.empty() || canParse<double>(value);
322  case SUMO_ATTR_SLOPE:
323  return canParse<double>(value);
324  case GNE_ATTR_PARENT:
325  return (myNet->getAttributeCarriers()->retrieveAdditional(SUMO_TAG_PARKING_AREA, value, false) != nullptr);
326  case GNE_ATTR_SELECTED:
327  return canParse<bool>(value);
328  case GNE_ATTR_PARAMETERS:
329  return Parameterised::areParametersValid(value);
330  default:
331  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
332  }
333 }
334 
335 
336 bool
338  return true;
339 }
340 
341 
342 std::string
344  return getTagStr();
345 }
346 
347 
348 std::string
350  return getTagStr() + ": " + getAttribute(SUMO_ATTR_POSITION);
351 }
352 
353 // ===========================================================================
354 // private
355 // ===========================================================================
356 
357 void
358 GNEParkingSpace::setAttribute(SumoXMLAttr key, const std::string& value) {
359  switch (key) {
360  case SUMO_ATTR_POSITION:
361  myPosition = parse<Position>(value);
362  // update geometry
363  updateGeometry();
364  break;
365  case SUMO_ATTR_NAME:
366  myAdditionalName = value;
367  break;
368  case SUMO_ATTR_WIDTH:
369  myWidth = value;
370  // update geometry (except for template)
371  if (getParentAdditionals().size() > 0) {
372  updateGeometry();
373  }
374  break;
375  case SUMO_ATTR_LENGTH:
376  myLength = value;
377  // update geometry (except for template)
378  if (getParentAdditionals().size() > 0) {
379  updateGeometry();
380  }
381  break;
382  case SUMO_ATTR_ANGLE:
383  myAngle = value;
384  // update geometry (except for template)
385  if (getParentAdditionals().size() > 0) {
386  updateGeometry();
387  }
388  break;
389  case SUMO_ATTR_SLOPE:
390  mySlope = parse<double>(value);
391  break;
392  case GNE_ATTR_PARENT:
394  break;
395  case GNE_ATTR_SELECTED:
396  if (parse<bool>(value)) {
398  } else {
400  }
401  break;
402  case GNE_ATTR_PARAMETERS:
403  setParametersStr(value);
404  break;
405  default:
406  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
407  }
408 }
409 
410 
411 void
413  // check what are being updated
415  myShapeLength[1] = moveResult.shapeToUpdate[1];
416  } else if (moveResult.operationType == GNEMoveOperation::OperationType::WIDTH) {
417  myShapeWidth = moveResult.shapeToUpdate;
418  } else {
419  myPosition = moveResult.shapeToUpdate.front();
420  // update geometry
421  updateGeometry();
422  }
423 }
424 
425 
426 void
428  // check what are being updated
430  undoList->begin(myTagProperty.getGUIIcon(), "length of " + getTagStr());
431  setAttribute(SUMO_ATTR_LENGTH, toString(myShapeLength[0].distanceTo2D(moveResult.shapeToUpdate[1])), undoList);
432  undoList->end();
433  } else if (moveResult.operationType == GNEMoveOperation::OperationType::WIDTH) {
434  undoList->begin(myTagProperty.getGUIIcon(), "width of " + getTagStr());
435  setAttribute(SUMO_ATTR_WIDTH, toString(moveResult.shapeToUpdate.length2D()), undoList);
436  undoList->end();
437  } else {
438  undoList->begin(myTagProperty.getGUIIcon(), "position of " + getTagStr());
439  setAttribute(SUMO_ATTR_POSITION, toString(moveResult.shapeToUpdate.front()), undoList);
440  undoList->end();
441  }
442 }
443 
444 /****************************************************************************/
@ NETWORK_MOVE
mode for moving network elements
@ GLO_PARKING_SPACE
a ParkingSpace
#define DEG2RAD(x)
Definition: GeomHelper.h:35
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_PARKING_SPACE
A parking space for a single vehicle within a parking area.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_Y
@ SUMO_ATTR_Z
@ GNE_ATTR_PARENT
parent of an additional element
@ SUMO_ATTR_X
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_NAME
@ SUMO_ATTR_SLOPE
@ SUMO_ATTR_ANGLE
@ SUMO_ATTR_LENGTH
@ SUMO_ATTR_ID
@ SUMO_ATTR_WIDTH
@ SUMO_ATTR_POSITION
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:77
void reset()
Resets the boundary.
Definition: Boundary.cpp:65
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:299
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:507
static void pushName(unsigned int name)
push Name
Definition: GLHelper.cpp:132
static void popMatrix()
pop matrix
Definition: GLHelper.cpp:123
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
Definition: GLHelper.cpp:277
static void popName()
pop Name
Definition: GLHelper.cpp:141
static void pushMatrix()
push matrix
Definition: GLHelper.cpp:114
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
static void drawRightGeometryPoint(const GNEViewNet *viewNet, const Position &pos, const double rot, const RGBColor &baseColor)
draw right geometry point
const std::string & getID() const
get ID
void replaceAdditionalParent(SumoXMLTag tag, const std::string &value, const int parentIndex)
replace additional parent
void drawAdditionalID(const GUIVisualizationSettings &s) const
draw additional ID
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration asociated with this GLObject
std::string myAdditionalName
name of additional
void drawAdditionalName(const GUIVisualizationSettings &s) const
draw additional name
Boundary myAdditionalBoundary
Additional Boundary.
static void drawUpGeometryPoint(const GNEViewNet *viewNet, const Position &pos, const double rot, const RGBColor &baseColor)
draw up geometry point
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
static void drawLeftGeometryPoint(const GNEViewNet *viewNet, const Position &pos, const double rot, const RGBColor &baseColor)
draw left geometry point
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
friend class GNEChange_Attribute
declare friend class
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void resetDefaultValues()
reset attribute carrier to their default values
GNENet * myNet
pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
move operation
move result
const GNEMoveOperation::OperationType operationType
move operation
PositionVector shapeToUpdate
shape to update (edited in moveElement)
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:42
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition: GNENet.cpp:125
GNEViewNet * getViewNet() const
get view net
Definition: GNENet.cpp:1964
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
double getAttributeDouble(SumoXMLAttr key) const
PositionVector myShapeWidth
shape width of Parking Space
std::string getAttribute(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
Position myPosition
position of Parking Space in view
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
double mySlope
Slope of Parking Space.
~GNEParkingSpace()
Destructor.
std::string getParentName() const
Returns the name of the parent object (if any)
std::string myAngle
Angle of Parking Space.
Position getPositionInView() const
Returns position of additional in view.
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
bool isAttributeEnabled(SumoXMLAttr key) const
GNEParkingSpace(GNENet *net)
Constructor.
std::string myLength
Length of Parking Space.
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
GNEMoveOperation * getMoveOperation()
get move operation
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string myWidth
width of Parking Space
PositionVector myShapeLength
shape length of Parking Space
void updateGeometry()
update pre-computed geometry information
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
void changeAttribute(GNEChange_Attribute *change)
special method for change attributes, avoid empty changes, always execute
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
Definition: GNEViewNet.cpp:537
const GNEAttributeCarrier * getFrontAttributeCarrier() const
get front attributeCarrier
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
Definition: GNEViewNet.cpp:513
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed modul
Definition: GNEViewNet.cpp:543
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
bool isAttributeCarrierInspected(const GNEAttributeCarrier *AC) const
check if attribute carrier is being inspected
static void drawDottedContourShape(const DottedContourType type, const GUIVisualizationSettings &s, const PositionVector &shape, const double width, const double exaggeration, const bool drawFirstExtrem, const bool drawLastExtrem, const double lineWidth=-1)
draw dotted contour for the given shape (used by additionals)
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GUIGlID getGlID() const
Returns the numerical id of the object.
GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
Stores the information about how to visualize structures.
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
bool drawAdditionals(const double exaggeration) const
check if additionals must be drawn
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:248
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static bool areParametersValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
void setParametersStr(const std::string &paramsString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
double x() const
Returns the x-position.
Definition: Position.h:55
double z() const
Returns the z-position.
Definition: Position.h:65
double y() const
Returns the y-position.
Definition: Position.h:60
A list of positions.
void scaleAbsolute(double offset)
enlarges/shrinks the polygon by an absolute offset based at the centroid
double length2D() const
Returns the length.
void rotate2D(double angle)
Position getPolygonCenter() const
Returns the arithmetic of all corner points.
void add(double xoff, double yoff, double zoff)
void move2side(double amount, double maxExtension=100)
move position vector to side using certain ammount
Position getCentroid() const
Returns the centroid (closes the polygon if unclosed)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
bool showAdditionals() const
check if additionals has to be drawn
NetworkEditMode networkEditMode
the current Network edit mode
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
static void drawLockIcon(const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position viewPosition, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
bool shiftKeyPressed() const
check if SHIFT is pressed during current event
static const RGBColor connectionColor
connection color
RGBColor parkingSpaceColorContour
color for parkingSpace contour
RGBColor parkingSpaceColor
color for parkingSpace innen
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
static const double additionalGeometryPointRadius
moving additional geometry point radius