SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIEdge.cpp
Go to the documentation of this file.
1 /****************************************************************************/
10 // A road/street connecting two junctions (gui-version)
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <vector>
35 #include <cmath>
36 #include <string>
37 #include <algorithm>
42 #include <utils/geom/GeomHelper.h>
45 #include <utils/gui/div/GLHelper.h>
48 #include <microsim/MSBaseVehicle.h>
49 #include <microsim/MSEdge.h>
50 #include <microsim/MSJunction.h>
51 #include <microsim/MSLaneChanger.h>
52 #include <microsim/MSGlobals.h>
55 #include "GUIEdge.h"
56 #include "GUINet.h"
57 #include "GUILane.h"
58 #include "GUIPerson.h"
59 
60 #ifdef HAVE_INTERNAL
61 #include <mesogui/GUIMEVehicleControl.h>
62 #include <mesosim/MESegment.h>
63 #include <mesosim/MELoop.h>
64 #include <mesosim/MEVehicle.h>
65 #endif
66 
67 #ifdef CHECK_MEMORY_LEAKS
68 #include <foreign/nvwa/debug_new.h>
69 #endif // CHECK_MEMORY_LEAKS
70 
71 
72 // ===========================================================================
73 // included modules
74 // ===========================================================================
75 GUIEdge::GUIEdge(const std::string& id, int numericalID,
76  const EdgeBasicFunction function, const std::string& streetName, const std::string& edgeType)
77  : MSEdge(id, numericalID, function, streetName, edgeType),
78  GUIGlObject(GLO_EDGE, id) {}
79 
80 
82  // just to quit cleanly on a failure
83  if (myLock.locked()) {
84  myLock.unlock();
85  }
86 }
87 
88 
89 MSLane&
90 GUIEdge::getLane(size_t laneNo) {
91  assert(laneNo < myLanes->size());
92  return *((*myLanes)[laneNo]);
93 }
94 
95 
96 std::vector<GUIGlID>
97 GUIEdge::getIDs(bool includeInternal) {
98  std::vector<GUIGlID> ret;
99  ret.reserve(MSEdge::myDict.size());
100  for (MSEdge::DictType::iterator i = MSEdge::myDict.begin(); i != MSEdge::myDict.end(); ++i) {
101  GUIEdge* edge = dynamic_cast<GUIEdge*>(i->second);
102  assert(edge);
103  if (edge->getPurpose() != EDGEFUNCTION_INTERNAL || includeInternal) {
104  ret.push_back(edge->getGlID());
105  }
106  }
107  return ret;
108 }
109 
110 
111 Boundary
113  Boundary ret;
114  for (std::vector<MSLane*>::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) {
115  ret.add((*i)->getShape().getBoxBoundary());
116  }
117  ret.grow(10);
118  return ret;
119 }
120 
121 
122 void
123 GUIEdge::fill(std::vector<GUIEdge*>& netsWrappers) {
124  size_t size = MSEdge::dictSize();
125  netsWrappers.reserve(size);
126  for (DictType::iterator i = myDict.begin(); i != myDict.end(); ++i) {
127  if (i->second->getPurpose() != MSEdge::EDGEFUNCTION_DISTRICT) {
128  netsWrappers.push_back(static_cast<GUIEdge*>((*i).second));
129  }
130  }
131 }
132 
133 
134 
137  GUIGLObjectPopupMenu* ret = new GUIGLObjectPopupMenu(app, parent, *this);
138  buildPopupHeader(ret, app);
144  }
145  const SUMOReal pos = getLanes()[0]->getShape().nearest_offset_to_point2D(parent.getPositionInformation());
146  new FXMenuCommand(ret, ("pos: " + toString(pos)).c_str(), 0, 0, 0);
147  buildPositionCopyEntry(ret, false);
148  return ret;
149 }
150 
151 
154  GUISUMOAbstractView& parent) {
155  GUIParameterTableWindow* ret = 0;
156 #ifdef HAVE_INTERNAL
157  ret = new GUIParameterTableWindow(app, *this, 16);
158  // add edge items
159  ret->mkItem("length [m]", false, (*myLanes)[0]->getLength());
160  ret->mkItem("allowed speed [m/s]", false, getAllowedSpeed());
161  ret->mkItem("occupancy [%]", true, new FunctionBinding<GUIEdge, SUMOReal>(this, &GUIEdge::getBruttoOccupancy));
162  ret->mkItem("mean vehicle speed [m/s]", true, new FunctionBinding<GUIEdge, SUMOReal>(this, &GUIEdge::getMeanSpeed));
163  ret->mkItem("flow [veh/h/lane]", true, new FunctionBinding<GUIEdge, SUMOReal>(this, &GUIEdge::getFlow));
164  ret->mkItem("#vehicles", true, new CastingFunctionBinding<GUIEdge, SUMOReal, unsigned int>(this, &GUIEdge::getVehicleNo));
165  ret->mkItem("vehicle ids", false, getVehicleIDs());
166  // add segment items
167  MESegment* segment = getSegmentAtPosition(parent.getPositionInformation());
168  ret->mkItem("segment index", false, segment->getIndex());
169  ret->mkItem("segment length [m]", false, segment->getLength());
170  ret->mkItem("segment allowed speed [m/s]", false, segment->getMaxSpeed());
171  ret->mkItem("segment jam threshold [%]", false, segment->getRelativeJamThreshold());
172  ret->mkItem("segment occupancy [%]", true, new FunctionBinding<MESegment, SUMOReal>(segment, &MESegment::getRelativeOccupancy));
173  ret->mkItem("segment mean vehicle speed [m/s]", true, new FunctionBinding<MESegment, SUMOReal>(segment, &MESegment::getMeanSpeed));
174  ret->mkItem("segment flow [veh/h/lane]", true, new FunctionBinding<MESegment, SUMOReal>(segment, &MESegment::getFlow));
175  ret->mkItem("segment #vehicles", true, new CastingFunctionBinding<MESegment, SUMOReal, size_t>(segment, &MESegment::getCarNumber));
176  ret->mkItem("segment leader leave time", true, new FunctionBinding<MESegment, SUMOReal>(segment, &MESegment::getEventTimeSeconds));
177 
178  // close building
179  ret->closeBuilding();
180 #else
181  UNUSED_PARAMETER(app);
182  UNUSED_PARAMETER(parent);
183 #endif
184  return ret;
185 }
186 
187 
188 Boundary
190  Boundary b = getBoundary();
191  b.grow(20);
192  return b;
193 }
194 
195 
196 void
199  return;
200  }
202  glPushName(getGlID());
203  }
204  // draw the lanes
205  for (std::vector<MSLane*>::const_iterator i = myLanes->begin(); i != myLanes->end(); ++i) {
206 #ifdef HAVE_INTERNAL
208  setColor(s);
209  }
210 #endif
211  GUILane* l = dynamic_cast<GUILane*>(*i);
212  if (l != 0) {
213  l->drawGL(s);
214  }
215  }
216 #ifdef HAVE_INTERNAL
218  const GUIVisualizationTextSettings& nameSettings = s.vehicleName;
219  GUIMEVehicleControl* vehicleControl = GUINet::getGUIInstance()->getGUIMEVehicleControl();
220  if (vehicleControl != 0) {
221  // draw the meso vehicles
222  vehicleControl->secureVehicles();
223  size_t laneIndex = 0;
224  MESegment::Queue queue;
225  for (std::vector<MSLane*>::const_iterator msl = myLanes->begin(); msl != myLanes->end(); ++msl, ++laneIndex) {
226  GUILane* l = static_cast<GUILane*>(*msl);
227  const PositionVector& shape = l->getShape();
228  const std::vector<SUMOReal>& shapeRotations = l->getShapeRotations();
229  const std::vector<SUMOReal>& shapeLengths = l->getShapeLengths();
230  const Position& laneBeg = shape[0];
231  glPushMatrix();
232  glTranslated(laneBeg.x(), laneBeg.y(), 0);
233  glRotated(shapeRotations[0], 0, 0, 1);
234  // go through the vehicles
235  int shapeIndex = 0;
236  SUMOReal shapeOffset = 0; // ofset at start of current shape
237  SUMOReal segmentOffset = 0; // offset at start of current segment
238  for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this);
239  segment != 0; segment = segment->getNextSegment()) {
240  const SUMOReal length = segment->getLength();
241  if (laneIndex < segment->numQueues()) {
242  // make a copy so we don't have to worry about synchronization
243  queue = segment->getQueue(laneIndex);
244  const SUMOReal avgCarSize = segment->getBruttoOccupancy() / segment->getCarNumber();
245  const size_t queueSize = queue.size();
246  for (size_t i = 0; i < queueSize; ++i) {
247  MSBaseVehicle* veh = queue[queueSize - i - 1];
248  setVehicleColor(s, veh);
249  SUMOReal vehiclePosition = segmentOffset + length - i * avgCarSize;
250  SUMOReal xOff = 0.f;
251  while (vehiclePosition < segmentOffset) {
252  // if there is only a single queue for a
253  // multi-lane edge shift vehicles and start
254  // drawing again from the end of the segment
255  vehiclePosition += length;
256  xOff += 0.5f;
257  }
258  while (shapeIndex < (int)shapeRotations.size() - 1 && vehiclePosition > shapeOffset + shapeLengths[shapeIndex]) {
259  glPopMatrix();
260  shapeOffset += shapeLengths[shapeIndex];
261  shapeIndex++;
262  glPushMatrix();
263  glTranslated(shape[shapeIndex].x(), shape[shapeIndex].y(), 0);
264  glRotated(shapeRotations[shapeIndex], 0, 0, 1);
265  }
266  glPushMatrix();
267  glTranslated(xOff, -(vehiclePosition - shapeOffset), GLO_VEHICLE);
268  glPushMatrix();
269  glScaled(1, avgCarSize, 1);
270  glBegin(GL_TRIANGLES);
271  glVertex2d(0, 0);
272  glVertex2d(0 - 1.25, 1);
273  glVertex2d(0 + 1.25, 1);
274  glEnd();
275  glPopMatrix();
276  glPopMatrix();
277  if (nameSettings.show) {
278  GLHelper::drawText(veh->getID(),
279  Position(xOff, -(vehiclePosition - shapeOffset)),
280  GLO_MAX, nameSettings.size / s.scale, nameSettings.color, 0);
281  }
282  }
283  }
284  segmentOffset += length;
285  }
286  glPopMatrix();
287  }
288  vehicleControl->releaseVehicles();
289  }
290  glPopName();
291  }
292 #endif
293  // (optionally) draw the name and/or the street name
294  const bool drawEdgeName = s.edgeName.show && myFunction == EDGEFUNCTION_NORMAL;
295  const bool drawInternalEdgeName = s.internalEdgeName.show && myFunction == EDGEFUNCTION_INTERNAL;
296  const bool drawCwaEdgeName = s.cwaEdgeName.show && (myFunction == EDGEFUNCTION_CROSSING || myFunction == EDGEFUNCTION_WALKINGAREA);
297  const bool drawStreetName = s.streetName.show && myStreetName != "";
298  if (drawEdgeName || drawInternalEdgeName || drawCwaEdgeName || drawStreetName) {
299  GUILane* lane1 = dynamic_cast<GUILane*>((*myLanes)[0]);
300  GUILane* lane2 = dynamic_cast<GUILane*>((*myLanes).back());
301  if (lane1 != 0 && lane2 != 0) {
302  Position p = lane1->getShape().positionAtOffset(lane1->getShape().length() / (SUMOReal) 2.);
303  p.add(lane2->getShape().positionAtOffset(lane2->getShape().length() / (SUMOReal) 2.));
304  p.mul(.5);
305  SUMOReal angle = lane1->getShape().rotationDegreeAtOffset(lane1->getShape().length() / (SUMOReal) 2.);
306  angle += 90;
307  if (angle > 90 && angle < 270) {
308  angle -= 180;
309  }
310  if (drawEdgeName) {
311  drawName(p, s.scale, s.edgeName, angle);
312  } else if (drawInternalEdgeName) {
313  drawName(p, s.scale, s.internalEdgeName, angle);
314  } else if (drawCwaEdgeName) {
315  drawName(p, s.scale, s.cwaEdgeName, angle);
316  }
317  if (drawStreetName) {
319  s.streetName.size / s.scale, s.streetName.color, angle);
320  }
321  }
322  }
323  if (s.scale > s.minPersonSize) {
324  myLock.lock();
325  for (std::set<MSPerson*>::const_iterator i = myPersons.begin(); i != myPersons.end(); ++i) {
326  GUIPerson* person = dynamic_cast<GUIPerson*>(*i);
327  assert(person != 0);
328  person->drawGL(s);
329  }
330  myLock.unlock();
331  }
332 }
333 
334 #ifdef HAVE_INTERNAL
335 unsigned int
336 GUIEdge::getVehicleNo() const {
337  size_t vehNo = 0;
338  for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); segment != 0; segment = segment->getNextSegment()) {
339  vehNo += segment->getCarNumber();
340  }
341  return (unsigned int)vehNo;
342 }
343 
344 
345 std::string
346 GUIEdge::getVehicleIDs() const {
347  std::string result = " ";
348  std::vector<const MEVehicle*> vehs;
349  for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); segment != 0; segment = segment->getNextSegment()) {
350  std::vector<const MEVehicle*> segmentVehs = segment->getVehicles();
351  vehs.insert(vehs.end(), segmentVehs.begin(), segmentVehs.end());
352  }
353  for (std::vector<const MEVehicle*>::const_iterator it = vehs.begin(); it != vehs.end(); it++) {
354  result += (*it)->getID() + " ";
355  }
356  return result;
357 }
358 
359 
360 SUMOReal
361 GUIEdge::getFlow() const {
362  SUMOReal flow = 0;
363  for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); segment != 0; segment = segment->getNextSegment()) {
364  flow += (SUMOReal) segment->getCarNumber() * segment->getMeanSpeed();
365  }
366  return 3600 * flow / (*myLanes)[0]->getLength();
367 }
368 
369 
370 SUMOReal
371 GUIEdge::getBruttoOccupancy() const {
372  SUMOReal occ = 0;
373  for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); segment != 0; segment = segment->getNextSegment()) {
374  occ += segment->getBruttoOccupancy();
375  }
376  return occ / (*myLanes)[0]->getLength() / (SUMOReal)(myLanes->size());
377 }
378 
379 
380 SUMOReal
381 GUIEdge::getMeanSpeed() const {
382  SUMOReal v = 0;
383  SUMOReal no = 0;
384  for (MESegment* segment = MSGlobals::gMesoNet->getSegmentForEdge(*this); segment != 0; segment = segment->getNextSegment()) {
385  SUMOReal vehNo = (SUMOReal) segment->getCarNumber();
386  v += vehNo * segment->getMeanSpeed();
387  no += vehNo;
388  }
389  if (no == 0) {
390  return getSpeedLimit();
391  }
392  return v / no;
393 }
394 
395 
396 SUMOReal
397 GUIEdge::getAllowedSpeed() const {
398  return (*myLanes)[0]->getSpeedLimit();
399 }
400 
401 
402 SUMOReal
403 GUIEdge::getRelativeSpeed() const {
404  return getMeanSpeed() / getAllowedSpeed();
405 }
406 
407 
408 void
409 GUIEdge::setColor(const GUIVisualizationSettings& s) const {
410  GLHelper::setColor(s.edgeColorer.getScheme().getColor(getColorValue(s.edgeColorer.getActive())));
411 }
412 
413 
414 SUMOReal
415 GUIEdge::getColorValue(size_t activeScheme) const {
416  switch (activeScheme) {
417  case 1:
418  return gSelected.isSelected(getType(), getGlID());
419  case 2:
420  return getPurpose();
421  case 3:
422  return getAllowedSpeed();
423  case 4:
424  return getBruttoOccupancy();
425  case 5:
426  return getMeanSpeed();
427  case 6:
428  return getFlow();
429  case 7:
430  return getRelativeSpeed();
431  }
432  return 0;
433 }
434 
435 
436 MESegment*
437 GUIEdge::getSegmentAtPosition(const Position& pos) {
438  const PositionVector& shape = getLanes()[0]->getShape();
439  const SUMOReal lanePos = shape.nearest_offset_to_point2D(pos);
440  return MSGlobals::gMesoNet->getSegmentForEdge(*this, lanePos);
441 }
442 
443 
444 void
445 GUIEdge::setVehicleColor(const GUIVisualizationSettings& s, MSBaseVehicle* veh) const {
446  const GUIColorer& c = s.vehicleColorer;
447  switch (c.getActive()) {
448  case 0:
449  if (veh->getParameter().wasSet(VEHPARS_COLOR_SET)) {
451  }
454  }
455  if (veh->getRoute().getColor() != RGBColor::DEFAULT_COLOR) {
457  }
458  break;
459  case 2:
461  break;
462  case 4:
464  break;
465  case 5:
467  break;
468  default:
470  }
471 }
472 
473 #endif
474 
475 /****************************************************************************/
476 
bool wasSet(int what) const
Returns whether the given parameter was set.
Definition: MSVehicleType.h:91
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUIEdge.cpp:189
std::set< MSPerson * > myPersons
Persons on the edge (only for drawing)
Definition: MSEdge.h:632
const std::vector< SUMOReal > & getShapeRotations() const
Definition: GUILane.cpp:701
RGBColor color
The vehicle's color.
std::vector< MSLane * > * myLanes
Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane...
Definition: MSEdge.h:607
GUIVisualizationTextSettings streetName
const RGBColor getColor(const SUMOReal value) const
SUMOReal nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
a vehicles
void add(const Position &pos)
Adds the given position to this one.
Definition: Position.h:119
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUIEdge.cpp:136
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Definition: MSEdge.h:173
Stores the information about how to visualize structures.
const EdgeBasicFunction myFunction
the purpose of the edge
Definition: MSEdge.h:613
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUILane.cpp:445
GUIVisualizationTextSettings vehicleName
const std::string & getStreetName() const
Returns the street name of the edge.
Definition: MSEdge.h:244
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
The edge is a macroscopic connector (source/sink)
Definition: MSEdge.h:89
const MSRoute & getRoute() const
Returns the current route.
Definition: MSBaseVehicle.h:87
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
GUIVisualizationTextSettings cwaEdgeName
const std::vector< SUMOReal > & getShapeLengths() const
Definition: GUILane.cpp:707
static void drawText(const std::string &text, const Position &pos, const SUMOReal layer, const SUMOReal size, const RGBColor &col=RGBColor::BLACK, const SUMOReal angle=0)
draw Text with given parameters
Definition: GLHelper.cpp:378
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
The base class for microscopic and mesoscopic vehicles.
Definition: MSBaseVehicle.h:58
EdgeBasicFunction
Defines possible edge types.
Definition: MSEdge.h:83
SUMOReal x() const
Returns the x-position.
Definition: Position.h:63
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.h:115
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:39
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
SUMOReal scale
information about a lane's width (temporary, used for a single view)
size_t getActive() const
Definition: GUIColorer.h:72
Representation of a lane in the micro simulation (gui-version)
Definition: GUILane.h:70
GUIColorer vehicleColorer
The vehicle colorer.
GUIVisualizationTextSettings edgeName
A road/street connecting two junctions (gui-version)
Definition: GUIEdge.h:61
A road/street connecting two junctions.
Definition: MSEdge.h:74
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.h:159
SUMOReal getLength() const
return the length of the edge
Definition: MSEdge.cpp:576
~GUIEdge()
Destructor.
Definition: GUIEdge.cpp:81
The edge is a district edge.
Definition: MSEdge.h:93
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:361
static GUINet * getGUIInstance()
Returns the pointer to the unique instance of GUINet (singleton).
Definition: GUINet.cpp:474
bool wasSet(int what) const
Returns whether the given parameter was set.
GUIVisualizationTextSettings internalEdgeName
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
A list of positions.
static const RGBColor DEFAULT_COLOR
The default color (for vehicle types and vehicles)
Definition: RGBColor.h:199
virtual GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIEdge.cpp:153
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
MSLane & getLane(size_t laneNo)
returns the enumerated lane (!!! why not private with a friend?)
Definition: GUIEdge.cpp:90
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
Definition: ToString.h:53
SUMOReal getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
Definition: MSEdge.cpp:582
const int VEHPARS_COLOR_SET
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIPerson.cpp:167
void unlock()
release mutex lock
Definition: MFXMutex.cpp:96
GUIEdge(const std::string &id, int numericalID, const EdgeBasicFunction function, const std::string &streetName, const std::string &edgeType)
Constructor.
Definition: GUIEdge.cpp:75
The edge is a pedestrian walking area (a special type of internal edge)
Definition: MSEdge.h:97
static std::vector< GUIGlID > getIDs(bool includeInternal)
Definition: GUIEdge.cpp:97
SUMOReal length() const
Returns the length.
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:76
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
Definition: Boundary.cpp:200
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
Definition: MSEdge.h:215
float minPersonSize
The minimum size of persons to let them be drawn.
GUIColorScheme & getScheme()
Definition: GUIColorer.h:76
MFXMutex myLock
The mutex used to avoid concurrent updates of myPersons.
Definition: GUIEdge.h:187
The edge is a normal street.
Definition: MSEdge.h:87
SUMOReal y() const
Returns the y-position.
Definition: Position.h:68
The edge is a pedestrian crossing (a special type of internal edge)
Definition: MSEdge.h:95
static size_t dictSize()
Returns the number of edges.
Definition: MSEdge.cpp:507
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
Definition: MSBaseVehicle.h:95
The popup menu of a globject.
an edge
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIEdge.cpp:197
std::string myStreetName
the real-world name of this edge (need not be unique)
Definition: MSEdge.h:651
void mul(SUMOReal val)
Multiplies both positions with the given value.
Definition: Position.h:99
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
void lock()
lock mutex
Definition: MFXMutex.cpp:86
Base class for coloring. Allows changing the used colors and sets the used color in dependence to a v...
Definition: GUIColorer.h:50
const RGBColor & getColor() const
Returns this type's color.
static DictType myDict
Static dictionary to associate string-ids with objects.
Definition: MSEdge.h:668
const RGBColor & getColor() const
Returns the color.
Definition: MSRoute.cpp:313
#define SUMOReal
Definition: config.h:215
static const bool gUseMesoSim
Definition: MSGlobals.h:99
Boundary getBoundary() const
Returns the street's geometry.
Definition: GUIEdge.cpp:112
FXbool locked()
Definition: MFXMutex.h:70
empty max
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
The edge is an internal edge.
Definition: MSEdge.h:91
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
GUISelectedStorage gSelected
A global holder of selected objects.
void closeBuilding()
Closes the building of the table.
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
A window containing a gl-object's parameter.
const int VTYPEPARS_COLOR_SET
static void fill(std::vector< GUIEdge * > &netsWrappers)
Definition: GUIEdge.cpp:123
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
const std::string & getID() const
Returns the name of the vehicle.
const PositionVector & getShape() const
Definition: GUILane.cpp:695