SUMO - Simulation of Urban MObility
GUIMEVehicle.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
20 // A MSVehicle extended by some values for usage within the gui
21 /****************************************************************************/
22 #ifndef GUIMEVehicle_h
23 #define GUIMEVehicle_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <vector>
36 #include <set>
37 #include <string>
38 #include <guisim/GUIBaseVehicle.h>
39 #include <mesosim/MEVehicle.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
61 class GUIMEVehicle : public MEVehicle, public GUIBaseVehicle {
62 public:
70  GUIMEVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
71  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 GUIVisualizationSettings& s, const MSRoute& r) 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:51
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
void drawRouteHelper(const GUIVisualizationSettings &s, const MSRoute &r) const
Draws the route.
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
The car-following model and parameter.
Definition: MSVehicleType.h:72
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.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:45
~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.
GUIMEVehicle(SUMOVehicleParameter *pars, const MSRoute *route, MSVehicleType *type, const double speedFactor)
Constructor.
A window containing a gl-object&#39;s parameter.