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  GUIGlID trackedID = parent.getTrackedID();
191  if (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
239  b.add(getPosition());
240  b.grow(MAX2(getVehicleType().getWidth(), getVehicleType().getLength()));
241  return b;
242 }
243 
244 
245 void
247  glPushName(getGlID());
248  glPushMatrix();
249  Position p1 = getPosition();
251  p1 = myPositionInVehicle;
252  }
253  glTranslated(p1.x(), p1.y(), getType());
254  glRotated(90, 0, 0, 1);
255  // set person color
256  setColor(s);
257  // scale
258  const SUMOReal upscale = s.personSize.getExaggeration(s, 80);
259  glScaled(upscale, upscale, 1);
260  switch (s.personQuality) {
261  case 0:
262  case 1:
264  break;
265  case 2:
267  break;
268  case 3:
269  default:
271  break;
272  }
273  glPopMatrix();
274 #ifdef GUIPerson_DEBUG_DRAW_WALKINGAREA_PATHS
276 #endif
277  drawName(p1, s.scale, s.personName);
278  glPopName();
279 }
280 
281 void
284  if (stage != 0) {
285  setColor(s);
286  MSPModel_Striping::PState* stripingState = dynamic_cast<MSPModel_Striping::PState*>(stage->getPedestrianState());
287  if (stripingState != 0) {
288  MSPModel_Striping::WalkingAreaPath* waPath = stripingState->myWalkingAreaPath;
289  if (waPath != 0) {
290  glPushMatrix();
291  glTranslated(0, 0, getType());
292  GLHelper::drawBoxLines(waPath->shape, 0.05);
293  glPopMatrix();
294  }
295  }
296  }
297 }
298 
299 void
301  glPushName(getGlID());
302  glPushMatrix();
303  glTranslated(0, 0, getType() - .1); // don't draw on top of other cars
306  }
309  setColor(s);
310  RGBColor current = GLHelper::getColor();
311  RGBColor darker = current.changedBrightness(-51);
312  GLHelper::setColor(darker);
314  assert(stage != 0);
315  const SUMOReal exaggeration = s.personSize.getExaggeration(s);
316  const ConstMSEdgeVector& edges = stage->getRoute();
317  for (ConstMSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
318  GUILane* lane = static_cast<GUILane*>((*it)->getLanes()[0]);
319  GLHelper::drawBoxLines(lane->getShape(), lane->getShapeRotations(), lane->getShapeLengths(), exaggeration);
320  }
321  }
322  }
323  glPopMatrix();
324  glPopName();
325 }
326 
327 
328 
329 
330 void
332  const GUIColorer& c = s.personColorer;
333  if (!setFunctionalColor(c.getActive())) {
335  }
336 }
337 
338 
339 bool
340 GUIPerson::setFunctionalColor(int activeScheme) const {
341  switch (activeScheme) {
342  case 0: {
343  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
345  return true;
346  }
347  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
348  GLHelper::setColor(getVehicleType().getColor());
349  return true;
350  }
351  return false;
352  }
353  case 2: {
354  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
356  return true;
357  }
358  return false;
359  }
360  case 3: {
361  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
362  GLHelper::setColor(getVehicleType().getColor());
363  return true;
364  }
365  return false;
366  }
367  case 8: { // color by angle
370  return true;
371  }
372  case 9: { // color randomly (by pointer)
373  const SUMOReal hue = (long)this % 360; // [0-360]
374  const SUMOReal sat = (((long)this / 360) % 67) / 100.0 + 0.33; // [0.33-1]
375  GLHelper::setColor(RGBColor::fromHSV(hue, sat, 1.));
376  return true;
377  }
378  default:
379  return false;
380  }
381 }
382 
383 
384 SUMOReal
385 GUIPerson::getColorValue(int activeScheme) const {
386  switch (activeScheme) {
387  case 4:
388  return getSpeed();
389  case 5:
390  if (isWaiting4Vehicle()) {
391  return 3;
392  } else {
393  return (SUMOReal)getCurrentStageType();
394  }
395  case 6:
396  return getWaitingSeconds();
397  case 7:
399  }
400  return 0;
401 }
402 
403 
404 SUMOReal
407  return MSPerson::getEdgePos();
408 }
409 
410 
411 Position
414  return MSPerson::getPosition();
415 }
416 
417 
418 SUMOReal
422 }
423 
424 
425 SUMOReal
429 }
430 
431 
432 SUMOReal
435  return MSPerson::getSpeed();
436 }
437 
438 
439 void
441  // draw triangle pointing forward
442  glRotated(RAD2DEG(getAngle() + PI / 2.), 0, 0, 1);
443  glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1);
444  glBegin(GL_TRIANGLES);
445  glVertex2d(0., 0.);
446  glVertex2d(1, -0.5);
447  glVertex2d(1, 0.5);
448  glEnd();
449  // draw a smaller triangle to indicate facing
450  GLHelper::setColor(GLHelper::getColor().changedBrightness(-64));
451  glTranslated(0, 0, .045);
452  glBegin(GL_TRIANGLES);
453  glVertex2d(0., 0.);
454  glVertex2d(0.5, -0.25);
455  glVertex2d(0.5, 0.25);
456  glEnd();
457  glTranslated(0, 0, -.045);
458 }
459 
460 
461 void
463  // draw pedestrian shape
464  glRotated(GeomHelper::naviDegree(getAngle()) - 180, 0, 0, -1);
465  glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1);
467  glTranslated(0, 0, .045);
468  // head
469  glScaled(1, 0.5, 1.);
471  // nose
472  glBegin(GL_TRIANGLES);
473  glVertex2d(0.0, -0.2);
474  glVertex2d(0.0, 0.2);
475  glVertex2d(-0.6, 0.0);
476  glEnd();
477  glTranslated(0, 0, -.045);
478  // body
479  glScaled(0.9, 2.0, 1);
480  glTranslated(0, 0, .04);
481  GLHelper::setColor(lighter);
483  glTranslated(0, 0, -.04);
484 }
485 
486 
487 void
489  const std::string& file = getVehicleType().getImgFile();
490  if (file != "") {
491  if (getVehicleType().getGuiShape() == SVS_PEDESTRIAN) {
492  glRotated(RAD2DEG(getAngle() + PI / 2.), 0, 0, 1);
493  }
494  int textureID = GUITexturesHelper::getTextureID(file);
495  if (textureID > 0) {
496  const SUMOReal exaggeration = s.personSize.getExaggeration(s);
497  const SUMOReal halfLength = getVehicleType().getLength() / 2.0 * exaggeration;
498  const SUMOReal halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration;
499  GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, -halfLength, halfWidth, halfLength);
500  }
501  } else {
502  // fallback if no image is defined
504  }
505 }
506 
507 
508 // ------------ Additional visualisations
509 bool
511  return myAdditionalVisualizations.find(parent) != myAdditionalVisualizations.end() && (myAdditionalVisualizations.find(parent)->second & which) != 0;
512 }
513 
514 
515 void
517  if (myAdditionalVisualizations.find(parent) == myAdditionalVisualizations.end()) {
518  myAdditionalVisualizations[parent] = 0;
519  }
520  myAdditionalVisualizations[parent] |= which;
521  parent->addAdditionalGLVisualisation(this);
522 }
523 
524 
525 void
527  myAdditionalVisualizations[parent] &= ~which;
528  parent->removeAdditionalGLVisualisation(this);
529 }
530 /****************************************************************************/
531 
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
SUMOReal getSpeed() const
the current speed of the person
Definition: GUIPerson.cpp:433
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
Definition: GUIPerson.h:205
const std::vector< SUMOReal > & getShapeRotations() const
Definition: GUILane.cpp:806
SUMOReal getMaxSpeed() const
Get vehicle&#39;s maximum speed [m/s].
void drawAction_drawWalkingareaPath(const GUIVisualizationSettings &s) const
Definition: GUIPerson.cpp:282
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
GUIVisualizationTextSettings personName
SUMOReal getNaviDegree() const
return the current angle of the person
Definition: GUIPerson.cpp:419
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:488
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:510
Start to track a vehicle.
Definition: GUIAppEnum.h:271
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.
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::string & getID() const
returns the id of the transportable
GUISUMOAbstractView * myParent
The parent window.
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
bool addAdditionalGLVisualisation(const GUIGlObject *const which)
Adds an object to call its additional visualisation method.
const std::map< std::string, std::string > & getMap() const
Returns the inner key/value map.
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
Definition: GUIPerson.cpp:331
const std::vector< SUMOReal > & getShapeLengths() const
Definition: GUILane.cpp:812
#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:462
virtual void stopTrack()
stop track
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.
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: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
virtual GUIGlID getTrackedID() const
get tracked id
~GUIPersonPopupMenu()
Destructor.
Definition: GUIPerson.cpp:99
MFXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
Definition: GUIPerson.h:238
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.
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
virtual void startTrack(int)
star track
#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:300
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.
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:440
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
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
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:281
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:526
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIPerson.cpp:246
const MSEdge & getDestination() const
Returns the current destination.
Show persons&#39;s path on walkingarea.
Definition: GUIAppEnum.h:279
unsigned int GUIGlID
Definition: GUIGlObject.h:50
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:426
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:405
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:273
Structure representing possible vehicle parameter.
Hide vehicle&#39;s current route.
Definition: GUIAppEnum.h:261
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:516
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:259
~GUIPerson()
destructor
Definition: GUIPerson.cpp:167
#define SUMOReal
Definition: config.h:213
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.
SUMOReal getColorValue(int activeScheme) const
gets the color value according to the current scheme index
Definition: GUIPerson.cpp:385
Position getPosition() const
return the Network coordinate of the person
Definition: GUIPerson.cpp:412
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.
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
Definition: GUIPerson.cpp:340
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
const PositionVector & getShape() const
Definition: GUILane.cpp:800
static RGBColor getColor()
gets the gl-color
Definition: GLHelper.cpp:449