Eclipse SUMO - Simulation of Urban MObility
GNEAccess.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-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 /****************************************************************************/
18 //
19 /****************************************************************************/
20 #include <config.h>
21 
22 #include <netedit/GNENet.h>
23 #include <netedit/GNEUndoList.h>
24 #include <netedit/GNEViewNet.h>
25 #include <netedit/GNEViewParent.h>
28 #include <utils/gui/div/GLHelper.h>
31 #include <utils/xml/NamespaceIDs.h>
32 
33 #include "GNEAccess.h"
34 #include "GNEAdditionalHandler.h"
35 
36 // ===========================================================================
37 // member method definitions
38 // ===========================================================================
39 
41  GNEAdditional("", net, GLO_ACCESS, SUMO_TAG_ACCESS, GUIIconSubSys::getIcon(GUIIcon::ACCESS), "", {}, {}, {}, {}, {}, {}),
42  myPositionOverLane(0),
43  myLength(0),
44 myFriendlyPosition(false) {
45  // reset default values
46  resetDefaultValues();
47 }
48 
49 
50 GNEAccess::GNEAccess(GNEAdditional* busStop, GNELane* lane, GNENet* net, const double pos, const std::string& specialPos,
51  const bool friendlyPos, const double length, const Parameterised::Map& parameters) :
52  GNEAdditional(net, GLO_ACCESS, SUMO_TAG_ACCESS, GUIIconSubSys::getIcon(GUIIcon::ACCESS), "", {}, {}, {lane}, {busStop}, {}, {}),
53 Parameterised(parameters),
54 myPositionOverLane(pos),
55 mySpecialPosition(specialPos),
56 myLength(length),
57 myFriendlyPosition(friendlyPos) {
58  // update centering boundary without updating grid
59  updateCenteringBoundary(false);
60 }
61 
62 
64 }
65 
66 
69  // return move operation for additional placed over shape
70  return new GNEMoveOperation(this, getParentLanes().front(), myPositionOverLane,
72 }
73 
74 
75 void
77  // set start position
78  double fixedPositionOverLane;
79  if (myPositionOverLane < 0) {
80  fixedPositionOverLane = 0;
81  } else if (myPositionOverLane > getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength()) {
82  fixedPositionOverLane = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
83  } else {
84  fixedPositionOverLane = myPositionOverLane;
85  }
86  // update geometry
87  myAdditionalGeometry.updateGeometry(getParentLanes().front()->getLaneShape(), fixedPositionOverLane * getParentLanes().front()->getLengthGeometryFactor(), myMoveElementLateralOffset);
88 }
89 
90 
94 }
95 
96 
97 void
98 GNEAccess::updateCenteringBoundary(const bool /*updateGrid*/) {
99  // nothing to update
100 }
101 
102 
103 void
104 GNEAccess::splitEdgeGeometry(const double splitPosition, const GNENetworkElement* /*originalElement*/, const GNENetworkElement* newElement, GNEUndoList* undoList) {
105  if (splitPosition < myPositionOverLane) {
106  // change lane
107  setAttribute(SUMO_ATTR_LANE, newElement->getID(), undoList);
108  // now adjust start position
109  setAttribute(SUMO_ATTR_POSITION, toString(myPositionOverLane - splitPosition), undoList);
110  }
111 }
112 
113 
114 bool
116  // with friendly position enabled position are "always fixed"
117  if (myFriendlyPosition) {
118  return true;
119  } else {
121  return (myPositionOverLane >= 0) && (myPositionOverLane <= getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength());
122  } else {
123  return false;
124  }
125  }
126 }
127 
128 
129 void
131  device.openTag(SUMO_TAG_ACCESS);
132  device.writeAttr(SUMO_ATTR_LANE, getParentLanes().front()->getID());
134  if (myLength != -1) {
136  }
137  if (myFriendlyPosition) {
138  device.writeAttr(SUMO_ATTR_FRIENDLY_POS, true);
139  }
140  device.closeTag();
141 }
142 
143 
144 bool
146  // with friendly position enabled position is "always fixed"
147  if (myFriendlyPosition) {
148  return true;
149  } else if (myPositionOverLane == INVALID_DOUBLE) {
150  return true;
151  } else {
152  return fabs(myPositionOverLane) <= getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
153  }
154 }
155 
156 
157 std::string GNEAccess::getAdditionalProblem() const {
158  // obtain final length
159  const double len = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
160  // check if detector has a problem
162  return "";
163  } else {
164  // declare variable for error position
165  std::string errorPosition;
166  // check positions over lane
167  if (myPositionOverLane < 0) {
168  errorPosition = (toString(SUMO_ATTR_POSITION) + " < 0");
169  }
170  if (myPositionOverLane > len) {
171  errorPosition = (toString(SUMO_ATTR_POSITION) + TL(" > lanes's length"));
172  }
173  return errorPosition;
174  }
175 }
176 
177 
179  // declare new position
180  double newPositionOverLane = myPositionOverLane;
181  // declare new length (but unsed in this context)
182  double length = 0;
183  // fix pos and length with fixLanePosition
184  GNEAdditionalHandler::fixLanePosition(newPositionOverLane, length, getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength());
185  // set new position
186  setAttribute(SUMO_ATTR_POSITION, toString(newPositionOverLane), myNet->getViewNet()->getUndoList());
187 }
188 
189 
190 bool
192  // get edit modes
193  const auto& editModes = myNet->getViewNet()->getEditModes();
194  // check if we're in move mode
195  if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
196  (editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
197  // only move the first element
199  } else {
200  return false;
201  }
202 }
203 
204 
205 GNEEdge*
207  return getParentLanes().front()->getParentEdge();
208 }
209 
210 
211 std::string
213  return getParentAdditionals().at(0)->getID();
214 }
215 
216 
217 void
219  // first check if additional has to be drawn
221  // Obtain exaggeration
222  const double accessExaggeration = getExaggeration(s);
223  // get detail level
224  const auto d = s.getDetailLevel(1);
225  // draw geometry only if we'rent in drawForObjectUnderCursor mode
226  if (!s.drawForViewObjectsHandler) {
227  // radius depends if mouse is over element
228  const double radius = gViewObjectsHandler.isElementSelected(this) ? 1 : 0.5;
229  // get color
230  RGBColor accessColor;
231  if (drawUsingSelectColor()) {
232  accessColor = s.colorSettings.selectedAdditionalColor;
233  } else if (!getParentAdditionals().front()->getAttribute(SUMO_ATTR_COLOR).empty()) {
234  accessColor = parse<RGBColor>(getParentAdditionals().front()->getAttribute(SUMO_ATTR_COLOR));
235  } else {
236  accessColor = s.colorSettings.busStopColor;
237  }
238  // draw parent and child lines
239  drawParentChildLines(s, accessColor);
240  // push layer matrix
242  // translate to front
244  // set color
245  GLHelper::setColor(accessColor);
246  // translate to geometry position
247  glTranslated(myAdditionalGeometry.getShape().front().x(), myAdditionalGeometry.getShape().front().y(), 0);
248  // draw circle
250  // pop layer matrix
252  // draw lock icon
253  GNEViewNetHelper::LockIcon::drawLockIcon(d, this, getType(), myAdditionalGeometry.getShape().front(), accessExaggeration, 0.3);
254  // draw dotted contour
256  }
257  // calculate contour
258  myAdditionalContour.calculateContourCircleShape(s, d, this, myAdditionalGeometry.getShape().front(), 1, accessExaggeration);
259  }
260 }
261 
262 
263 std::string
265  switch (key) {
266  case SUMO_ATTR_ID:
267  return getParentAdditionals().front()->getID();
268  case SUMO_ATTR_LANE:
269  return getParentLanes().front()->getID();
270  case SUMO_ATTR_POSITION:
272  return mySpecialPosition;
273  } else {
275  }
276  case SUMO_ATTR_LENGTH:
277  return toString(myLength);
280  case GNE_ATTR_PARENT:
281  return getParentAdditionals().at(0)->getID();
282  case GNE_ATTR_SELECTED:
284  case GNE_ATTR_PARAMETERS:
285  return getParametersStr();
287  return "";
288  default:
289  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
290  }
291 }
292 
293 
294 double
296  throw InvalidArgument(getTagStr() + " doesn't have a double attribute of type '" + toString(key) + "'");
297 }
298 
299 
300 const Parameterised::Map&
302  return getParametersMap();
303 }
304 
305 
306 void
307 GNEAccess::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
308  switch (key) {
309  case SUMO_ATTR_LANE:
310  case SUMO_ATTR_POSITION:
311  case SUMO_ATTR_LENGTH:
313  case GNE_ATTR_PARENT:
314  case GNE_ATTR_SELECTED:
315  case GNE_ATTR_PARAMETERS:
317  GNEChange_Attribute::changeAttribute(this, key, value, undoList);
318  break;
319  default:
320  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
321  }
322 }
323 
324 
325 bool
326 GNEAccess::isValid(SumoXMLAttr key, const std::string& value) {
327  switch (key) {
328  case SUMO_ATTR_LANE: {
329  GNELane* lane = myNet->getAttributeCarriers()->retrieveLane(value, false);
330  if (lane != nullptr) {
331  if (getParentLanes().front()->getParentEdge()->getID() != lane->getParentEdge()->getID()) {
333  } else {
334  return true;
335  }
336  } else {
337  return false;
338  }
339  }
340  case SUMO_ATTR_POSITION:
341  if (value.empty() || value == "random" || value == "doors") {
342  return true;
343  } else {
344  return canParse<double>(value);
345  }
346  case SUMO_ATTR_LENGTH:
347  if (canParse<double>(value)) {
348  const double valueDouble = parse<double>(value);
349  return (valueDouble == -1) || (valueDouble >= 0);
350  } else {
351  return false;
352  }
354  return canParse<bool>(value);
355  case GNE_ATTR_PARENT:
356  return (myNet->getAttributeCarriers()->retrieveAdditionals(NamespaceIDs::busStops, value, false) != nullptr);
357  case GNE_ATTR_SELECTED:
358  return canParse<bool>(value);
359  case GNE_ATTR_PARAMETERS:
360  return areParametersValid(value);
361  default:
362  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
363  }
364 }
365 
366 
367 std::string
369  return getTagStr();
370 }
371 
372 
373 std::string
375  return getTagStr() + ": " + getParentLanes().front()->getParentEdge()->getID();
376 }
377 
378 // ===========================================================================
379 // private
380 // ===========================================================================
381 
382 void
383 GNEAccess::setAttribute(SumoXMLAttr key, const std::string& value) {
384  switch (key) {
385  case SUMO_ATTR_LANE:
387  break;
388  case SUMO_ATTR_POSITION:
389  if (value.empty()) {
390  myPositionOverLane = 0;
391  } else if (value == "random" || value == "doors") {
393  mySpecialPosition = value;
394  } else {
395  myPositionOverLane = parse<double>(value);
396  }
397  break;
398  case SUMO_ATTR_LENGTH:
399  myLength = parse<double>(value);
400  break;
402  myFriendlyPosition = parse<bool>(value);
403  break;
404  case GNE_ATTR_PARENT:
405  if (myNet->getAttributeCarriers()->retrieveAdditional(SUMO_TAG_BUS_STOP, value, false) != nullptr) {
407  } else {
409  }
410  break;
411  case GNE_ATTR_SELECTED:
412  if (parse<bool>(value)) {
414  } else {
416  }
417  break;
418  case GNE_ATTR_PARAMETERS:
419  setParametersStr(value);
420  break;
422  shiftLaneIndex();
423  break;
424  default:
425  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
426  }
427 }
428 
429 
430 void
432  // change both position
433  myPositionOverLane = moveResult.newFirstPos;
434  // set lateral offset
436  // update geometry
437  updateGeometry();
438 }
439 
440 
441 void
442 GNEAccess::commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) {
443  // reset lateral offset
445  undoList->begin(this, "position of " + getTagStr());
446  // now adjust start position
447  setAttribute(SUMO_ATTR_POSITION, toString(moveResult.newFirstPos), undoList);
448  // check if lane has to be changed
449  if (moveResult.newFirstLane) {
450  // set new lane
451  setAttribute(SUMO_ATTR_LANE, moveResult.newFirstLane->getID(), undoList);
452  }
453  // end change attribute
454  undoList->end();
455 }
456 
457 
458 /****************************************************************************/
@ NETWORK_MOVE
mode for moving network elements
@ GLO_ACCESS
a Acces
GUIViewObjectsHandler gViewObjectsHandler
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:33
#define TL(string)
Definition: MsgHandler.h:315
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_LANE
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_FRIENDLY_POS
@ SUMO_ATTR_LENGTH
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_ID
@ SUMO_ATTR_POSITION
@ GNE_ATTR_SHIFTLANEINDEX
shift lane index (only used by elements over lanes)
const double INVALID_DOUBLE
invalid double
Definition: StdDefs.h:64
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:654
static void popMatrix()
pop matrix
Definition: GLHelper.cpp:130
static void drawFilledCircleDetailled(const GUIVisualizationSettings::Detail d, const double radius)
Draws a filled circle around (0,0) depending of level of detail.
Definition: GLHelper.cpp:539
static void pushMatrix()
push matrix
Definition: GLHelper.cpp:117
~GNEAccess()
Destructor.
Definition: GNEAccess.cpp:63
std::string getParentName() const
Returns the name (ID) of the parent object.
Definition: GNEAccess.cpp:212
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspondent attribute are valids
Definition: GNEAccess.cpp:326
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
Definition: GNEAccess.cpp:104
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
Definition: GNEAccess.cpp:431
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
Definition: GNEAccess.cpp:130
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
Definition: GNEAccess.cpp:368
void updateGeometry()
update pre-computed geometry information
Definition: GNEAccess.cpp:76
bool isAdditionalValid() const
check if current additional is valid to be written into XML (must be reimplemented in all detector ch...
Definition: GNEAccess.cpp:145
void fixAdditionalProblem()
fix additional problem (must be reimplemented in all detector children)
Definition: GNEAccess.cpp:178
bool isAccessPositionFixed() const
check if Position of Access is fixed
Definition: GNEAccess.cpp:115
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
Definition: GNEAccess.cpp:98
bool myFriendlyPosition
flag to check if friendly position is enabled
Definition: GNEAccess.h:178
double getAttributeDouble(SumoXMLAttr key) const
Definition: GNEAccess.cpp:295
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
Definition: GNEAccess.cpp:442
GNEMoveOperation * getMoveOperation()
get move operation
Definition: GNEAccess.cpp:68
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Definition: GNEAccess.cpp:374
GNEEdge * getEdge() const
get edge in which this Access is placed
Definition: GNEAccess.cpp:206
GNEAccess(GNENet *net)
Default constructor.
Definition: GNEAccess.cpp:40
const Parameterised::Map & getACParametersMap() const
get parameters map
Definition: GNEAccess.cpp:301
std::string getAttribute(SumoXMLAttr key) const
Definition: GNEAccess.cpp:264
Position getPositionInView() const
Returns position of additional in view.
Definition: GNEAccess.cpp:92
std::string mySpecialPosition
position over lane
Definition: GNEAccess.h:172
double myLength
Access length.
Definition: GNEAccess.h:175
std::string getAdditionalProblem() const
return a string with the current additional problem (must be reimplemented in all detector children)
Definition: GNEAccess.cpp:157
double myPositionOverLane
position over lane
Definition: GNEAccess.h:169
bool checkDrawMoveContour() const
check if draw move contour (red)
Definition: GNEAccess.cpp:191
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
Definition: GNEAccess.cpp:307
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNEAccess.cpp:218
static bool accessCanBeCreated(GNEAdditional *busStopParent, GNEEdge *edge)
check if a GNEAccess can be created in a certain Edge
static bool checkLanePosition(double pos, const double length, const double laneLength, const bool friendlyPos)
check if the given position over a lane is valid
static void fixLanePosition(double &pos, double &length, const double laneLength)
fix given position over lane
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNEAdditional.h:49
void replaceAdditionalParent(SumoXMLTag tag, const std::string &value, const int parentIndex)
replace additional parent
GNEContour myAdditionalContour
variable used for draw additional contours
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
void replaceAdditionalParentLanes(const std::string &value)
replace additional parent lanes
void shiftLaneIndex()
shift lane index
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
const std::string & getTagStr() const
get tag assigned to this object in string format
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
GNENet * myNet
pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void calculateContourCircleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double scale) const
calculate contour (circle elements)
Definition: GNEContour.cpp:117
void drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
drawing contour functions
Definition: GNEContour.cpp:265
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
GNEEdge * getParentEdge() const
get parent edge
Definition: GNELane.cpp:196
double myMoveElementLateralOffset
move element lateral offset (used by elements placed over lanes
bool getAllowChangeLane() const
allow change lane
CommonModeOptions * getCommonModeOptions() const
get common mode options
move operation
move result
const GNELane * newFirstLane
new first Lane
double newFirstPos
new first position
double firstLaneOffset
lane offset
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
GNEAdditional * retrieveAdditionals(const std::vector< SumoXMLTag > types, 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:122
GNEViewNet * getViewNet() const
get view net
Definition: GNENet.cpp:2055
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...
const GUIGlObject * getGUIGlObjectFront() const
get front attribute carrier or a pointer to nullptr
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
Definition: GNEViewNet.cpp:727
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
Definition: GNEViewNet.cpp:703
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
bool isMovingElement() const
check if an element is being moved
GNEViewParent * getViewParent() const
get the net object
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
GNEUndoList * getUndoList() const
get the undoList object
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
Definition: GNEViewNet.cpp:468
GNEMoveFrame * getMoveFrame() const
get frame for move elements
const PositionVector & getShape() const
The shape of the additional element.
void updateGeometry(const PositionVector &shape)
update entire geometry
Definition: GUIGeometry.cpp:59
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.h:156
bool isElementSelected(const GUIGlObject *GLObject) const
check if element was already selected
Stores the information about how to visualize structures.
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
static const std::vector< SumoXMLTag > busStops
busStops namespace
Definition: NamespaceIDs.h:38
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:254
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
An upper class for objects with additional parameters.
Definition: Parameterised.h:41
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|....
std::map< std::string, std::string > Map
parameters map
Definition: Parameterised.h:45
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"
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
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
Position getPolygonCenter() const
Returns the arithmetic of all corner points.
bool showAdditionals() const
check if additionals has to be drawn
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
RGBColor busStopColor
color for busStops
static const double segmentWidthSmall
width of small dotted contour segments