Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEStopPlan.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-2025 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// Representation of Stops in netedit
19/****************************************************************************/
20
21#include <netedit/GNENet.h>
22#include <netedit/GNEUndoList.h>
23#include <netedit/GNEViewNet.h>
30
31#include "GNEStopPlan.h"
32
33
34// ===========================================================================
35// member method definitions
36// ===========================================================================
37#ifdef _MSC_VER
38#pragma warning(push)
39#pragma warning(disable: 4355) // mask warning about "this" in initializers
40#endif
42 GNEDemandElement("", net, "", tag, GNEPathElement::Options::DEMAND_ELEMENT),
43 GNEDemandElementPlan(this, -1, -1) {
44}
45
46
47GNEStopPlan::GNEStopPlan(SumoXMLTag tag, GNEDemandElement* personParent, const GNEPlanParents& planParameters,
48 const double endPos, const SUMOTime duration, const SUMOTime until, const std::string& actType,
49 bool friendlyPos, const int parameterSet) :
50 GNEDemandElement(personParent, tag, GNEPathElement::Options::DEMAND_ELEMENT),
51 GNEDemandElementPlan(this, -1, endPos),
52 myDuration(duration),
53 myUntil(until),
54 myActType(actType),
55 myFriendlyPos(friendlyPos),
56 myParametersSet(parameterSet) {
57 // set parents
58 setParents<GNEJunction*>(planParameters.getJunctions());
59 setParents<GNEEdge*>(planParameters.getEdges());
60 setParents<GNEAdditional*>(planParameters.getAdditionalElements());
61 setParents<GNEDemandElement*>(planParameters.getDemandElements(personParent));
62 // update centering boundary without updating grid
64}
65#ifdef _MSC_VER
66#pragma warning(pop)
67#endif
68
69
71
72
77
78
79void
98
99
104
105
106std::string
110
111
112void
114 // currently the only solution is removing stop
115}
116
117
120 return SVC_PASSENGER;
121}
122
123
124const RGBColor&
128
129
130void
132 const auto& viewSettings = myNet->getViewNet()->getVisualisationSettings();
133 PositionVector shape;
134 // update geometry depending of parent
135 if (getParentAdditionals().size() > 0) {
136 const double stopWidth = (getParentAdditionals().front()->getTagProperty()->getTag() == SUMO_TAG_BUS_STOP) ?
137 viewSettings.stoppingPlaceSettings.busStopWidth : viewSettings.stoppingPlaceSettings.trainStopWidth;
138 // get busStop shape
139 const PositionVector& busStopShape = getParentAdditionals().front()->getAdditionalGeometry().getShape();
140 PositionVector shapeA = {busStopShape[-1], busStopShape[-2]};
141 PositionVector shapeB = {busStopShape[-1], busStopShape[-2]};
144 shape = {shapeA.positionAtOffset2D(stopWidth), shapeB.positionAtOffset2D(stopWidth)};
145 } else if (getParentEdges().size() > 0) {
146 // get front and back lane
147 const GNELane* frontLane = getParentEdges().front()->getChildLanes().front();
148 const GNELane* backLane = getParentEdges().front()->getChildLanes().back();
149 // calculate front position
151 frontLane->getDrawingConstants()->getDrawingWidth());
152 // calulate length between both shapes
153 const double length = backLane->getLaneShape().distance2D(frontPosition, true);
154 // calculate back position
156 (length + backLane->getDrawingConstants()->getDrawingWidth() - frontLane->getDrawingConstants()->getDrawingWidth()) * -1);
157 // update demand element geometry using both positions
158 shape = {frontPosition, backPosition};
159 }
160 // extrapolate for sign
161 shape.extrapolate(0.1, true);
163 shape.extrapolate(viewSettings.additionalSettings.stopEdgeSize - 0.1, true);
164 mySignPosition = shape.front();
165}
166
167
172
173
174std::string
176 return getParentDemandElements().front()->getID();
177}
178
179
180double
184
185
190
191
192void
193GNEStopPlan::splitEdgeGeometry(const double /*splitPosition*/, const GNENetworkElement* /*originalElement*/, const GNENetworkElement* /*newElement*/, GNEUndoList* /*undoList*/) {
194 // geometry of this element cannot be splitted
195}
196
197
198void
200 // check if stop can be draw
201 if ((getTagProperty()->isPlanStopPerson() && checkDrawPersonPlan()) ||
202 (getTagProperty()->isPlanStopContainer() && checkDrawContainerPlan())) {
203 // Obtain exaggeration of the draw
204 const double exaggeration = getExaggeration(s);
205 // get detail level
206 const auto d = s.getDetailLevel(exaggeration);
207 // draw geometry only if we'rent in drawForObjectUnderCursor mode
209 // declare stop color
211 // Add layer matrix matrix
213 // translate to front
215 // declare stop color
216 // declare central line color
217 const RGBColor centralLineColor = drawUsingSelectColor() ? stopColor.changedBrightness(-32) : RGBColor::WHITE;
218 // set base color
219 GLHelper::setColor(stopColor);
220 // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration
222 // move to front
223 glTranslated(0, 0, .1);
224 // set central color
225 GLHelper::setColor(centralLineColor);
226 // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration
227 GUIGeometry::drawGeometry(d, myDemandElementGeometry, 0.05 * exaggeration);
228 // move to icon position and front
229 glTranslated(mySignPosition.x(), mySignPosition.y(), .1);
230 // rotate over lane
232 // draw icon depending of detail level
234 // set color
235 glColor3d(1, 1, 1);
236 // rotate texture
237 glRotated(180, 0, 0, 1);
238 // draw texture
239 if (drawUsingSelectColor()) {
241 } else {
243 }
244 } else {
245 // set stop color
246 GLHelper::setColor(stopColor);
247 // draw filled circle
249 }
250 // pop layer matrix
252 // draw lock icon
254 // draw dotted contour
257 }
258 // calculate contour and draw dotted geometry
259 if (getParentLanes().size() > 0) {
260 myStopContour.calculateContourExtrudedShape(s, d, this, myDemandElementGeometry.getShape(), getType(), 0.3, exaggeration, false, true, 0, nullptr, getParentLanes().front()->getParentEdge());
261 myStopSignContour.calculateContourCircleShape(s, d, this, mySignPosition, s.additionalSettings.stopEdgeSize, getType(), exaggeration, getParentLanes().front()->getParentEdge());
262 } else if (getParentEdges().size() > 0) {
263 myStopContour.calculateContourExtrudedShape(s, d, this, myDemandElementGeometry.getShape(), getType(), 0.3, exaggeration, false, true, 0, nullptr, getParentEdges().front());
265 } else {
266 myStopContour.calculateContourExtrudedShape(s, d, this, myDemandElementGeometry.getShape(), getType(), 0.3, exaggeration, false, true, 0, nullptr, getParentAdditionals().front());
268 }
269 }
270 // check if draw plan parent
271 if (getParentDemandElements().at(0)->getPreviousChildDemandElement(this) == nullptr) {
272 getParentDemandElements().at(0)->drawGL(s);
273 }
274}
275
276
277void
279 // only update geometry
281}
282
283
284void
285GNEStopPlan::drawLanePartialGL(const GUIVisualizationSettings& /*s*/, const GNESegment* /*segment*/, const double /*offsetFront*/) const {
286 // Stops don't use drawJunctionPartialGL
287}
288
289
290void
291GNEStopPlan::drawJunctionPartialGL(const GUIVisualizationSettings& /*s*/, const GNESegment* /*segment*/, const double /*offsetFront*/) const {
292 // Stops don't use drawJunctionPartialGL
293}
294
295
296GNELane*
300
301
302GNELane*
306
307
308std::string
310 switch (key) {
312 if (isAttributeEnabled(key)) {
313 return time2string(myDuration);
314 } else {
315 return "";
316 }
317 case SUMO_ATTR_UNTIL:
318 if (isAttributeEnabled(key)) {
319 return time2string(myUntil);
320 } else {
321 return "";
322 }
324 return myActType;
326 return toString(myFriendlyPos);
327 default:
328 return getPlanAttribute(key);
329 }
330}
331
332
333double
337
338
343
344
345void
346GNEStopPlan::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
347 switch (key) {
349 case SUMO_ATTR_UNTIL:
352 GNEChange_Attribute::changeAttribute(this, key, value, undoList);
353 break;
354 default:
355 setPlanAttribute(key, value, undoList);
356 break;
357 }
358}
359
360
361bool
362GNEStopPlan::isValid(SumoXMLAttr key, const std::string& value) {
363 switch (key) {
365 case SUMO_ATTR_UNTIL:
366 if (canParse<SUMOTime>(value)) {
367 return parse<SUMOTime>(value) >= 0;
368 } else {
369 return false;
370 }
372 return true;
374 return canParse<bool>(value);
375 default:
376 return isPlanValid(key, value);
377 }
378}
379
380
381void
383 switch (key) {
385 case SUMO_ATTR_UNTIL:
386 undoList->add(new GNEChange_ToggleAttribute(this, key, true), true);
387 break;
388 default:
389 throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
390 }
391}
392
393
394void
396 switch (key) {
398 case SUMO_ATTR_UNTIL:
399 undoList->add(new GNEChange_ToggleAttribute(this, key, false), true);
400 break;
401 default:
402 throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
403 }
404}
405
406
407bool
409 switch (key) {
411 return (myParametersSet & STOP_DURATION_SET) != 0;
412 case SUMO_ATTR_UNTIL:
413 return (myParametersSet & STOP_UNTIL_SET) != 0;
414 default:
415 return isPlanAttributeEnabled(key);
416 }
417}
418
419
420std::string
422 return getTagStr();
423}
424
425
426std::string
430
431
436
437// ===========================================================================
438// private
439// ===========================================================================
440
441void
442GNEStopPlan::setAttribute(SumoXMLAttr key, const std::string& value) {
443 switch (key) {
445 if (value.empty()) {
446 toggleAttribute(key, false);
447 } else {
448 toggleAttribute(key, true);
449 myDuration = string2time(value);
450 }
451 break;
452 case SUMO_ATTR_UNTIL:
453 if (value.empty()) {
454 toggleAttribute(key, false);
455 } else {
456 toggleAttribute(key, true);
457 myUntil = string2time(value);
458 }
459 break;
461 myActType = value;
462 break;
464 myFriendlyPos = parse<bool>(value);
465 break;
466 default:
467 setPlanAttribute(key, value);
468 break;
469 }
470}
471
472
473void
475 switch (key) {
477 if (value) {
479 } else {
480 myParametersSet &= ~STOP_DURATION_SET;
481 }
482 break;
483 case SUMO_ATTR_UNTIL:
484 if (value) {
486 } else {
487 myParametersSet &= ~STOP_UNTIL_SET;
488 }
489 break;
490 default:
491 throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
492 }
493}
494
495
496void
498 // change endPos
499 myArrivalPosition = moveResult.newFirstPos;
500 // update geometry
502}
503
504
505void
507 undoList->begin(this, "endPos of " + getTagStr());
508 // now adjust start position
509 setAttribute(SUMO_ATTR_ENDPOS, toString(moveResult.newFirstPos), undoList);
510 undoList->end();
511}
512
513/****************************************************************************/
long long int SUMOTime
Definition GUI.h:36
@ STOPPERSON_SELECTED
#define DEG2RAD(x)
Definition GeomHelper.h:35
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
Definition SUMOTime.cpp:46
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition SUMOTime.cpp:91
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
const int STOP_DURATION_SET
const int STOP_UNTIL_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_STOP
stop for vehicles
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_ENDPOS
@ SUMO_ATTR_ACTTYPE
@ SUMO_ATTR_FRIENDLY_POS
@ GNE_ATTR_PLAN_GEOMETRY_ENDPOS
person/container geometry end position
@ SUMO_ATTR_UNTIL
@ SUMO_ATTR_DURATION
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition GLHelper.cpp:649
static void popMatrix()
pop matrix
Definition GLHelper.cpp:131
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:534
static void pushMatrix()
push matrix
Definition GLHelper.cpp:118
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
const std::string & getTagStr() const
get tag assigned to this object in string format
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
friend class GNEChange_ToggleAttribute
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
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 GNESegment *segment, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) 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 GUIGlObject *boundaryParent) const
calculate contour (circle elements)
bool drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
GUIGeometry myDemandElementGeometry
demand element geometry (also called "stacked geometry")
Problem
enum class for demandElement problems
GNEDemandElement * getPreviousChildDemandElement(const GNEDemandElement *demandElement) const
get previous child demand element to the given demand element
bool isPlanValid(SumoXMLAttr key, const std::string &value)
check if plan attribute is valid
Boundary getPlanCenteringBoundary() const
get plan centering boundary
Position getPlanPositionInView() const
Returns position of additional in view.
std::string getPersonPlanProblem() const
get plan problem
Position getPlanAttributePosition(SumoXMLAttr key) const
get plan attribute position
GNEDemandElement::Problem isPlanPersonValid() const
check if plan is valid
std::string getPlanHierarchyName() const
get plan Hierarchy Name (Used in AC Hierarchy)
void writeLocationAttributes(OutputDevice &device) const
write plan element common attributes
bool checkDrawPersonPlan() const
check if person plan can be drawn
GNEMoveOperation * getPlanMoveOperation()
get move operation
double getPlanAttributeDouble(SumoXMLAttr key) const
get plan attribute double
void setPlanAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
set plan attribute
double myArrivalPosition
arrival position (used in all plans over edges)
std::string getPlanAttribute(SumoXMLAttr key) const
get plan attribute string
bool isPlanAttributeEnabled(SumoXMLAttr key) const
check if plan attribute is enabled
bool checkDrawContainerPlan() const
check if container plan can be drawn
GNELane * getLastPlanPathLane() const
get last plan path lane
void updatePlanCenteringBoundary(const bool updateGrid)
update plan centering boundary
GNELane * getFirstPlanPathLane() const
get first plan path lane
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const GNEHierarchicalContainerParents< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const GNEHierarchicalContainerParents< GNEEdge * > & getParentEdges() const
get parent edges
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const GNEHierarchicalContainerParents< GNELane * > & getParentLanes() const
get parent lanes
double getDrawingWidth() const
get lane drawing width
Definition GNELane.cpp:127
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
const PositionVector & getLaneShape() const
get elements shape
Definition GNELane.cpp:221
const DrawingConstants * getDrawingConstants() const
get lane drawing constants (previously calculated in drawGL())
Definition GNELane.cpp:243
move operation
move result
double newFirstPos
new first position
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2193
GNEPlanParents (used for group all plan parents)
std::vector< GNEDemandElement * > getDemandElements(GNEDemandElement *parent) const
get demand elements (used in plan constructors)
std::vector< GNEAdditional * > getAdditionalElements() const
get additionalElements (used in plan constructors)
std::vector< GNEEdge * > getEdges() const
get edges (used in plan constructors)
std::vector< GNEJunction * > getJunctions() const
get junctions (used in plan constructors)
GNEContour myStopContour
variable used for draw contours
GNEStopPlan(SumoXMLTag tag, GNENet *net)
default constructor
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
bool isAttributeEnabled(SumoXMLAttr key) const
std::string getParentName() const
Returns the name of the parent object.
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over lane.
SUMOTime myDuration
duration
GNEContour myStopSignContour
variable used for draw sign contours
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
bool myFriendlyPos
friendly pos
void toggleAttribute(SumoXMLAttr key, const bool value)
method for enable or disable the attribute and nothing else (used in GNEChange_ToggleAttribute)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform demand element changes
SUMOVehicleClass getVClass() const
obtain VClass related with this demand element
void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
GNEMoveOperation * getMoveOperation()
get move operation
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
SUMOTime myUntil
until
Problem isDemandElementValid() const
check if current demand element is valid to be written into XML (by default true, can be reimplemente...
GNELane * getLastPathLane() const
get last path lane
void updateGeometry()
update pre-computed geometry information
void computePathElement()
compute pathElement
Position mySignPosition
sign position
double getAttributeDouble(SumoXMLAttr key) const
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
void fixDemandElementProblem()
fix demand element problem (by default throw an exception, has to be reimplemented in children)
const Parameterised::Map & getACParametersMap() const
get parameters map
std::string getDemandElementProblem() const
return a string with the current demand element problem (by default empty, can be reimplemented in ch...
std::string myActType
act type
Position getPositionInView() const
Returns position of demand element in view.
GNELane * getFirstPathLane() const
get first path lane
void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
~GNEStopPlan()
destructor
const RGBColor & getColor() const
get color
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
void writeDemandElement(OutputDevice &device) const
write demand element element into a xml file
Position getAttributePosition(SumoXMLAttr key) const
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
int myParametersSet
parameter set
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over junction.
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 add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
static void drawGeometry(const GUIVisualizationSettings::Detail d, const GUIGeometry &geometry, const double width, double offset=0)
draw geometry
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 GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
Stores the information about how to visualize structures.
GUIVisualizationSizeSettings addSize
bool checkDrawAdditional(Detail d, const bool selected) const
check if draw additionals
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
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:52
double y() const
Returns the y-position.
Definition Position.h:57
A list of positions.
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)
void extrapolate(const double val, const bool onlyFirst=false, const bool onlyLast=false)
extrapolate position vector
void rotateAroundFirstElement2D(double angle)
Position positionAtOffset2D(double pos, double lateralOffset=0, bool extrapolateBeyond=false) const
Returns the position at the given length.
static const RGBColor WHITE
Definition RGBColor.h:195
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
Definition RGBColor.cpp:200
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
static const double stopEdgeSize
stopEdges size
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, stopPersons...)
RGBColor stopPersonColor
color for stopPersons
static const double segmentWidthSmall
width of small dotted contour segments
static const double segmentWidth
width of dotted contour segments
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values