SUMO - Simulation of Urban MObility
GUIPerson.cpp
Go to the documentation of this file.
1 /****************************************************************************/
9 // A MSPerson extended by some values for usage within the gui
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <cmath>
34 #include <vector>
35 #include <string>
46 #include <utils/geom/GeomHelper.h>
52 #include <utils/gui/div/GLHelper.h>
56 #include <gui/GUIGlobals.h>
57 #include "GUILane.h"
58 #include "GUINet.h"
59 #include "GUIEdge.h"
60 #include "GUIPerson.h"
61 
62 #ifdef CHECK_MEMORY_LEAKS
63 #include <foreign/nvwa/debug_new.h>
64 #endif // CHECK_MEMORY_LEAKS
65 
66 //#define GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS 1
67 
68 // ===========================================================================
69 // FOX callback mapping
70 // ===========================================================================
71 FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[] = {
78 };
79 
80 // Object implementation
81 FXIMPLEMENT(GUIPerson::GUIPersonPopupMenu, GUIGLObjectPopupMenu, GUIPersonPopupMenuMap, ARRAYNUMBER(GUIPersonPopupMenuMap))
82 
83 
84 
85 // ===========================================================================
86 // method definitions
87 // ===========================================================================
88 /* -------------------------------------------------------------------------
89  * GUIPerson::GUIPersonPopupMenu - methods
90  * ----------------------------------------------------------------------- */
92  GUIMainWindow& app, GUISUMOAbstractView& parent,
93  GUIGlObject& o, std::map<GUISUMOAbstractView*, int>& additionalVisualizations) :
94  GUIGLObjectPopupMenu(app, parent, o),
95  myVehiclesAdditionalVisualizations(additionalVisualizations) {
96 }
97 
98 
100 
101 long
103  assert(myObject->getType() == GLO_PERSON);
104  if (!static_cast<GUIPerson*>(myObject)->hasActiveAddVisualisation(myParent, VO_SHOW_ROUTE)) {
106  }
107  return 1;
108 }
109 
110 long
112  assert(myObject->getType() == GLO_PERSON);
114  return 1;
115 }
116 
117 
118 
119 long
121  assert(myObject->getType() == GLO_PERSON);
122  if (!static_cast<GUIPerson*>(myObject)->hasActiveAddVisualisation(myParent, VO_SHOW_WALKINGAREA_PATH)) {
124  }
125  return 1;
126 }
127 
128 long
130  assert(myObject->getType() == GLO_PERSON);
132  return 1;
133 }
134 
135 
136 long
137 GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(FXObject*, FXSelector, void*) {
138  assert(myObject->getType() == GLO_PERSON);
139  if (!static_cast<GUIPerson*>(myObject)->hasActiveAddVisualisation(myParent, VO_TRACKED)) {
140  myParent->startTrack(static_cast<GUIPerson*>(myObject)->getGlID());
142  }
143  return 1;
144 }
145 
146 long
147 GUIPerson::GUIPersonPopupMenu::onCmdStopTrack(FXObject*, FXSelector, void*) {
148  assert(myObject->getType() == GLO_PERSON);
150  myParent->stopTrack();
151  return 1;
152 }
153 
154 
155 
156 
157 /* -------------------------------------------------------------------------
158  * GUIPerson - methods
159  * ----------------------------------------------------------------------- */
161  MSPerson(pars, vtype, plan),
162  GUIGlObject(GLO_PERSON, pars->id),
163  myPositionInVehicle(Position::INVALID) {
164 }
165 
166 
168 }
169 
170 
173  GUISUMOAbstractView& parent) {
175  buildPopupHeader(ret, app);
180  new FXMenuCommand(ret, "Hide Current Route", 0, ret, MID_HIDE_CURRENTROUTE);
181  } else {
182  new FXMenuCommand(ret, "Show Current Route", 0, ret, MID_SHOW_CURRENTROUTE);
183  }
185  new FXMenuCommand(ret, "Hide Walkingarea Path", 0, ret, MID_HIDE_WALKINGAREA_PATH);
186  } else {
187  new FXMenuCommand(ret, "Show Walkingarea Path", 0, ret, MID_SHOW_WALKINGAREA_PATH);
188  }
189  new FXMenuSeparator(ret);
190  if (parent.getTrackedID() != getGlID()) {
191  new FXMenuCommand(ret, "Start Tracking", 0, ret, MID_START_TRACK);
192  } else {
193  new FXMenuCommand(ret, "Stop Tracking", 0, ret, MID_STOP_TRACK);
194  }
195  new FXMenuSeparator(ret);
196  //
198  buildPositionCopyEntry(ret, false);
199  return ret;
200 }
201 
202 
207  new GUIParameterTableWindow(app, *this, 16);
208  // add items
209  //ret->mkItem("type [NAME]", false, myType->getID());
210  ret->mkItem("stage", false, getCurrentStageDescription());
211  ret->mkItem("start edge [id]", false, getFromEdge()->getID());
212  ret->mkItem("dest edge [id]", false, getDestination().getID());
213  ret->mkItem("edge [id]", false, getEdge()->getID());
214  ret->mkItem("position [m]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getEdgePos));
215  ret->mkItem("speed [m/s]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getSpeed));
216  ret->mkItem("angle [degree]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getNaviDegree));
217  ret->mkItem("waiting time [s]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getWaitingSeconds));
218 
219  ret->mkItem("parameters [key:val]", false, toString(getParameter().getMap()));
220  ret->mkItem("", false, "");
221  ret->mkItem("Type Information:", false, "");
222  ret->mkItem("type [id]", false, myVType->getID());
223  ret->mkItem("length", false, myVType->getLength());
224  ret->mkItem("minGap", false, myVType->getMinGap());
225  ret->mkItem("maximum speed [m/s]", false, myVType->getMaxSpeed());
226 
227  ret->mkItem("type parameters [key:val]", false, toString(myVType->getParameter().getMap()));
228  // close building
229  ret->closeBuilding();
230  return ret;
231 }
232 
233 
234 Boundary
236  Boundary b;
237  // ensure that the vehicle is drawn, otherwise myPositionInVehicle will not be updated
238  b.add(getPosition());
239  b.grow(MAX2(getVehicleType().getWidth(), getVehicleType().getLength()));
240  return b;
241 }
242 
243 
244 void
246  glPushName(getGlID());
247  glPushMatrix();
248  Position p1 = getPosition();
250  p1 = myPositionInVehicle;
251  }
252  glTranslated(p1.x(), p1.y(), getType());
253  glRotated(90, 0, 0, 1);
254  // set person color
255  setColor(s);
256  // scale
257  const SUMOReal upscale = s.personSize.getExaggeration(s, 80);
258  glScaled(upscale, upscale, 1);
259  switch (s.personQuality) {
260  case 0:
261  case 1:
263  break;
264  case 2:
266  break;
267  case 3:
268  default:
270  break;
271  }
272  glPopMatrix();
273 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS
275 #endif
276  drawName(p1, s.scale, s.personName);
277  glPopName();
278 }
279 
280 void
283  if (stage != 0) {
284  setColor(s);
285  MSPModel_Striping::PState* stripingState = dynamic_cast<MSPModel_Striping::PState*>(stage->getPedestrianState());
286  if (stripingState != 0) {
287  MSPModel_Striping::WalkingAreaPath* waPath = stripingState->myWalkingAreaPath;
288  if (waPath != 0) {
289  glPushMatrix();
290  glTranslated(0, 0, getType());
291  GLHelper::drawBoxLines(waPath->shape, 0.05);
292  glPopMatrix();
293  }
294  }
295  }
296 }
297 
298 void
300  glPushName(getGlID());
301  glPushMatrix();
302  glTranslated(0, 0, getType() - .1); // don't draw on top of other cars
305  }
308  setColor(s);
309  RGBColor current = GLHelper::getColor();
310  RGBColor darker = current.changedBrightness(-51);
311  GLHelper::setColor(darker);
313  assert(stage != 0);
314  const SUMOReal exaggeration = s.personSize.getExaggeration(s);
315  const ConstMSEdgeVector& edges = stage->getRoute();
316  for (ConstMSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
317  GUILane* lane = static_cast<GUILane*>((*it)->getLanes()[0]);
318  GLHelper::drawBoxLines(lane->getShape(), lane->getShapeRotations(), lane->getShapeLengths(), exaggeration);
319  }
320  }
321  }
322  glPopMatrix();
323  glPopName();
324 }
325 
326 
327 
328 
329 void
331  const GUIColorer& c = s.personColorer;
332  if (!setFunctionalColor(c.getActive())) {
334  }
335 }
336 
337 
338 bool
339 GUIPerson::setFunctionalColor(int activeScheme) const {
340  switch (activeScheme) {
341  case 0: {
342  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
344  return true;
345  }
346  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
347  GLHelper::setColor(getVehicleType().getColor());
348  return true;
349  }
350  return false;
351  }
352  case 2: {
353  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
355  return true;
356  }
357  return false;
358  }
359  case 3: {
360  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
361  GLHelper::setColor(getVehicleType().getColor());
362  return true;
363  }
364  return false;
365  }
366  case 8: { // color by angle
369  return true;
370  }
371  case 9: { // color randomly (by pointer)
372  const SUMOReal hue = (long)this % 360; // [0-360]
373  const SUMOReal sat = (((long)this / 360) % 67) / 100.0 + 0.33; // [0.33-1]
374  GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.));
375  return true;
376  }
377  default:
378  return false;
379  }
380 }
381 
382 
383 SUMOReal
384 GUIPerson::getColorValue(int activeScheme) const {
385  switch (activeScheme) {
386  case 4:
387  return getSpeed();
388  case 5:
389  if (isWaiting4Vehicle()) {
390  return 3;
391  } else {
392  return (SUMOReal)getCurrentStageType();
393  }
394  case 6:
395  return getWaitingSeconds();
396  case 7:
398  }
399  return 0;
400 }
401 
402 
403 SUMOReal
406  return MSPerson::getEdgePos();
407 }
408 
409 
410 Position
413  return MSPerson::getPosition();
414 }
415 
416 
417 SUMOReal
421 }
422 
423 
424 SUMOReal
428 }
429 
430 
431 SUMOReal
434  return MSPerson::getSpeed();
435 }
436 
437 
438 void
440  // draw triangle pointing forward
441  glRotated(RAD2DEG(getAngle() + PI / 2.), 0, 0, 1);
442  glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1);
443  glBegin(GL_TRIANGLES);
444  glVertex2d(0., 0.);
445  glVertex2d(1, -0.5);
446  glVertex2d(1, 0.5);
447  glEnd();
448  // draw a smaller triangle to indicate facing
449  GLHelper::setColor(GLHelper::getColor().changedBrightness(-64));
450  glTranslated(0, 0, .045);
451  glBegin(GL_TRIANGLES);
452  glVertex2d(0., 0.);
453  glVertex2d(0.5, -0.25);
454  glVertex2d(0.5, 0.25);
455  glEnd();
456  glTranslated(0, 0, -.045);
457 }
458 
459 
460 void
462  // draw pedestrian shape
463  glRotated(GeomHelper::naviDegree(getAngle()) - 180, 0, 0, -1);
464  glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1);
466  glTranslated(0, 0, .045);
467  // head
468  glScaled(1, 0.5, 1.);
470  // nose
471  glBegin(GL_TRIANGLES);
472  glVertex2d(0.0, -0.2);
473  glVertex2d(0.0, 0.2);
474  glVertex2d(-0.6, 0.0);
475  glEnd();
476  glTranslated(0, 0, -.045);
477  // body
478  glScaled(0.9, 2.0, 1);
479  glTranslated(0, 0, .04);
480  GLHelper::setColor(lighter);
482  glTranslated(0, 0, -.04);
483 }
484 
485 
486 void
488  const std::string& file = getVehicleType().getImgFile();
489  if (file != "") {
490  if (getVehicleType().getGuiShape() == SVS_PEDESTRIAN) {
491  glRotated(RAD2DEG(getAngle() + PI / 2.), 0, 0, 1);
492  }
493  int textureID = GUITexturesHelper::getTextureID(file);
494  if (textureID > 0) {
495  const SUMOReal exaggeration = s.personSize.getExaggeration(s);
496  const SUMOReal halfLength = getVehicleType().getLength() / 2.0 * exaggeration;
497  const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration;
498  GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, -halfLength, halfWidth, halfLength);
499  }
500  } else {
501  // fallback if no image is defined
503  }
504 }
505 
506 
507 // ------------ Additional visualisations
508 bool
510  return myAdditionalVisualizations.find(parent) != myAdditionalVisualizations.end() && (myAdditionalVisualizations.find(parent)->second & which) != 0;
511 }
512 
513 
514 void
516  if (myAdditionalVisualizations.find(parent) == myAdditionalVisualizations.end()) {
517  myAdditionalVisualizations[parent] = 0;
518  }
519  myAdditionalVisualizations[parent] |= which;
520  parent->addAdditionalGLVisualisation(this);
521 }
522 
523 
524 void
526  myAdditionalVisualizations[parent] &= ~which;
527  parent->removeAdditionalGLVisualisation(this);
528 }
529 /****************************************************************************/
530 
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
Definition: GUIPerson.cpp:299
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
Definition: GUIPerson.h:205
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
Definition: GUIPerson.cpp:509
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
Definition: RGBColor.cpp:150
static RGBColor fromHSV(SUMOReal h, SUMOReal s, SUMOReal v)
Converts the given hsv-triplet to rgb.
Definition: RGBColor.cpp:294
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
show persons&#39;s current route
Definition: GUIPerson.h:199
long onCmdHideWalkingareaPath(FXObject *, FXSelector, void *)
Called if the walkingarea path of the person shall be hidden.
Definition: GUIPerson.cpp:129
track person
Definition: GUIPerson.h:201
const MSEdge * getEdge() const
Returns the current edge.
GUIVisualizationTextSettings personName
const MSEdge & getDestination() const
Returns the current destination.
WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
Position getPosition() const
return the Network coordinate of the person
Definition: GUIPerson.cpp:411
Stores the information about how to visualize structures.
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:487
Start to track a vehicle.
Definition: GUIAppEnum.h:271
SUMOReal getLength() const
Get vehicle&#39;s length [m].
std::string getImgFile() const
Get this vehicle type&#39;s raster model file name.
static void drawBoxLines(const PositionVector &geom, const std::vector< SUMOReal > &rots, const std::vector< SUMOReal > &lengths, SUMOReal width, int cornerDetail=0, SUMOReal offset=0)
Draws thick lines.
Definition: GLHelper.cpp:176
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
T MAX2(T a, T b)
Definition: StdDefs.h:75
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
const std::vector< SUMOReal > & getShapeLengths() const
Definition: GUILane.cpp:819
GUISUMOAbstractView * myParent
The parent window.
bool addAdditionalGLVisualisation(const GUIGlObject *const which)
Adds an object to call its additional visualisation method.
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
#define RAD2DEG(x)
Definition: GeomHelper.h:46
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
const SUMOVehicleParameter & getParameter() const
virtual void stopTrack()
stop track
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.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
bool removeAdditionalGLVisualisation(const GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
The car-following model and parameter.
Definition: MSVehicleType.h:74
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIPerson.cpp:204
SUMOReal scale
information about a lane&#39;s width (temporary, used for a single view)
PedestrianState * getPedestrianState() const
Definition: MSPerson.h:159
Representation of a lane in the micro simulation (gui-version)
Definition: GUILane.h:70
~GUIPersonPopupMenu()
Destructor.
Definition: GUIPerson.cpp:99
MFXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
Definition: GUIPerson.h:238
virtual SUMOReal getAngle() const
return the current angle of the transportable
const MSEdge * getFromEdge() const
Returns the departure edge.
void drawAction_drawWalkingareaPath(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:281
static void drawFilledCircle(SUMOReal width, int steps=8)
Draws a filled circle around (0,0)
Definition: GLHelper.cpp:344
long onCmdHideCurrentRoute(FXObject *, FXSelector, void *)
Called if the current route of the person shall be hidden.
Definition: GUIPerson.cpp:111
long onCmdStartTrack(FXObject *, FXSelector, void *)
Called if the person shall be tracked.
Definition: GUIPerson.cpp:137
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUIPerson.cpp:172
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
virtual GUIGlID getTrackedID() const
get tracked id
virtual void startTrack(int)
star track
#define PI
Definition: polyfonts.c:61
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void drawAction_drawAsPoly(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:461
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:443
SUMOReal getNaviDegree() const
return the current angle of the person
Definition: GUIPerson.cpp:418
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
SUMOReal getWaitingSeconds() const
the time this person spent waiting in seconds
Definition: GUIPerson.cpp:425
const MSVehicleType * myVType
This transportable&#39;s type. (mainly used for drawing related information Note sure if it is really nec...
long onCmdShowWalkingareaPath(FXObject *, FXSelector, void *)
Called if the walkingarea path of the person shall be shown.
Definition: GUIPerson.cpp:120
a person
SUMOReal getColorValue(int activeScheme) const
gets the color value according to the current scheme index
Definition: GUIPerson.cpp:384
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
Definition: GUIPerson.cpp:339
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
virtual SUMOReal getWaitingSeconds() const
the time this transportable spent waiting in seconds
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
SUMOReal x() const
Returns the x-position.
Definition: Position.h:63
GUIColorer personColorer
The person colorer.
const std::string & getID() const
returns the id of the transportable
const PositionVector & getShape() const
Definition: GUILane.cpp:807
const T getColor(const SUMOReal value) const
virtual SUMOReal getEdgePos() const
Return the position on the edge.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
Definition: ToString.h:55
show the current walkingarea path
Definition: GUIPerson.h:197
const int VEHPARS_COLOR_SET
const ConstMSEdgeVector & getRoute() const
Definition: MSPerson.h:155
FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[]
const SUMOVTypeParameter & getParameter() const
GUIPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
Constructor.
Definition: GUIPerson.cpp:160
Hide persons&#39;s path on walkingarea.
Definition: GUIAppEnum.h:281
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIPerson.cpp:245
static SUMOReal naviDegree(const SUMOReal angle)
Definition: GeomHelper.cpp:191
void removeActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
Definition: GUIPerson.cpp:525
Show persons&#39;s path on walkingarea.
Definition: GUIAppEnum.h:279
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
render as a pedestrian
long onCmdStopTrack(FXObject *, FXSelector, void *)
Called if the person shall not be tracked any longer.
Definition: GUIPerson.cpp:147
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
Definition: Boundary.cpp:232
Stop to track a vehicle.
Definition: GUIAppEnum.h:273
Structure representing possible vehicle parameter.
Hide vehicle&#39;s current route.
Definition: GUIAppEnum.h:261
void add(SUMOReal x, SUMOReal y, SUMOReal z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:90
virtual Position getPosition() const
Return the Network coordinate of the transportable.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
Definition: AbstractMutex.h:71
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
Definition: GUIPerson.cpp:330
const std::map< std::string, std::string > & getMap() const
Returns the inner key/value map.
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
Definition: GUIPerson.cpp:515
SUMOReal getMaxSpeed() const
Get vehicle&#39;s maximum speed [m/s].
const std::string & getID() const
Returns the name of the vehicle type.
The popup menu of a globject.
Container for pedestrian state and individual position update function.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
GUIVisualizationSizeSettings personSize
int personQuality
The quality of person drawing.
Show vehicle&#39;s current route.
Definition: GUIAppEnum.h:259
~GUIPerson()
destructor
Definition: GUIPerson.cpp:167
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUIPerson.cpp:235
SUMOReal getEdgePos() const
return the offset from the start of the current edge
Definition: GUIPerson.cpp:404
GUIGlID getGlID() const
Returns the numerical id of the object.
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
const MSVehicleType & getVehicleType() const
#define SUMOReal
Definition: config.h:213
const std::vector< SUMOReal > & getShapeRotations() const
Definition: GUILane.cpp:813
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
long onCmdShowCurrentRoute(FXObject *, FXSelector, void *)
Called if the current route of the person shall be shown.
Definition: GUIPerson.cpp:102
virtual SUMOReal getSpeed() const
the current speed of the transportable
GUIGlObject * myObject
The object that belongs to this popup-menu.
SUMOReal y() const
Returns the y-position.
Definition: Position.h:68
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.
Position myPositionInVehicle
The position of a person while riding a vehicle.
Definition: GUIPerson.h:241
A window containing a gl-object&#39;s parameter.
const int VTYPEPARS_COLOR_SET
static void drawTexturedBox(int which, SUMOReal size)
Draws a named texture as a box with the given size.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
SUMOReal getSpeed() const
the current speed of the person
Definition: GUIPerson.cpp:432
void drawAction_drawAsTriangle(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:439
StageType getCurrentStageType() const
the current stage type of the transportable
static RGBColor getColor()
gets the gl-color
Definition: GLHelper.cpp:449