SUMO - Simulation of Urban MObility
GUIMEVehicle.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // A MSVehicle extended by some values for usage within the gui
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef GUIMEVehicle_h
24 #define GUIMEVehicle_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <vector>
37 #include <set>
38 #include <string>
39 #include <guisim/GUIBaseVehicle.h>
40 #include <mesosim/MEVehicle.h>
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
61 class GUIMEVehicle : public MEVehicle, public GUIBaseVehicle {
62 public:
70  GUIMEVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
71  const MSVehicleType* type, const double speedFactor);
72 
73 
75  ~GUIMEVehicle();
76 
77 
82  Position getPosition(const double offset = 0) const {
83  return MEVehicle::getPosition(offset);
84  }
85 
90  double getAngle() const {
91  return MEVehicle::getAngle();
92  }
93 
95  double getColorValue(int activeScheme) const;
96 
98  bool drawAction_drawCarriageClass(const GUIVisualizationSettings& s, SUMOVehicleShape guiShape, bool asImage) const;
99 
104  double getLastLaneChangeOffset() const;
105 
109  void drawRouteHelper(const MSRoute& r, double exaggeration) const;
110 
112  std::string getStopInfo() const;
113 
115  void selectBlockingFoes() const;
116 
125 
133 
134 };
135 
136 
137 #endif
138 
139 /****************************************************************************/
140 
double getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:90
double getAngle() const
Returns the vehicle&#39;s direction in degrees.
Definition: MEVehicle.cpp:88
A vehicle from the mesoscopic point of view.
Definition: MEVehicle.h:52
std::string getStopInfo() const
retrieve information about the current stop state
Stores the information about how to visualize structures.
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MEVehicle.cpp:102
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
The car-following model and parameter.
Definition: MSVehicleType.h:74
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: GUIMEVehicle.h:82
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GUIMEVehicle(SUMOVehicleParameter *pars, const MSRoute *route, const MSVehicleType *type, const double speedFactor)
Constructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
~GUIMEVehicle()
destructor
void selectBlockingFoes() const
adds the blocking foes to the current selection
double getColorValue(int activeScheme) const
gets the color value according to the current scheme index
A MSVehicle extended by some values for usage within the gui.
bool drawAction_drawCarriageClass(const GUIVisualizationSettings &s, SUMOVehicleShape guiShape, bool asImage) const
draws the given guiShape if it has distinc carriages/modules and eturns true if so ...
Structure representing possible vehicle parameter.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
A MSVehicle extended by some values for usage within the gui.
Definition: GUIMEVehicle.h:61
double getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
A window containing a gl-object&#39;s parameter.
void drawRouteHelper(const MSRoute &r, double exaggeration) const
Draws the route.