Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEStoppingPlace.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// A abstract class to define common parameters of lane area in which vehicles can halt (GNE version)
19/****************************************************************************/
20#include <config.h>
21
23#include <netedit/GNENet.h>
24#include <netedit/GNEUndoList.h>
25#include <netedit/GNEViewNet.h>
31
32#include "GNEStoppingPlace.h"
34
35// ===========================================================================
36// member method definitions
37// ===========================================================================
38
39GNEStoppingPlace::GNEStoppingPlace(const std::string& id, GNENet* net, GUIGlObjectType type, SumoXMLTag tag, FXIcon* icon,
40 GNELane* lane, const double startPos, const double endPos, const std::string& name, bool friendlyPosition,
41 const Parameterised::Map& parameters) :
42 GNEAdditional(id, net, type, tag, icon, name, {}, {}, {lane}, {}, {}, {}),
43 Parameterised(parameters),
44 myStartPosition(startPos),
45 myEndPosition(endPos),
46myFriendlyPosition(friendlyPosition) {
47}
48
49
51
52
55 // get allow change lane
56 const bool allowChangeLane = myNet->getViewNet()->getViewParent()->getMoveFrame()->getCommonModeOptions()->getAllowChangeLane();
57 // fist check if we're moving only extremes
58 if (drawMovingGeometryPoints(false)) {
59 // get geometry points under cursor
60 const auto geometryPoints = gViewObjectsHandler.getSelectedGeometryPoints(this);
61 // continue depending of moved element
62 if (geometryPoints.empty()) {
63 return nullptr;
64 } else if (geometryPoints.front() == 0) {
65 // move start position
66 return new GNEMoveOperation(this, getParentLanes().front(), myStartPosition, getParentLanes().front()->getLaneShape().length2D() - POSITION_EPS,
68 } else {
69 // move end position
70 return new GNEMoveOperation(this, getParentLanes().front(), 0, myEndPosition,
72 }
74 // move both start and end positions
77 } else if (myStartPosition != INVALID_DOUBLE) {
78 // move only start position
79 return new GNEMoveOperation(this, getParentLanes().front(), myStartPosition, getParentLanes().front()->getLaneShape().length2D() - POSITION_EPS,
81 } else if (myEndPosition != INVALID_DOUBLE) {
82 // move only end position
83 return new GNEMoveOperation(this, getParentLanes().front(), 0, myEndPosition,
85 } else {
86 // start and end positions undefined, then nothing to move
87 return nullptr;
88 }
89}
90
91
92bool
97
98
99std::string
101 // obtain lane length
102 double laneLength = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength() * getParentLanes().front()->getLengthGeometryFactor();
103 // calculate start and end positions
104 double startPos = getAttributeDouble(SUMO_ATTR_STARTPOS);
105 double endPos = getAttributeDouble(SUMO_ATTR_ENDPOS);
106 // check if position has to be fixed
107 if (startPos < 0) {
108 startPos += laneLength;
109 }
110 if (endPos < 0) {
111 endPos += laneLength;
112 }
113 // declare variables
114 std::string errorStart, separator, errorEnd;
115 // check positions over lane
116 if (startPos < 0) {
117 errorStart = (toString(SUMO_ATTR_STARTPOS) + " < 0");
118 } else if (startPos > getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength()) {
119 errorStart = (toString(SUMO_ATTR_STARTPOS) + TL(" > lanes's length"));
120 }
121 if (endPos < 0) {
122 errorEnd = (toString(SUMO_ATTR_ENDPOS) + " < 0");
123 } else if (endPos > getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength()) {
124 errorEnd = (toString(SUMO_ATTR_ENDPOS) + TL(" > lanes's length"));
125 }
126 // check separator
127 if ((errorStart.size() > 0) && (errorEnd.size() > 0)) {
128 separator = TL(" and ");
129 }
130 return errorStart + separator + errorEnd;
131}
132
133
134void
136 // calculate start and end positions
137 double startPos = getAttributeDouble(SUMO_ATTR_STARTPOS);
138 double endPos = getAttributeDouble(SUMO_ATTR_ENDPOS);
139 // fix start and end positions using fixLaneDoublePosition
140 GNEAdditionalHandler::fixLaneDoublePosition(startPos, endPos, getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength());
141 // set new start and end positions
144}
145
146
147bool
149 // get edit modes
150 const auto& editModes = myNet->getViewNet()->getEditModes();
151 // check if we're in move mode
152 if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
154 (editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
155 // only move the first element
157 } else {
158 return false;
159 }
160}
161
162
167
168
169void
171 // nothing to do
172}
173
174
175void
176GNEStoppingPlace::splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement, const GNENetworkElement* newElement, GNEUndoList* undoList) {
177 // first check tat both network elements are lanes and originalElement correspond to stoppingPlace lane
178 if ((originalElement->getTagProperty().getTag() == SUMO_TAG_LANE) &&
179 (newElement->getTagProperty().getTag() == SUMO_TAG_LANE) &&
180 (getParentLanes().front() == originalElement)) {
181 // check if we have to change additional lane depending of split position
183 // calculate middle position
184 const double middlePosition = ((myEndPosition - myStartPosition) / 2.0) + myStartPosition;
185 // four cases:
186 if (splitPosition < myStartPosition) {
187 // change lane
188 setAttribute(SUMO_ATTR_LANE, newElement->getID(), undoList);
189 // now adjust start and end position
190 setAttribute(SUMO_ATTR_STARTPOS, toString(myStartPosition - splitPosition), undoList);
191 setAttribute(SUMO_ATTR_ENDPOS, toString(myEndPosition - splitPosition), undoList);
192 } else if ((splitPosition > myStartPosition) && (splitPosition < middlePosition)) {
193 // change lane
194 setAttribute(SUMO_ATTR_LANE, newElement->getID(), undoList);
195 // now adjust start and end position
196 setAttribute(SUMO_ATTR_STARTPOS, "0", undoList);
197 setAttribute(SUMO_ATTR_ENDPOS, toString(myEndPosition - splitPosition), undoList);
198 } else if ((splitPosition > middlePosition) && (splitPosition < myEndPosition)) {
199 // only adjust end position
200 setAttribute(SUMO_ATTR_ENDPOS, toString(splitPosition), undoList);
201 } else if ((splitPosition > myEndPosition)) {
202 // nothing to do
203 }
204 } else if ((myStartPosition != INVALID_DOUBLE) && (splitPosition < myStartPosition)) {
205 // change lane
206 setAttribute(SUMO_ATTR_LANE, newElement->getID(), undoList);
207 // now adjust start position
208 setAttribute(SUMO_ATTR_STARTPOS, toString(myEndPosition - splitPosition), undoList);
209 } else if ((myEndPosition != INVALID_DOUBLE) && (splitPosition < myEndPosition)) {
210 // change lane
211 setAttribute(SUMO_ATTR_LANE, newElement->getID(), undoList);
212 // now adjust end position
213 setAttribute(SUMO_ATTR_ENDPOS, toString(myEndPosition - splitPosition), undoList);
214 }
215 }
216}
217
218
219std::string
221 return getParentLanes().front()->getID();
222}
223
224
225void
227 if (getParentLanes().empty() || getParentLanes().front() == nullptr) {
228 // may happen during initialization
229 return;
230 }
231 // Get value of option "lefthand"
232 const bool lefthandAttr = hasAttribute(SUMO_ATTR_LEFTHAND) && parse<bool>(getAttribute(SUMO_ATTR_LEFTHAND));
233 const double offsetSign = OptionsCont::getOptions().getBool("lefthand") != lefthandAttr ? -1 : 1;
234
235 // obtain laneShape
236 PositionVector laneShape = getParentLanes().front()->getLaneShape();
237
238 // Move shape to side
239 laneShape.move2side(movingToSide * offsetSign);
240
241 // Cut shape using as delimitators fixed start position and fixed end position
243}
244
245
246double
248 switch (key) {
251 return myStartPosition;
252 } else {
253 return 0;
254 }
255 case SUMO_ATTR_ENDPOS:
257 return myEndPosition;
258 } else {
259 return getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
260 }
261 case SUMO_ATTR_CENTER:
263 default:
264 throw InvalidArgument(getTagStr() + " doesn't have a double attribute of type '" + toString(key) + "'");
265 }
266}
267
268
273
274
275std::string
277 return getTagStr() + ": " + getID();
278}
279
280
281std::string
285
286
287void
288GNEStoppingPlace::drawLines(const GUIVisualizationSettings::Detail d, const std::vector<std::string>& lines, const RGBColor& color) const {
289 // only draw in level 1
291 // calculate middle point
292 const double middlePoint = (myAdditionalGeometry.getShape().length2D() * 0.5);
293 // calculate rotation
294 const double rot = (myAdditionalGeometry.getShape().size() <= 1) ? 0 : myAdditionalGeometry.getShape().rotationDegreeAtOffset(middlePoint);
295 // Iterate over every line
296 for (int i = 0; i < (int)lines.size(); ++i) {
297 // push a new matrix for every line
299 // translate
300 glTranslated(mySymbolPosition.x(), mySymbolPosition.y(), 0);
301 // rotate over lane
303 // draw line with a color depending of the selection status
304 if (drawUsingSelectColor()) {
305 GLHelper::drawText(lines[i].c_str(), Position(1.2, (double)i), .1, 1.f, color, 0, FONS_ALIGN_LEFT);
306 } else {
307 GLHelper::drawText(lines[i].c_str(), Position(1.2, (double)i), .1, 1.f, color, 0, FONS_ALIGN_LEFT);
308 }
309 // pop matrix for every line
311 }
312 }
313}
314
315
316void
318 const RGBColor& baseColor, const RGBColor& signColor, const std::string& word) const {
319 // only draw in level 2
321 // calculate middle point
322 const double middlePoint = (myAdditionalGeometry.getShape().length2D() * 0.5);
323 // calculate rotation
324 const double rotSign = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1;
325 const double rot = (myAdditionalGeometry.getShape().size() <= 1) ? 0 : myAdditionalGeometry.getShape().rotationDegreeAtOffset(middlePoint) - 180. * rotSign;
326 // push matrix
328 // Start drawing sign traslating matrix to signal position
329 glTranslated(mySymbolPosition.x(), mySymbolPosition.y(), 0);
330 // rotate over lane
332 // scale matrix depending of the exaggeration
333 glScaled(exaggeration, exaggeration, 1);
334 // set color
335 GLHelper::setColor(baseColor);
336 // Draw circle
338 // continue depending of rectangle selection
340 // Traslate to front
341 glTranslated(0, 0, .1);
342 // set color
343 GLHelper::setColor(signColor);
344 // draw another circle in the same position, but a little bit more small
346 // draw H depending of detailSettings
348 }
349 // pop draw matrix
351 }
352}
353
354
355void
357 const double width, const double exaggeration, const bool movingGeometryPoints) const {
358 // check if we're calculating the contour or the moving geometry points
359 if (movingGeometryPoints) {
363 }
364 if (movingGeometryPoints && (myEndPosition != INVALID_DOUBLE)) {
367 }
368 } else {
369 // don't exaggerate contour
372 }
373}
374
375
376double
379 // get lane final and shape length
380 const double laneLength = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
381 // get startPosition
382 double fixedPos = myStartPosition;
383 // adjust fixedPos
384 if (fixedPos < 0) {
385 fixedPos += laneLength;
386 }
387 fixedPos *= getParentLanes().front()->getLengthGeometryFactor();
388 // return depending of fixedPos
389 if (fixedPos < 0) {
390 return 0;
391 } else if (fixedPos > (getParentLanes().front()->getLaneShapeLength() - POSITION_EPS)) {
392 return (getParentLanes().front()->getLaneShapeLength() - POSITION_EPS);
393 } else {
394 return fixedPos;
395 }
396 } else {
397 return 0;
398 }
399}
400
401
402double
405 // get lane final and shape length
406 const double laneLength = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
407 // get endPosition
408 double fixedPos = myEndPosition;
409 // adjust fixedPos
410 if (fixedPos < 0) {
411 fixedPos += laneLength;
412 }
413 fixedPos *= getParentLanes().front()->getLengthGeometryFactor();
414 // return depending of fixedPos
415 if (fixedPos < POSITION_EPS) {
416 return POSITION_EPS;
417 } else if (fixedPos > getParentLanes().front()->getLaneShapeLength()) {
418 return getParentLanes().front()->getLaneShapeLength();
419 } else {
420 return fixedPos;
421 }
422 } else {
423 return getParentLanes().front()->getLaneShapeLength();
424 }
425}
426
427
428void
431 // change only start position
432 myStartPosition = moveResult.newFirstPos;
433 // adjust startPos
434 if (myStartPosition > (getAttributeDouble(SUMO_ATTR_ENDPOS) - POSITION_EPS)) {
436 }
438 // change only end position
439 myEndPosition = moveResult.newFirstPos;
440 // adjust endPos
441 if (myEndPosition < (getAttributeDouble(SUMO_ATTR_STARTPOS) + POSITION_EPS)) {
443 }
444 } else {
445 // change both position
446 myStartPosition = moveResult.newFirstPos;
447 myEndPosition = moveResult.newSecondPos;
448 // set lateral offset
450 }
451 // update geometry
453}
454
455
456void
458 // begin change attribute
459 undoList->begin(this, "position of " + getTagStr());
460 // set attributes depending of operation type
462 // set only start position
463 setAttribute(SUMO_ATTR_STARTPOS, toString(moveResult.newFirstPos), undoList);
465 // set only end position
466 setAttribute(SUMO_ATTR_ENDPOS, toString(moveResult.newFirstPos), undoList);
467 } else {
468 // set both
469 setAttribute(SUMO_ATTR_STARTPOS, toString(moveResult.newFirstPos), undoList);
470 setAttribute(SUMO_ATTR_ENDPOS, toString(moveResult.newSecondPos), undoList);
471 // check if lane has to be changed
472 if (moveResult.newFirstLane) {
473 // set new lane
474 setAttribute(SUMO_ATTR_LANE, moveResult.newFirstLane->getID(), undoList);
475 }
476 }
477 // end change attribute
478 undoList->end();
479}
480
481/****************************************************************************/
@ NETWORK_MOVE
mode for moving network elements
GUIGlObjectType
GUIViewObjectsHandler gViewObjectsHandler
#define TL(string)
Definition MsgHandler.h:315
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_LANE
begin/end of the description of a single lane
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_STARTPOS
@ SUMO_ATTR_LANE
@ SUMO_ATTR_ENDPOS
@ SUMO_ATTR_LEFTHAND
@ SUMO_ATTR_CENTER
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
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, const int align=0, double width=-1)
Definition GLHelper.cpp:756
static void fixLaneDoublePosition(double &from, double &to, const double laneLengt)
fix the given positions over lane
static bool checkLaneDoublePosition(double from, const double to, const double laneLength, const bool friendlyPos)
check if the given positions over a lane is valid
An Element which don't belong to GNENet but has influence in the simulation.
GNEContour myAdditionalContour
variable used for draw additional contours
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
bool drawMovingGeometryPoints(const bool ignoreShift) const
check if draw additional extrem geometry points
const std::string getID() const
get ID (all Attribute Carriers have one)
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
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
bool hasAttribute(SumoXMLAttr key) const
GNENet * myNet
pointer to net
void calculateContourLastGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for last geometry point
void calculateContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const
calculate contour extruded (used in elements formed by a central shape)
void calculateContourCircleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double layer, const double scale) const
calculate contour (circle elements)
void calculateContourFirstGeometryPoint(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale) const
calculate contour for first geometry point
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
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
const GNEMoveOperation::OperationType operationType
move operation
double firstLaneOffset
lane offset
double newSecondPos
new second position
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2147
void fixAdditionalProblem()
fix additional problem (must be reimplemented in all detector children)
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
double getStartGeometryPositionOverLane() const
get start position over lane that is applicable to the shape
virtual double getAttributeDouble(SumoXMLAttr key) const
GNEMoveOperation * getMoveOperation()
get move operation
Position getPositionInView() const
Returns position of additional in view.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
bool checkDrawMoveContour() const
check if draw move contour (red)
void drawSign(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const RGBColor &baseColor, const RGBColor &signColor, const std::string &word) const
draw sign
~GNEStoppingPlace()
Destructor.
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
const Parameterised::Map & getACParametersMap() const
get parameters map
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
void calculateStoppingPlaceContour(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double width, const double exaggeration, const bool movingGeometryPoints) const
check object in view
virtual void updateGeometry()=0
update pre-computed geometry information
bool myFriendlyPosition
Flag for friendly position.
void drawLines(const GUIVisualizationSettings::Detail d, const std::vector< std::string > &lines, const RGBColor &color) const
draw lines
std::string getAdditionalProblem() const
return a string with the current additional problem (must be reimplemented in all detector children)
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
GNEStoppingPlace(const std::string &id, GNENet *net, GUIGlObjectType type, SumoXMLTag tag, FXIcon *icon, GNELane *lane, const double startPos, const double endPos, const std::string &name, bool friendlyPosition, const Parameterised::Map &parameters)
Constructor.
Position mySymbolPosition
The position of the sign.
bool isAdditionalValid() const
check if current additional is valid to be written into XML (must be reimplemented in all detector ch...
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes
void setStoppingPlaceGeometry(double movingToSide)
set geometry common to all stopping places
double myEndPosition
The position this stopping place is located at (-1 means empty)
GNEContour mySymbolContour
circle contour
std::string getParentName() const
Returns the name of the parent object (if any)
virtual std::string getAttribute(SumoXMLAttr key) const =0
double myStartPosition
The relative start position this stopping place is located at (-1 means empty)
double getEndGeometryPositionOverLane() const
get end position over lane that is applicable to the shape
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
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
bool isCurrentlyMovingElements() const
check if an element is being moved
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
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
GNEMoveFrame * getMoveFrame() const
get frame for move elements
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
const PositionVector & getShape() const
The shape of the additional element.
void updateGeometry(const PositionVector &shape)
update entire geometry
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
const std::vector< int > & getSelectedGeometryPoints(const GUIGlObject *GLObject) const
get geometry points for the given glObject
Stores the information about how to visualize structures.
GUIVisualizationStoppingPlaceSettings stoppingPlaceSettings
StoppingPlace settings.
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
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 y() const
Returns the y-position.
Definition Position.h:60
A list of positions.
double length2D() const
Returns the length.
Position getPolygonCenter() const
Returns the arithmetic of all corner points.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
void move2side(double amount, double maxExtension=100)
move position vector to side using certain amount
@ FONS_ALIGN_LEFT
Definition fontstash.h:42
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
static const double additionalGeometryPointRadius
moving additional geometry point radius
static const double symbolInternalRadius
symbol internal radius
static const double symbolExternalRadius
symbol external radius
static const double symbolInternalTextSize
symbol internal text size