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-2015 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  int trackedID = parent.getTrackedID();
191  if (trackedID < 0 || (size_t)trackedID != getGlID()) {
192  new FXMenuCommand(ret, "Start Tracking", 0, ret, MID_START_TRACK);
193  } else {
194  new FXMenuCommand(ret, "Stop Tracking", 0, ret, MID_STOP_TRACK);
195  }
196  new FXMenuSeparator(ret);
197  //
199  buildPositionCopyEntry(ret, false);
200  return ret;
201 }
202 
203 
208  new GUIParameterTableWindow(app, *this, 16);
209  // add items
210  //ret->mkItem("type [NAME]", false, myType->getID());
211  ret->mkItem("stage", false, getCurrentStageDescription());
212  ret->mkItem("start edge [id]", false, getFromEdge()->getID());
213  ret->mkItem("dest edge [id]", false, getDestination().getID());
214  ret->mkItem("edge [id]", false, getEdge()->getID());
215  ret->mkItem("position [m]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getEdgePos));
216  ret->mkItem("speed [m/s]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getSpeed));
217  ret->mkItem("angle [degree]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getNaviDegree));
218  ret->mkItem("waiting time [s]", true, new FunctionBinding<GUIPerson, SUMOReal>(this, &GUIPerson::getWaitingSeconds));
219 
220  ret->mkItem("parameters [key:val]", false, toString(getParameter().getMap()));
221  ret->mkItem("", false, "");
222  ret->mkItem("Type Information:", false, "");
223  ret->mkItem("type [id]", false, myVType->getID());
224  ret->mkItem("length", false, myVType->getLength());
225  ret->mkItem("minGap", false, myVType->getMinGap());
226  ret->mkItem("maximum speed [m/s]", false, myVType->getMaxSpeed());
227 
228  ret->mkItem("type parameters [key:val]", false, toString(myVType->getParameter().getMap()));
229  // close building
230  ret->closeBuilding();
231  return ret;
232 }
233 
234 
235 Boundary
237  Boundary b;
238  // ensure that the vehicle is drawn, otherwise myPositionInVehicle will not be updated
240  b.add(getVehicle()->getPosition());
241  } else {
242  b.add(getPosition());
243  }
244  b.grow(20);
245  return b;
246 }
247 
248 
249 void
251  glPushName(getGlID());
252  glPushMatrix();
253  Position p1 = getPosition();
254  glTranslated(p1.x(), p1.y(), getType());
255  glRotated(90, 0, 0, 1);
256  // XXX use person specific gui settings
257  // set person color
258  setColor(s);
259  // scale
260  const SUMOReal upscale = s.personSize.getExaggeration(s);
261  glScaled(upscale, upscale, 1);
262  switch (s.personQuality) {
263  case 0:
264  case 1:
266  break;
267  case 2:
269  break;
270  case 3:
271  default:
273  break;
274  }
275  glPopMatrix();
276 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS
278 #endif
279  drawName(p1, s.scale, s.personName);
280  glPopName();
281 }
282 
283 void
286  if (stage != 0) {
287  setColor(s);
288  MSPModel_Striping::PState* stripingState = dynamic_cast<MSPModel_Striping::PState*>(stage->getPedestrianState());
289  if (stripingState != 0) {
290  MSPModel_Striping::WalkingAreaPath* waPath = stripingState->myWalkingAreaPath;
291  if (waPath != 0) {
292  glPushMatrix();
293  glTranslated(0, 0, getType());
294  GLHelper::drawBoxLines(waPath->shape, 0.05);
295  glPopMatrix();
296  }
297  }
298  }
299 }
300 
301 void
303  glPushName(getGlID());
304  glPushMatrix();
305  glTranslated(0, 0, getType() - .1); // don't draw on top of other cars
308  }
311  setColor(s);
312  RGBColor current = GLHelper::getColor();
313  RGBColor darker = current.changedBrightness(-51);
314  GLHelper::setColor(darker);
316  assert(stage != 0);
317  const SUMOReal exaggeration = s.personSize.getExaggeration(s);
318  const ConstMSEdgeVector& edges = stage->getRoute();
319  for (ConstMSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
320  GUILane* lane = static_cast<GUILane*>((*it)->getLanes()[0]);
321  GLHelper::drawBoxLines(lane->getShape(), lane->getShapeRotations(), lane->getShapeLengths(), exaggeration);
322  }
323  }
324  }
325  glPopMatrix();
326  glPopName();
327 }
328 
329 
330 
331 
332 void
334  const GUIColorer& c = s.personColorer;
335  if (!setFunctionalColor(c.getActive())) {
337  }
338 }
339 
340 
341 bool
342 GUIPerson::setFunctionalColor(size_t activeScheme) const {
343  switch (activeScheme) {
344  case 0: {
345  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
347  return true;
348  }
349  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
350  GLHelper::setColor(getVehicleType().getColor());
351  return true;
352  }
353  return false;
354  }
355  case 2: {
356  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
358  return true;
359  }
360  return false;
361  }
362  case 3: {
363  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
364  GLHelper::setColor(getVehicleType().getColor());
365  return true;
366  }
367  return false;
368  }
369  case 8: { // color by angle
372  return true;
373  }
374  case 9: { // color randomly (by pointer)
375  const SUMOReal hue = (long)this % 360; // [0-360]
376  const SUMOReal sat = (((long)this / 360) % 67) / 100.0 + 0.33; // [0.33-1]
377  GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.));
378  return true;
379  }
380  default:
381  return false;
382  }
383 }
384 
385 
386 SUMOReal
387 GUIPerson::getColorValue(size_t activeScheme) const {
388  switch (activeScheme) {
389  case 4:
390  return getSpeed();
391  case 5:
392  if (isWaiting4Vehicle()) {
393  return 3;
394  } else {
395  return (SUMOReal)getCurrentStageType();
396  }
397  case 6:
398  return getWaitingSeconds();
399  case 7:
401  }
402  return 0;
403 }
404 
405 
406 SUMOReal
409  return MSPerson::getEdgePos();
410 }
411 
412 
413 Position
417  return myPositionInVehicle;
418  }
419  return MSPerson::getPosition();
420 }
421 
422 
423 SUMOReal
427 }
428 
429 
430 SUMOReal
434 }
435 
436 
437 SUMOReal
440  return MSPerson::getSpeed();
441 }
442 
443 
444 void
446  // draw triangle pointing forward
447  glRotated(RAD2DEG(getAngle() + PI / 2.), 0, 0, 1);
448  glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1);
449  glBegin(GL_TRIANGLES);
450  glVertex2d(0., 0.);
451  glVertex2d(1, -0.5);
452  glVertex2d(1, 0.5);
453  glEnd();
454  // draw a smaller triangle to indicate facing
455  GLHelper::setColor(GLHelper::getColor().changedBrightness(-64));
456  glTranslated(0, 0, .045);
457  glBegin(GL_TRIANGLES);
458  glVertex2d(0., 0.);
459  glVertex2d(0.5, -0.25);
460  glVertex2d(0.5, 0.25);
461  glEnd();
462  glTranslated(0, 0, -.045);
463 }
464 
465 
466 void
468  // draw pedestrian shape
469  glRotated(GeomHelper::naviDegree(getAngle()) - 180, 0, 0, -1);
470  glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1);
472  glTranslated(0, 0, .045);
473  // head
474  glScaled(1, 0.5, 1.);
476  // nose
477  glBegin(GL_TRIANGLES);
478  glVertex2d(0.0, -0.2);
479  glVertex2d(0.0, 0.2);
480  glVertex2d(-0.6, 0.0);
481  glEnd();
482  glTranslated(0, 0, -.045);
483  // body
484  glScaled(0.9, 2.0, 1);
485  glTranslated(0, 0, .04);
486  GLHelper::setColor(lighter);
488  glTranslated(0, 0, -.04);
489 }
490 
491 
492 void
494  const std::string& file = getVehicleType().getImgFile();
495  if (file != "") {
496  if (getVehicleType().getGuiShape() == SVS_PEDESTRIAN) {
497  glRotated(RAD2DEG(getAngle() + PI / 2.), 0, 0, 1);
498  }
499  int textureID = GUITexturesHelper::getTextureID(file);
500  if (textureID > 0) {
501  const SUMOReal exaggeration = s.personSize.getExaggeration(s);
502  const SUMOReal halfLength = getVehicleType().getLength() / 2.0 * exaggeration;
503  const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration;
504  GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, -halfLength, halfWidth, halfLength);
505  }
506  } else {
507  // fallback if no image is defined
509  }
510 }
511 
512 
513 // ------------ Additional visualisations
514 bool
516  return myAdditionalVisualizations.find(parent) != myAdditionalVisualizations.end() && (myAdditionalVisualizations.find(parent)->second & which) != 0;
517 }
518 
519 
520 void
522  if (myAdditionalVisualizations.find(parent) == myAdditionalVisualizations.end()) {
523  myAdditionalVisualizations[parent] = 0;
524  }
525  myAdditionalVisualizations[parent] |= which;
526  parent->addAdditionalGLVisualisation(this);
527 }
528 
529 
530 void
532  myAdditionalVisualizations[parent] &= ~which;
533  parent->removeAdditionalGLVisualisation(this);
534 }
535 /****************************************************************************/
536 
SUMOReal getSpeed() const
the current speed of the person
Definition: GUIPerson.cpp:438
virtual void startTrack(int)
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
Definition: GUIPerson.h:206
const std::vector< SUMOReal > & getShapeRotations() const
Definition: GUILane.cpp:732
SUMOReal getMaxSpeed() const
Get vehicle&#39;s maximum speed [m/s].
void drawAction_drawWalkingareaPath(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:284
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:200
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:202
GUIVisualizationTextSettings personName
SUMOReal getNaviDegree() const
return the current angle of the person
Definition: GUIPerson.cpp:424
WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:493
const SUMOVehicleParameter & getParameter() const
virtual SUMOReal getWaitingSeconds() const
the time this transportable spent waiting in seconds
Stores the information about how to visualize structures.
bool hasActiveAddVisualisation(GUISUMOAbstractView *const parent, int which) const
Returns whether the named feature is enabled in the given view.
Definition: GUIPerson.cpp:515
Start to track a vehicle.
Definition: GUIAppEnum.h:257
SUMOVehicle * getVehicle() const
The vehicle associated with this transportable.
SUMOReal getLength() const
Get vehicle&#39;s length [m].
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.
bool addAdditionalGLVisualisation(GUIGlObject *const which)
Adds an object to call its additional visualisation method.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
const std::string & getID() const
returns the id of the transportable
GUISUMOAbstractView * myParent
The parent window.
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
const std::map< std::string, std::string > & getMap() const
Returns the inner key/value map.
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:79
SUMOReal getColorValue(size_t activeScheme) const
gets the color value according to the current scheme index
Definition: GUIPerson.cpp:387
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
Definition: GUIPerson.cpp:333
const std::vector< SUMOReal > & getShapeLengths() const
Definition: GUILane.cpp:738
#define RAD2DEG(x)
Definition: GeomHelper.h:46
virtual SUMOReal getEdgePos() const
Return the position on the edge.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual SUMOReal getAngle() const
return the current angle of the transportable
void drawAction_drawAsPoly(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:467
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:123
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
The car-following model and parameter.
Definition: MSVehicleType.h:74
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIPerson.cpp:205
SUMOReal scale
information about a lane&#39;s width (temporary, used for a single view)
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:239
virtual int getTrackedID() const
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
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.h:167
bool removeAdditionalGLVisualisation(GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUIPerson.cpp:236
const MSVehicleType & getVehicleType() const
#define PI
Definition: polyfonts.c:61
const SUMOVTypeParameter & getParameter() const
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
Definition: GUIPerson.cpp:302
static void drawTexturedBox(unsigned int which, SUMOReal size)
Draws a named texture as a box with the given size.
const MSEdge * getEdge() const
Returns the current edge.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:443
PedestrianState * getPedestrianState() const
Definition: MSPerson.h:159
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
bool setFunctionalColor(size_t activeScheme) const
sets the color according to the current scheme index and some vehicle function
Definition: GUIPerson.cpp:342
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
const ConstMSEdgeVector & getRoute() const
Definition: MSPerson.h:155
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
StageType getCurrentStageType() const
the current stage type of the transportable
a person
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
const T getColor(const SUMOReal value) const
GUIColorer personColorer
The person colorer.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
Definition: RGBColor.cpp:150
void drawAction_drawAsTriangle(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:445
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
show the current walkingarea path
Definition: GUIPerson.h:198
const int VEHPARS_COLOR_SET
FXDEFMAP(GUIPerson::GUIPersonPopupMenu) GUIPersonPopupMenuMap[]
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:267
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:531
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIPerson.cpp:250
const MSEdge & getDestination() const
Returns the current destination.
Show persons&#39;s path on walkingarea.
Definition: GUIAppEnum.h:265
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
const MSEdge * getFromEdge() const
Returns the departure edge.
render as a pedestrian
SUMOReal getWaitingSeconds() const
the time this person spent waiting in seconds
Definition: GUIPerson.cpp:431
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:76
virtual SUMOReal getSpeed() const
the current speed of the transportable
SUMOReal getEdgePos() const
return the offset from the start of the current edge
Definition: GUIPerson.cpp:407
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:201
Stop to track a vehicle.
Definition: GUIAppEnum.h:259
Structure representing possible vehicle parameter.
Hide vehicle&#39;s current route.
Definition: GUIAppEnum.h:247
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
Definition: AbstractMutex.h:71
void addActiveAddVisualisation(GUISUMOAbstractView *const parent, int which)
Adds the named visualisation feature to the given view.
Definition: GUIPerson.cpp:521
SUMOReal y() const
Returns the y-position.
Definition: Position.h:68
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.
const std::string & getID() const
Returns the name of the vehicle type.
GUIVisualizationSizeSettings personSize
int personQuality
The quality of person drawing.
virtual Position getPosition() const
Return the Network coordinate of the transportable.
Show vehicle&#39;s current route.
Definition: GUIAppEnum.h:245
~GUIPerson()
destructor
Definition: GUIPerson.cpp:167
#define SUMOReal
Definition: config.h:214
std::string getImgFile() const
Get this vehicle type&#39;s raster model file name.
long onCmdShowCurrentRoute(FXObject *, FXSelector, void *)
Called if the current route of the person shall be shown.
Definition: GUIPerson.cpp:102
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
GUIGlObject * myObject
The object that belongs to this popup-menu.
Position getPosition() const
return the Network coordinate of the person
Definition: GUIPerson.cpp:414
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:242
A window containing a gl-object&#39;s parameter.
const int VTYPEPARS_COLOR_SET
SUMOReal getExaggeration(const GUIVisualizationSettings &s) const
return the drawing size including exaggeration and constantSize values
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
const PositionVector & getShape() const
Definition: GUILane.cpp:726
static RGBColor getColor()
gets the gl-color
Definition: GLHelper.cpp:449