Eclipse SUMO - Simulation of Urban MObility
GNEContainerStop.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 // A lane area vehicles can halt at (GNE version)
15 /****************************************************************************/
16 
17 // ===========================================================================
18 // included modules
19 // ===========================================================================
20 
22 #include <netedit/GNENet.h>
23 #include <netedit/GNEUndoList.h>
24 #include <netedit/GNEViewNet.h>
29 #include <utils/gui/div/GLHelper.h>
33 
34 #include "GNEContainerStop.h"
35 
36 // ===========================================================================
37 // method definitions
38 // ===========================================================================
39 
40 GNEContainerStop::GNEContainerStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const double startPos, const double endPos, const int parametersSet,
41  const std::string& name, const std::vector<std::string>& lines, bool friendlyPosition, bool blockMovement) :
42  GNEStoppingPlace(id, viewNet, GLO_CONTAINER_STOP, SUMO_TAG_CONTAINER_STOP, lane, startPos, endPos, parametersSet, name, friendlyPosition, blockMovement),
43  myLines(lines) {
44 }
45 
46 
48 
49 
50 void
52  // Get value of option "lefthand"
53  double offsetSign = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1;
54 
55  // Update common geometry of stopping place
56  setStoppingPlaceGeometry(getParentLanes().front()->getParentEdge()->getNBEdge()->getLaneWidth(getParentLanes().front()->getIndex()) / 2);
57 
58  // Obtain a copy of the shape
60 
61  // Move shape to side
62  tmpShape.move2side(1.5 * offsetSign);
63 
64  // Get position of the sign
65  mySignPos = tmpShape.getLineCenter();
66 
67  // Set block icon position
69 
70  // Set block icon rotation, and using their rotation for sign
72 }
73 
74 
78 }
79 
80 
81 void
83  // Obtain exaggeration of the draw
84  const double exaggeration = s.addSize.getExaggeration(s, this);
85  // first check if additional has to be drawn
86  if (s.drawAdditionals(exaggeration)) {
87  // Start drawing adding an gl identificator
88  glPushName(getGlID());
89  // Add a draw matrix
90  glPushMatrix();
91  // Start with the drawing of the area traslating matrix to origin
92  glTranslated(0, 0, getType());
93  // Set color of the base
94  if (drawUsingSelectColor()) {
96  } else {
98  }
99  // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration
101  // Check if the distance is enought to draw details and if is being drawn for selecting
103  // only draw circle depending of distance between sign and mouse cursor
105  // Add a draw matrix for details
106  glPushMatrix();
107  // Start drawing sign traslating matrix to signal position
108  glTranslated(mySignPos.x(), mySignPos.y(), 0);
109  // scale matrix depending of the exaggeration
110  glScaled(exaggeration, exaggeration, 1);
111  // set color
113  // Draw circle
115  // pop draw matrix
116  glPopMatrix();
117  }
118  } else if (s.drawDetail(s.detailSettings.stoppingPlaceDetails, exaggeration)) {
119  // Add a draw matrix for details
120  glPushMatrix();
121  // Iterate over every line
122  for (int i = 0; i < (int)myLines.size(); ++i) {
123  // push a new matrix for every line
124  glPushMatrix();
125  // Rotate and traslaste
126  glTranslated(mySignPos.x(), mySignPos.y(), 0);
127  glRotated(-1 * myBlockIcon.rotation, 0, 0, 1);
128  // draw line with a color depending of the selection status
129  if (drawUsingSelectColor()) {
130  GLHelper::drawText(myLines[i].c_str(), Position(1.2, (double)i), .1, 1.f, s.colorSettings.selectionColor, 0, FONS_ALIGN_LEFT);
131  } else {
132  GLHelper::drawText(myLines[i].c_str(), Position(1.2, (double)i), .1, 1.f, s.colorSettings.containerStop, 0, FONS_ALIGN_LEFT);
133  }
134  // pop matrix for every line
135  glPopMatrix();
136  }
137  // Start drawing sign traslating matrix to signal position
138  glTranslated(mySignPos.x(), mySignPos.y(), 0);
139  // scale matrix depending of the exaggeration
140  glScaled(exaggeration, exaggeration, 1);
141  // Set color of the externe circle
142  if (drawUsingSelectColor()) {
144  } else {
146  }
147  // Draw circle
149  // Traslate to front
150  glTranslated(0, 0, .1);
151  // Set color of the inner circle
152  if (drawUsingSelectColor()) {
154  } else {
156  }
157  // draw another circle in the same position, but a little bit more small
159  // draw text depending of detail settings
160  if (s.drawDetail(s.detailSettings.stoppingPlaceText, exaggeration)) {
161  if (drawUsingSelectColor()) {
163  } else {
165  }
166  }
167  // pop draw matrix
168  glPopMatrix();
169  // Show Lock icon depending of the Edit mode
170  myBlockIcon.drawIcon(s, exaggeration);
171  }
172  // pop draw matrix
173  glPopMatrix();
174  // Draw name if isn't being drawn for selecting
175  if (!s.drawForRectangleSelection) {
177  }
178  // check if dotted contour has to be drawn
179  if (myViewNet->getDottedAC() == this) {
181  }
182  // Pop name
183  glPopName();
184  // draw child demand elements
185  for (const auto& i : getChildDemandElements()) {
186  if (!i->getTagProperty().isPlacedInRTree()) {
187  i->drawGL(s);
188  }
189  }
190  }
191 }
192 
193 
194 std::string
196  switch (key) {
197  case SUMO_ATTR_ID:
198  return getAdditionalID();
199  case SUMO_ATTR_LANE:
200  return getParentLanes().front()->getID();
201  case SUMO_ATTR_STARTPOS:
203  return toString(myStartPosition);
204  } else {
205  return "";
206  }
207  case SUMO_ATTR_ENDPOS:
209  return toString(myEndPosition);
210  } else {
211  return "";
212  }
213  case SUMO_ATTR_NAME:
214  return myAdditionalName;
217  case SUMO_ATTR_LINES:
218  return joinToString(myLines, " ");
220  return toString(myBlockMovement);
221  case GNE_ATTR_SELECTED:
223  case GNE_ATTR_PARAMETERS:
224  return getParametersStr();
225  default:
226  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
227  }
228 }
229 
230 
231 void
232 GNEContainerStop::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
233  if (value == getAttribute(key)) {
234  return; //avoid needless changes, later logic relies on the fact that attributes have changed
235  }
236  switch (key) {
237  case SUMO_ATTR_ID:
238  case SUMO_ATTR_LANE:
239  case SUMO_ATTR_STARTPOS:
240  case SUMO_ATTR_ENDPOS:
241  case SUMO_ATTR_NAME:
243  case SUMO_ATTR_LINES:
245  case GNE_ATTR_SELECTED:
246  case GNE_ATTR_PARAMETERS:
247  undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value));
248  break;
249  default:
250  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
251  }
252 }
253 
254 
255 bool
256 GNEContainerStop::isValid(SumoXMLAttr key, const std::string& value) {
257  switch (key) {
258  case SUMO_ATTR_ID:
259  return isValidAdditionalID(value);
260  case SUMO_ATTR_LANE:
261  if (myViewNet->getNet()->retrieveLane(value, false) != nullptr) {
262  return true;
263  } else {
264  return false;
265  }
266  case SUMO_ATTR_STARTPOS:
267  if (value.empty()) {
268  return true;
269  } else if (canParse<double>(value)) {
270  return SUMORouteHandler::isStopPosValid(parse<double>(value), myEndPosition, getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength(), POSITION_EPS, myFriendlyPosition);
271  } else {
272  return false;
273  }
274  case SUMO_ATTR_ENDPOS:
275  if (value.empty()) {
276  return true;
277  } else if (canParse<double>(value)) {
278  return SUMORouteHandler::isStopPosValid(myStartPosition, parse<double>(value), getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength(), POSITION_EPS, myFriendlyPosition);
279  } else {
280  return false;
281  }
282  case SUMO_ATTR_NAME:
285  return canParse<bool>(value);
286  case SUMO_ATTR_LINES:
287  return canParse<std::vector<std::string> >(value);
289  return canParse<bool>(value);
290  case GNE_ATTR_SELECTED:
291  return canParse<bool>(value);
292  case GNE_ATTR_PARAMETERS:
293  return Parameterised::areParametersValid(value);
294  default:
295  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
296  }
297 }
298 
299 // ===========================================================================
300 // private
301 // ===========================================================================
302 
303 void
304 GNEContainerStop::setAttribute(SumoXMLAttr key, const std::string& value) {
305  switch (key) {
306  case SUMO_ATTR_ID:
307  changeAdditionalID(value);
308  break;
309  case SUMO_ATTR_LANE:
310  replaceParentLanes(this, value);
311  break;
312  case SUMO_ATTR_STARTPOS:
313  if (!value.empty()) {
314  myStartPosition = parse<double>(value);
316  } else {
318  }
319  break;
320  case SUMO_ATTR_ENDPOS:
321  if (!value.empty()) {
322  myEndPosition = parse<double>(value);
324  } else {
326  }
327  break;
328  case SUMO_ATTR_NAME:
329  myAdditionalName = value;
330  break;
332  myFriendlyPosition = parse<bool>(value);
333  break;
334  case SUMO_ATTR_LINES:
335  myLines = GNEAttributeCarrier::parse<std::vector<std::string> >(value);
336  break;
338  myBlockMovement = parse<bool>(value);
339  break;
340  case GNE_ATTR_SELECTED:
341  if (parse<bool>(value)) {
343  } else {
345  }
346  break;
347  case GNE_ATTR_PARAMETERS:
348  setParametersStr(value);
349  break;
350  default:
351  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
352  }
353 }
354 
355 /****************************************************************************/
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:180
SUMOXMLDefinitions::isValidAttribute
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
Definition: SUMOXMLDefinitions.cpp:995
GNEAdditional::BlockIcon::position
Position position
position of the block icon
Definition: GNEAdditional.h:318
GNEStoppingPlace::myStartPosition
double myStartPosition
The relative start position this stopping place is located at (optional, if empty takes 0)
Definition: GNEStoppingPlace.h:159
Parameterised::getParametersStr
std::string getParametersStr() const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
Definition: Parameterised.cpp:112
GNEAdditional::getAdditionalID
const std::string & getAdditionalID() const
Definition: GNEAdditional.cpp:476
GUIVisualizationDetailSettings::stoppingPlaceDetails
static const double stoppingPlaceDetails
details for stopping places
Definition: GUIVisualizationSettings.h:298
GNEHierarchicalChildElements::getChildDemandElements
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
Definition: GNEHierarchicalChildElements.cpp:296
GNEAdditional::BlockIcon::setRotation
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry() function)
Definition: GNEAdditional.cpp:400
GUIGlObject::drawName
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Definition: GUIGlObject.cpp:354
GUIVisualizationSettings::drawForRectangleSelection
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
Definition: GUIVisualizationSettings.h:647
OptionsCont.h
GNEContainerStop::GNEContainerStop
GNEContainerStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, const double startPos, const double endPos, const int parametersSet, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Constructor.
Definition: GNEContainerStop.cpp:40
GNEContainerStop::setAttribute
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
Definition: GNEContainerStop.cpp:232
SUMO_TAG_CONTAINER_STOP
@ SUMO_TAG_CONTAINER_STOP
A container stop.
Definition: SUMOXMLDefinitions.h:105
GNEStoppingPlace::mySignPos
Position mySignPos
The position of the sign.
Definition: GNEStoppingPlace.h:171
GNEContainerStop::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNEContainerStop.cpp:82
SUMO_ATTR_LINES
@ SUMO_ATTR_LINES
Definition: SUMOXMLDefinitions.h:776
FONS_ALIGN_LEFT
@ FONS_ALIGN_LEFT
Definition: fontstash.h:42
OptionsCont::getBool
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
Definition: OptionsCont.cpp:222
GNEHierarchicalParentElements::getParentLanes
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
Definition: GNEHierarchicalParentElements.cpp:235
STOPPINGPLACE_STARTPOS_SET
const int STOPPINGPLACE_STARTPOS_SET
Definition: GNEStoppingPlace.h:29
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:57
GNEViewNet
Definition: GNEViewNet.h:42
SUMO_ATTR_ID
@ SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:378
GLHelper.h
SUMO_ATTR_LANE
@ SUMO_ATTR_LANE
Definition: SUMOXMLDefinitions.h:637
SUMO_ATTR_ENDPOS
@ SUMO_ATTR_ENDPOS
Definition: SUMOXMLDefinitions.h:798
STOPPINGPLACE_ENDPOS_SET
const int STOPPINGPLACE_ENDPOS_SET
Definition: GNEStoppingPlace.h:30
GNEAdditional::changeAdditionalID
void changeAdditionalID(const std::string &newID)
change ID of additional
Definition: GNEAdditional.cpp:502
GUIVisualizationColorSettings::containerStop
static const RGBColor containerStop
color for containerStops
Definition: GUIVisualizationSettings.h:180
PositionVector
A list of positions.
Definition: PositionVector.h:45
GNEAdditional::unselectAttributeCarrier
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
Definition: GNEAdditional.cpp:532
GNEAdditional::myBlockIcon
BlockIcon myBlockIcon
variable BlockIcon
Definition: GNEAdditional.h:353
GNEContainerStop::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GNEContainerStop.cpp:76
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:621
PositionVector::getBoxBoundary
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
Definition: PositionVector.cpp:390
GNEStoppingPlace::myCircleInWidth
static const double myCircleInWidth
inner circle width resolution for all stopping places
Definition: GNEStoppingPlace.h:180
GNEAdditional::myViewNet
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
Definition: GNEAdditional.h:335
GNEStoppingPlace::myParametersSet
int myParametersSet
Variable used for set/unset start/endPositions.
Definition: GNEStoppingPlace.h:165
GNEAttributeCarrier::GNEChange_Attribute
friend class GNEChange_Attribute
declare friend class
Definition: GNEAttributeCarrier.h:57
GNEUndoList::p_add
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
Definition: GNEUndoList.cpp:131
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:1014
GLHelper::drawFilledCircle
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
Definition: GLHelper.cpp:348
GNEAdditional::isAttributeCarrierSelected
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
Definition: GNEAdditional.cpp:548
GUIVisualizationColorSettings::containerStop_sign
static const RGBColor containerStop_sign
color for containerStop signs
Definition: GUIVisualizationSettings.h:183
GLHelper::drawText
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, int align=0, double width=-1)
Definition: GLHelper.cpp:673
GNEStoppingPlace::myFriendlyPosition
bool myFriendlyPosition
Flag for friendly position.
Definition: GNEStoppingPlace.h:168
GUIVisualizationSettings::addName
GUIVisualizationTextSettings addName
Definition: GUIVisualizationSettings.h:591
GNEStoppingPlace::getPositionInView
Position getPositionInView() const
Returns position of additional in view.
Definition: GNEStoppingPlace.cpp:140
GUIVisualizationSettings::detailSettings
GUIVisualizationDetailSettings detailSettings
detail settings
Definition: GUIVisualizationSettings.h:683
SUMO_ATTR_STARTPOS
@ SUMO_ATTR_STARTPOS
Definition: SUMOXMLDefinitions.h:797
GUIVisualizationColorSettings::selectedAdditionalColor
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
Definition: GUIVisualizationSettings.h:147
GNEGeometry::Geometry::getShape
const PositionVector & getShape() const
The shape of the additional element.
Definition: GNEGeometry.cpp:147
GNEContainerStop::isValid
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
Definition: GNEContainerStop.cpp:256
GNEStoppingPlace
Definition: GNEStoppingPlace.h:39
GNEStoppingPlace::myCircleWidthSquared
static const double myCircleWidthSquared
squared circle width resolution for all stopping places
Definition: GNEStoppingPlace.h:177
GNEDemandElement.h
GNEAdditional::selectAttributeCarrier
void selectAttributeCarrier(bool changeFlag=true)
Definition: GNEAdditional.cpp:517
GNEStoppingPlace::setStoppingPlaceGeometry
void setStoppingPlaceGeometry(double movingToSide)
set geometry common to all stopping places
Definition: GNEStoppingPlace.cpp:286
GNEViewNet.h
GUIGlObject::getGlID
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.cpp:149
GNEViewNet::getDottedAC
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
Definition: GNEViewNet.cpp:1026
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GNEHierarchicalParentElements::replaceParentLanes
void replaceParentLanes(GNEShape *elementChild, const std::string &newLaneIDs)
replace the parent edges of a shape
Definition: GNEHierarchicalParentElements.cpp:469
GNE_ATTR_PARAMETERS
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
Definition: SUMOXMLDefinitions.h:989
GNEGeometry::drawGeometry
static void drawGeometry(const GNEViewNet *viewNet, const Geometry &geometry, const double width)
draw geometry
Definition: GNEGeometry.cpp:795
GUIVisualizationSettings::scale
double scale
information about a lane's width (temporary, used for a single view)
Definition: GUIVisualizationSettings.h:632
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GNEContainerStop::getAttribute
std::string getAttribute(SumoXMLAttr key) const
Definition: GNEContainerStop.cpp:195
Position::x
double x() const
Returns the x-position.
Definition: Position.h:56
GNEEdge.h
GNEAdditional::myAdditionalGeometry
GNEGeometry::Geometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
Definition: GNEAdditional.h:338
GNEAdditional::myAdditionalName
std::string myAdditionalName
name of additional
Definition: GNEAdditional.h:347
GNEAdditional::myBlockMovement
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse)
Definition: GNEAdditional.h:350
GUISUMOAbstractView::getPositionInformation
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
Definition: GUISUMOAbstractView.cpp:190
GNEAdditional::BlockIcon::rotation
double rotation
The rotation of the block icon.
Definition: GNEAdditional.h:324
GLHelper::drawShapeDottedContourAroundShape
static void drawShapeDottedContourAroundShape(const GUIVisualizationSettings &s, const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
Definition: GLHelper.cpp:461
SUMO_ATTR_FRIENDLY_POS
@ SUMO_ATTR_FRIENDLY_POS
Definition: SUMOXMLDefinitions.h:765
GNELane.h
GNEContainerStop.h
Position::distanceSquaredTo2D
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions)
Definition: Position.h:248
GUIVisualizationSettings::colorSettings
GUIVisualizationColorSettings colorSettings
color settings
Definition: GUIVisualizationSettings.h:677
GUIVisualizationColorSettings::selectionColor
RGBColor selectionColor
basic selection color
Definition: GUIVisualizationSettings.h:129
GUIVisualizationSettings::getCircleResolution
int getCircleResolution() const
function to calculate circle resolution for all circles drawn in drawGL(...) functions
Definition: GUIVisualizationSettings.cpp:1679
Parameterised::setParametersStr
void setParametersStr(const std::string &paramsString)
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
Definition: Parameterised.cpp:139
GLIncludes.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GNEAdditional::BlockIcon::drawIcon
void drawIcon(const GUIVisualizationSettings &s, const double exaggeration, const double size=0.5) const
draw lock icon
Definition: GNEAdditional.cpp:416
Position::y
double y() const
Returns the y-position.
Definition: Position.h:61
GNEContainerStop::updateGeometry
void updateGeometry()
update pre-computed geometry information
Definition: GNEContainerStop.cpp:51
Parameterised::areParametersValid
static bool areParametersValid(const std::string &value, bool report=false)
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
Definition: Parameterised.cpp:166
InvalidArgument
Definition: UtilExceptions.h:56
GNE_ATTR_BLOCK_MOVEMENT
@ GNE_ATTR_BLOCK_MOVEMENT
block movement of a graphic element
Definition: SUMOXMLDefinitions.h:981
SUMORouteHandler.h
GUIVisualizationSettings::drawAdditionals
bool drawAdditionals(const double exaggeration) const
check if additionals must be drawn
Definition: GUIVisualizationSettings.cpp:1663
GNEAdditional::drawUsingSelectColor
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
Definition: GNEAdditional.cpp:554
GUIVisualizationDetailSettings::stoppingPlaceText
static const double stoppingPlaceText
details for stopping place texts
Definition: GUIVisualizationSettings.h:301
joinToString
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:246
GNENet::retrieveLane
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
Definition: GNENet.cpp:1228
GNEContainerStop::~GNEContainerStop
~GNEContainerStop()
Destructor.
Definition: GNEContainerStop.cpp:47
GUIVisualizationSettings::addSize
GUIVisualizationSizeSettings addSize
Definition: GUIVisualizationSettings.h:589
GNEStoppingPlace::myEndPosition
double myEndPosition
The position this stopping place is located at (optional, if empty takes the lane length)
Definition: GNEStoppingPlace.h:162
GNE_ATTR_SELECTED
@ GNE_ATTR_SELECTED
element is selected
Definition: SUMOXMLDefinitions.h:971
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:300
GNEContainerStop::myLines
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
Definition: GNEContainerStop.h:98
GUIVisualizationSettings::drawDetail
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
Definition: GUIVisualizationSettings.cpp:1669
GNEStoppingPlace::myCircleInText
static const double myCircleInText
text inner circle width resolution for all stopping places
Definition: GNEStoppingPlace.h:183
GLO_CONTAINER_STOP
@ GLO_CONTAINER_STOP
a containerStop
Definition: GUIGlObjectTypes.h:63
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1267
SUMO_ATTR_NAME
@ SUMO_ATTR_NAME
Definition: SUMOXMLDefinitions.h:380
GNEUndoList
Definition: GNEUndoList.h:48
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
PositionVector::getLineCenter
Position getLineCenter() const
get line center
Definition: PositionVector.cpp:474
GNEAdditional::isValidAdditionalID
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
Definition: GNEAdditional.cpp:482
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:372
POSITION_EPS
#define POSITION_EPS
Definition: config.h:172
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
GNEStoppingPlace::myCircleWidth
static const double myCircleWidth
circle width resolution for all stopping places
Definition: GNEStoppingPlace.h:174
SUMORouteHandler::isStopPosValid
static bool isStopPosValid(const double startPos, const double endPos, const double laneLength, const double minLength, const bool friendlyPos)
check if start and end position of a stop is valid
Definition: SUMORouteHandler.cpp:320
GNEChange_Attribute.h
GNENet.h
GUIVisualizationSizeSettings::getExaggeration
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
Definition: GUIVisualizationSettings.cpp:212
PositionVector::move2side
void move2side(double amount, double maxExtension=100)
move position vector to side using certain ammount
Definition: PositionVector.cpp:1103
GNEUndoList.h
fontstash.h