Eclipse SUMO - Simulation of Urban MObility
GUIContainer.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // A MSContainer extended by some values for usage within the gui
17 /****************************************************************************/
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <cmath>
26 #include <vector>
27 #include <string>
28 #include <microsim/MSContainer.h>
37 #include <utils/geom/GeomHelper.h>
43 #include <utils/gui/div/GLHelper.h>
47 #include <gui/GUIGlobals.h>
48 #include "GUIContainer.h"
49 #include "GUINet.h"
50 #include "GUIEdge.h"
52 
53 //#define GUIContainer_DEBUG_DRAW_WALKING_AREA_SHAPE
54 
55 // ===========================================================================
56 // FOX callback mapping
57 // ===========================================================================
58 FXDEFMAP(GUIContainer::GUIContainerPopupMenu) GUIContainerPopupMenuMap[] = {
62 };
63 
64 // Object implementation
65 FXIMPLEMENT(GUIContainer::GUIContainerPopupMenu, GUIGLObjectPopupMenu, GUIContainerPopupMenuMap, ARRAYNUMBER(GUIContainerPopupMenuMap))
66 
67 #define WATER_WAY_OFFSET 6.0
68 
69 // ===========================================================================
70 // method definitions
71 // ===========================================================================
72 /* -------------------------------------------------------------------------
73  * GUIContainer::GUIContainerPopupMenu - methods
74  * ----------------------------------------------------------------------- */
76  GUIMainWindow& app, GUISUMOAbstractView& parent,
77  GUIGlObject& o, std::map<GUISUMOAbstractView*, int>& additionalVisualizations)
78  : GUIGLObjectPopupMenu(app, parent, o), myVehiclesAdditionalVisualizations(additionalVisualizations) {
79 }
80 
81 
83 
84 
85 long
87  GUIContainer* p = dynamic_cast<GUIContainer*>(myObject);
88  if (p == nullptr) {
89  return 1;
90  }
91  GUIParameterTableWindow* ret = new GUIParameterTableWindow(*myApplication, *p, p->getNumStages());
92  // add items
93  for (int stage = 1; stage < p->getNumStages(); stage++) {
94  ret->mkItem(toString(stage).c_str(), false, p->getStageSummary(stage));
95  }
96  // close building (use an object that is not Parameterised as argument)
97  Parameterised dummy;
98  ret->closeBuilding(&dummy);
99  return 1;
100 }
101 
102 
103 long
105  assert(myObject->getType() == GLO_PERSON);
106  if (myParent->getTrackedID() != static_cast<GUIContainer*>(myObject)->getGlID()) {
107  myParent->startTrack(static_cast<GUIContainer*>(myObject)->getGlID());
108  }
109  return 1;
110 }
111 
112 long
114  assert(myObject->getType() == GLO_PERSON);
115  myParent->stopTrack();
116  return 1;
117 }
118 
119 
120 
121 
122 /* -------------------------------------------------------------------------
123  * GUIContainer - methods
124  * ----------------------------------------------------------------------- */
126  MSContainer(pars, vtype, plan),
127  GUIGlObject(GLO_CONTAINER, pars->id) {
128 }
129 
130 
132 }
133 
134 
137  GUISUMOAbstractView& parent) {
139  buildPopupHeader(ret, app);
143  new FXMenuSeparator(ret);
144  if (parent.getTrackedID() != getGlID()) {
145  new FXMenuCommand(ret, "Start Tracking", nullptr, ret, MID_START_TRACK);
146  } else {
147  new FXMenuCommand(ret, "Stop Tracking", nullptr, ret, MID_STOP_TRACK);
148  }
149  //
150 
153  new FXMenuCommand(ret, "Show Plan", GUIIconSubSys::getIcon(ICON_APP_TABLE), ret, MID_SHOWPLAN);
154  new FXMenuSeparator(ret);
155  buildPositionCopyEntry(ret, false);
156  return ret;
157 }
158 
159 
164  new GUIParameterTableWindow(app, *this, 12 + (int)getParameter().getParametersMap().size());
165  // add items
166  ret->mkItem("stage", false, getCurrentStageDescription());
167  // there is always the "start" stage which we do not count here because it is not strictly part of the plan
168  ret->mkItem("stage index", false, toString(getNumStages() - getNumRemainingStages()) + " of " + toString(getNumStages() - 1));
169  ret->mkItem("start edge [id]", false, getFromEdge()->getID());
170  ret->mkItem("dest edge [id]", false, getDestination()->getID());
171  ret->mkItem("arrivalPos [m]", false, toString(getCurrentStage()->getArrivalPos()));
172  ret->mkItem("edge [id]", false, getEdge()->getID());
173  ret->mkItem("position [m]", true, new FunctionBinding<GUIContainer, double>(this, &GUIContainer::getEdgePos));
174  ret->mkItem("speed [m/s]", true, new FunctionBinding<GUIContainer, double>(this, &GUIContainer::getSpeed));
175  ret->mkItem("speed factor", false, getSpeedFactor());
176  ret->mkItem("angle [degree]", true, new FunctionBinding<GUIContainer, double>(this, &GUIContainer::getAngle));
177  ret->mkItem("waiting time [s]", true, new FunctionBinding<GUIContainer, double>(this, &GUIContainer::getWaitingSeconds));
178  ret->mkItem("desired depart [s]", false, time2string(getParameter().depart));
179  // close building
180  ret->closeBuilding(&getParameter());
181  return ret;
182 }
183 
184 
189  new GUIParameterTableWindow(app, *this, 8 + (int)myVType->getParameter().getParametersMap().size());
190  // add items
191  ret->mkItem("Type Information:", false, "");
192  ret->mkItem("type [id]", false, myVType->getID());
193  ret->mkItem("length", false, myVType->getLength());
194  ret->mkItem("width", false, myVType->getWidth());
195  ret->mkItem("height", false, myVType->getHeight());
196  ret->mkItem("minGap", false, myVType->getMinGap());
197  ret->mkItem("maximum speed [m/s]", false, myVType->getMaxSpeed());
198  // close building
199  ret->closeBuilding(&(myVType->getParameter()));
200  return ret;
201 }
202 
203 
204 Boundary
206  Boundary b;
207  // ensure that the vehicle is drawn, otherwise myPositionInVehicle will not be updated
208  b.add(getPosition());
209  b.grow(20);
210  return b;
211 }
212 
213 
214 void
216  glPushName(getGlID());
217  glPushMatrix();
218  Position p1 = getPosition();
220  p1 = myPositionInVehicle;
221  }
222  glTranslated(p1.x(), p1.y(), getType());
223  glRotated(90, 0, 0, 1);
224  // set container color
225  setColor(s);
226  // scale
227  const double upscale = s.containerSize.getExaggeration(s, this);
228  glScaled(upscale, upscale, 1);
229  switch (s.containerQuality) {
230  case 0:
231  case 1:
232  case 2:
234  break;
235  case 3:
236  default:
238  break;
239  }
240  glPopMatrix();
241 
242  drawName(p1, s.scale, s.containerName, s.angle);
243  glPopName();
244 }
245 
246 
247 void
249  glPushName(getGlID());
250  glPushMatrix();
251  /*
252  glTranslated(0, 0, getType() - .1); // don't draw on top of other cars
253  if (hasActiveAddVisualisation(parent, VO_SHOW_BEST_LANES)) {
254  drawBestLanes();
255  }
256  if (hasActiveAddVisualisation(parent, VO_SHOW_ROUTE)) {
257  drawRoute(s, 0, 0.25);
258  }
259  if (hasActiveAddVisualisation(parent, VO_SHOW_ALL_ROUTES)) {
260  if (getNumberReroutes() > 0) {
261  const int noReroutePlus1 = getNumberReroutes() + 1;
262  for (int i = noReroutePlus1 - 1; i >= 0; i--) {
263  double darken = double(0.4) / double(noReroutePlus1) * double(i);
264  drawRoute(s, i, darken);
265  }
266  } else {
267  drawRoute(s, 0, 0.25);
268  }
269  }
270  if (hasActiveAddVisualisation(parent, VO_SHOW_LFLINKITEMS)) {
271  for (DriveItemVector::const_iterator i = myLFLinkLanes.begin(); i != myLFLinkLanes.end(); ++i) {
272  if((*i).myLink==0) {
273  continue;
274  }
275  MSLink* link = (*i).myLink;
276  MSLane *via = link->getViaLane();
277  if (via == 0) {
278  via = link->getLane();
279  }
280  if (via != 0) {
281  Position p = via->getShape()[0];
282  if((*i).mySetRequest) {
283  glColor3f(0, 1, 0);
284  } else {
285  glColor3f(1, 0, 0);
286  }
287  glTranslated(p.x(), p.y(), -.1);
288  GLHelper::drawFilledCircle(1);
289  glTranslated(-p.x(), -p.y(), .1);
290  }
291  }
292  }
293  */
294  glPopMatrix();
295  glPopName();
296 }
297 
298 
299 
300 
301 void
303  const GUIColorer& c = s.containerColorer;
304  if (!setFunctionalColor(c.getActive())) {
306  }
307 }
308 
309 
310 bool
311 GUIContainer::setFunctionalColor(int activeScheme) const {
312  switch (activeScheme) {
313  case 0: {
314  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
316  return true;
317  }
318  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
319  GLHelper::setColor(getVehicleType().getColor());
320  return true;
321  }
322  return false;
323  }
324  case 2: {
325  if (getParameter().wasSet(VEHPARS_COLOR_SET)) {
327  return true;
328  }
329  return false;
330  }
331  case 3: {
332  if (getVehicleType().wasSet(VTYPEPARS_COLOR_SET)) {
333  GLHelper::setColor(getVehicleType().getColor());
334  return true;
335  }
336  return false;
337  }
338  case 8: {
339  double hue = GeomHelper::naviDegree(getAngle());
341  return true;
342  }
343  default:
344  return false;
345  }
346 }
347 
348 
349 double
350 GUIContainer::getColorValue(const GUIVisualizationSettings& /* s */, int activeScheme) const {
351  switch (activeScheme) {
352  case 4:
353  return getSpeed();
354  case 5:
355  if (isWaiting4Vehicle()) {
356  return 5;
357  } else {
358  return (double)getCurrentStageType();
359  }
360  case 6:
361  return getWaitingSeconds();
362  case 7:
364  }
365  return 0;
366 }
367 
368 
369 double
371  FXMutexLock locker(myLock);
372  return MSContainer::getEdgePos();
373 }
374 
375 
376 Position
378  FXMutexLock locker(myLock);
379  if (getCurrentStageType() == WAITING && getEdge()->getPermissions() == SVC_SHIP) {
380  MSLane* lane = getEdge()->getLanes().front(); //the most right lane of the water way
381  PositionVector laneShape = lane->getShape();
382  return laneShape.positionAtOffset2D(getEdgePos(), WATER_WAY_OFFSET);
383  }
384  return MSContainer::getPosition();
385 }
386 
387 
388 double
390  FXMutexLock locker(myLock);
391  return MSContainer::getAngle();
392 }
393 
394 
395 double
397  FXMutexLock locker(myLock);
399 }
400 
401 
402 double
404  FXMutexLock locker(myLock);
405  return MSContainer::getSpeed();
406 }
407 
408 
409 void
411  // draw pedestrian shape
412  glRotated(RAD2DEG(getAngle() + M_PI / 2.), 0, 0, 1);
413  glScaled(getVehicleType().getLength(), getVehicleType().getWidth(), 1);
414  glBegin(GL_QUADS);
415  glVertex2d(0, 0.5);
416  glVertex2d(0, -0.5);
417  glVertex2d(-1, -0.5);
418  glVertex2d(-1, 0.5);
419  glEnd();
420  GLHelper::setColor(GLHelper::getColor().changedBrightness(-30));
421  glTranslated(0, 0, .045);
422  glBegin(GL_QUADS);
423  glVertex2d(-0.1, 0.4);
424  glVertex2d(-0.1, -0.4);
425  glVertex2d(-0.9, -0.4);
426  glVertex2d(-0.9, 0.4);
427  glEnd();
428 }
429 
430 
431 void
433  const std::string& file = getVehicleType().getImgFile();
434  if (file != "") {
435  // @todo invent an option for controlling whether images should be rotated or not
436  //if (getVehicleType().getGuiShape() == SVS_CONTAINER) {
437  // glRotated(RAD2DEG(getAngle() + M_PI / 2.), 0, 0, 1);
438  //}
439  int textureID = GUITexturesHelper::getTextureID(file);
440  if (textureID > 0) {
441  const double exaggeration = s.personSize.getExaggeration(s, this);
442  const double halfLength = getVehicleType().getLength() / 2.0 * exaggeration;
443  const double halfWidth = getVehicleType().getWidth() / 2.0 * exaggeration;
444  GUITexturesHelper::drawTexturedBox(textureID, -halfWidth, -halfLength, halfWidth, halfLength);
445  }
446  } else {
447  // fallback if no image is defined
449  }
450 }
451 /****************************************************************************/
452 
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:181
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:66
GUIContainer::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUIContainer.cpp:205
GUIContainer::setColor
void setColor(const GUIVisualizationSettings &s) const
sets the color according to the currente settings
Definition: GUIContainer.cpp:302
GUIContainer::drawAction_drawAsImage
void drawAction_drawAsImage(const GUIVisualizationSettings &s) const
Definition: GUIContainer.cpp:432
MSVehicleType::getID
const std::string & getID() const
Returns the name of the vehicle type.
Definition: MSVehicleType.h:94
GLHelper::getColor
static RGBColor getColor()
gets the gl-color
Definition: GLHelper.cpp:622
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:63
MSTransportable::getDestination
const MSEdge * getDestination() const
Returns the current destination.
Definition: MSTransportable.h:618
Parameterised
An upper class for objects with additional parameters.
Definition: Parameterised.h:43
GUIContainer.h
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:73
MSTransportable::getStageSummary
std::string getStageSummary(int stageIndex) const
return textual summary for the given stage
Definition: MSTransportable.cpp:828
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
GUIParameterTableWindow.h
GUIGlObject::drawName
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Definition: GUIGlObject.cpp:355
GUIVisualizationSettings::angle
double angle
The current view rotation angle.
Definition: GUIVisualizationSettings.h:403
GUIGlObject::buildSelectionPopupEntry
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
Definition: GUIGlObject.cpp:236
GUIVisualizationSettings::containerName
GUIVisualizationTextSettings containerName
Definition: GUIVisualizationSettings.h:549
MSCModel_NonInteracting.h
GUIContainer::GUIContainerPopupMenu
Definition: GUIContainer.h:150
MID_START_TRACK
Start to track a vehicle.
Definition: GUIAppEnum.h:419
GUIGlobalSelection.h
GUIContainer::getPopUpMenu
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUIContainer.cpp:136
GUIContainer::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIContainer.cpp:161
GeomHelper::naviDegree
static double naviDegree(const double angle)
Definition: GeomHelper.cpp:194
GUIContainer::getSpeed
double getSpeed() const
the current speed of the container
Definition: GUIContainer.cpp:403
FXDEFMAP
FXDEFMAP(GUIContainer::GUIContainerPopupMenu) GUIContainerPopupMenuMap[]
GUIContainer::GUIContainerPopupMenu::onCmdStopTrack
long onCmdStopTrack(FXObject *, FXSelector, void *)
Called if the person shall not be tracked any longer.
Definition: GUIContainer.cpp:113
WATER_WAY_OFFSET
#define WATER_WAY_OFFSET
Definition: GUIContainer.cpp:67
GUIContainer::setFunctionalColor
bool setFunctionalColor(int activeScheme) const
sets the color according to the current scheme index and some vehicle function
Definition: GUIContainer.cpp:311
RAD2DEG
#define RAD2DEG(x)
Definition: GeomHelper.h:39
GLO_PERSON
Definition: GUIGlObjectTypes.h:160
GUIContainer::GUIContainerPopupMenu::onCmdShowPlan
long onCmdShowPlan(FXObject *, FXSelector, void *)
Called if the plan shall be shown.
Definition: GUIContainer.cpp:86
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:291
GUIVisualizationSettings::containerSize
GUIVisualizationSizeSettings containerSize
Definition: GUIVisualizationSettings.h:546
GLHelper.h
MID_STOP_TRACK
Stop to track a vehicle.
Definition: GUIAppEnum.h:421
GUINet.h
PositionVector
A list of positions.
Definition: PositionVector.h:46
GUIGLObjectPopupMenu
The popup menu of a globject.
Definition: GUIGLObjectPopupMenu.h:48
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:602
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:616
MSTransportable::getCurrentStageType
StageType getCurrentStageType() const
the current stage type of the transportable
Definition: MSTransportable.h:658
ICON_APP_TABLE
Definition: GUIIcons.h:114
GUIParameterTableWindow::closeBuilding
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
Definition: GUIParameterTableWindow.cpp:220
GUITexturesHelper::drawTexturedBox
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
Definition: GUITexturesHelper.cpp:73
GUIContainer::GUIContainerPopupMenu::GUIContainerPopupMenu
GUIContainerPopupMenu()
default constructor needed by FOX
Definition: GUIContainer.h:180
GUIContainer::GUIContainerPopupMenu::~GUIContainerPopupMenu
~GUIContainerPopupMenu()
Destructor.
Definition: GUIContainer.cpp:82
GUIAppEnum.h
SUMOVehicleParameter.h
MSTransportable::getSpeedFactor
virtual double getSpeedFactor() const
the current speed factor of the transportable (where applicable)
Definition: MSTransportable.h:653
GUIContainer::getPosition
Position getPosition() const
return the Network coordinate of the container
Definition: GUIContainer.cpp:377
MSVehicleType::getHeight
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
Definition: MSVehicleType.h:254
GUISUMOAbstractView.h
MSTransportable::getEdge
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSTransportable.h:628
Parameterised::getParametersMap
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
Definition: Parameterised.cpp:105
GUIContainer::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIContainer.cpp:215
MSTransportable::getCurrentStage
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
Definition: MSTransportable.h:678
MSTransportable::WAITING
Definition: MSTransportable.h:63
MSVehicleType::getWidth
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
Definition: MSVehicleType.h:247
GUIContainer::myPositionInVehicle
Position myPositionInVehicle
The position of a container while riding a vehicle.
Definition: GUIContainer.h:197
GUIGlObject::buildNameCopyPopupEntry
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
Definition: GUIGlObject.cpp:226
GUIContainer::drawAction_drawAsPoly
void drawAction_drawAsPoly(const GUIVisualizationSettings &s) const
Definition: GUIContainer.cpp:410
GUIContainer
Definition: GUIContainer.h:52
GUIPropertySchemeStorage::getScheme
T & getScheme()
Definition: GUIPropertySchemeStorage.h:80
MSTransportable::getNumStages
int getNumStages() const
Return the total number stages in this persons plan.
Definition: MSTransportable.cpp:740
MSTransportable::getWaitingSeconds
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
Definition: MSTransportable.cpp:724
VEHPARS_COLOR_SET
const int VEHPARS_COLOR_SET
Definition: SUMOVehicleParameter.h:46
GUIParameterTableWindow::mkItem
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
Definition: GUIParameterTableWindow.h:109
GUITexturesHelper.h
MSContainer
Definition: MSContainer.h:61
GUIGlobals.h
GUIGlObject::getGlID
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.cpp:150
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
GUIContainer::myLock
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
Definition: GUIContainer.h:194
CastingFunctionBinding.h
GUIVisualizationSettings::scale
double scale
information about a lane's width (temporary, used for a single view)
Definition: GUIVisualizationSettings.h:623
GUIApplicationWindow.h
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
GUIVisualizationSettings::containerQuality
int containerQuality
The quality of container drawing.
Definition: GUIVisualizationSettings.h:543
Position::x
double x() const
Returns the x-position.
Definition: Position.h:57
Boundary::add
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:79
time2string
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:65
GUIContainer::getEdgePos
double getEdgePos() const
return the offset from the start of the current edge
Definition: GUIContainer.cpp:370
MSTransportable::isWaiting4Vehicle
bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
Definition: MSTransportable.h:722
GUIContainer::~GUIContainer
~GUIContainer()
destructor
Definition: GUIContainer.cpp:131
MSVehicleType::getMinGap
double getMinGap() const
Get the free space in front of vehicles of this class.
Definition: MSVehicleType.h:126
GUIVisualizationSettings::personSize
GUIVisualizationSizeSettings personSize
Definition: GUIVisualizationSettings.h:529
GUIContainer::getTypeParameterWindow
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
Definition: GUIContainer.cpp:186
RGBColor::fromHSV
static RGBColor fromHSV(double h, double s, double v)
Converts the given hsv-triplet to rgb, inspired by http://alvyray.com/Papers/CG/hsv2rgb....
Definition: RGBColor.cpp:299
GLO_CONTAINER
Definition: GUIGlObjectTypes.h:154
GUIGlObject
Definition: GUIGlObject.h:66
MSContainer.h
MID_SHOWPLAN
Show transportable plan.
Definition: GUIAppEnum.h:385
MSTransportable::DRIVING
Definition: MSTransportable.h:65
SVC_SHIP
is an arbitrary ship
Definition: SUMOVehicleClass.h:196
MSTransportable::getEdgePos
virtual double getEdgePos() const
Return the position on the edge.
Definition: MSTransportable.cpp:709
GUIGlObject::buildPopupHeader
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
Definition: GUIGlObject.cpp:208
GLIncludes.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
StringUtils.h
MSLane::getShape
const PositionVector & getShape() const
Returns this lane's shape.
Definition: MSLane.h:478
GLObjectValuePassConnector.h
MSTransportable::MSTransportablePlan
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
Definition: MSTransportable.h:588
FunctionBinding.h
GUIMainWindow
Definition: GUIMainWindow.h:47
Position::y
double y() const
Returns the y-position.
Definition: Position.h:62
MSTransportable::getNumRemainingStages
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
Definition: MSTransportable.cpp:735
M_PI
#define M_PI
Definition: odrSpiral.cpp:40
PositionVector::positionAtOffset2D
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
Definition: PositionVector.cpp:268
MSTransportable::getSpeed
virtual double getSpeed() const
the current speed of the transportable
Definition: MSTransportable.cpp:729
MSTransportable::getArrivalPos
double getArrivalPos() const
returns the final arrival pos
Definition: MSTransportable.h:741
GUIContainer::drawGLAdditional
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additionally triggered visualisations.
Definition: GUIContainer.cpp:248
MSTransportable::getVehicleType
const MSVehicleType & getVehicleType() const
Returns the vehicle's type.
Definition: MSTransportable.h:607
GUIContainer::myAdditionalVisualizations
std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
Enabled visualisations, per view.
Definition: GUIContainer.h:187
MSVehicleType::getLength
double getLength() const
Get vehicle's length [m].
Definition: MSVehicleType.h:110
GUIContainer::getColorValue
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
Definition: GUIContainer.cpp:350
GUIContainer::getWaitingSeconds
double getWaitingSeconds() const
the time this container spent waiting in seconds
Definition: GUIContainer.cpp:396
MSVehicleType::getImgFile
std::string getImgFile() const
Get this vehicle type's raster model file name.
Definition: MSVehicleType.h:277
GUIEdge.h
GUIGlObject::buildShowTypeParamsPopupEntry
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
Definition: GUIGlObject.cpp:258
GUIGlObject::buildShowParamsPopupEntry
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
Definition: GUIGlObject.cpp:249
MSTransportable::getID
const std::string & getID() const
returns the id of the transportable
Definition: MSTransportable.cpp:694
MSVehicleType::getParameter
const SUMOVTypeParameter & getParameter() const
Definition: MSVehicleType.h:556
gSelected
GUISelectedStorage gSelected
A global holder of selected objects.
Definition: GUIGlobalSelection.cpp:34
GUIContainer::getAngle
double getAngle() const
return the current angle of the container
Definition: GUIContainer.cpp:389
GUIGlObject::buildCenterPopupEntry
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
Definition: GUIGlObject.cpp:217
GUIGlObject::buildPositionCopyEntry
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
Definition: GUIGlObject.cpp:267
MSTransportable::getPosition
virtual Position getPosition() const
Return the Network coordinate of the transportable.
Definition: MSTransportable.cpp:714
GUIContainer::GUIContainer
GUIContainer(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
Constructor.
Definition: GUIContainer.cpp:125
MSEdge::getLanes
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Definition: MSEdge.h:165
MSDevice_Vehroutes.h
MSVehicleType::getMaxSpeed
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
Definition: MSVehicleType.h:162
GUIContainer::GUIContainerPopupMenu::onCmdStartTrack
long onCmdStartTrack(FXObject *, FXSelector, void *)
Called if the person shall be tracked.
Definition: GUIContainer.cpp:104
config.h
GeomHelper.h
GUIVisualizationSettings::containerColorer
GUIColorer containerColorer
The container colorer.
Definition: GUIVisualizationSettings.h:540
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:301
MSTransportable::getFromEdge
const MSEdge * getFromEdge() const
Returns the departure edge.
Definition: MSTransportable.h:633
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:346
FunctionBinding
Definition: FunctionBinding.h:41
VTYPEPARS_COLOR_SET
const int VTYPEPARS_COLOR_SET
Definition: SUMOVTypeParameter.h:52
MSTransportable::myVType
MSVehicleType * myVType
This transportable's type. (mainly used for drawing related information Note sure if it is really nec...
Definition: MSTransportable.h:802
GUITexturesHelper::getTextureID
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
Definition: GUITexturesHelper.cpp:113
MSTransportable::getParameter
const SUMOVehicleParameter & getParameter() const
Definition: MSTransportable.h:603
MSVehicleControl.h
MSTransportable::getAngle
virtual double getAngle() const
return the current angle of the transportable
Definition: MSTransportable.cpp:719
PositionVector.h
GUIPropertyScheme::getColor
const T getColor(const double value) const
Definition: GUIPropertyScheme.h:111
GUISUMOAbstractView::getTrackedID
virtual GUIGlID getTrackedID() const
get tracked id
Definition: GUISUMOAbstractView.cpp:1397
GUIPropertySchemeStorage::getActive
int getActive() const
Definition: GUIPropertySchemeStorage.h:76
GUIVisualizationSizeSettings::getExaggeration
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
Definition: GUIVisualizationSettings.cpp:212
MSAbstractLaneChangeModel.h
GUIPropertySchemeStorage< GUIColorScheme >
GUISelectedStorage::isSelected
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
Definition: GUISelectedStorage.cpp:95
MSTransportable::getCurrentStageDescription
std::string getCurrentStageDescription() const
Returns the current stage description as a string.
Definition: MSTransportable.h:673