Eclipse 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-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 /****************************************************************************/
17 // A MSVehicle extended by some values for usage within the gui
18 /****************************************************************************/
19 #ifndef GUIMEVehicle_h
20 #define GUIMEVehicle_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <vector>
29 #include <set>
30 #include <string>
31 #include <guisim/GUIBaseVehicle.h>
32 #include <mesosim/MEVehicle.h>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
54 class GUIMEVehicle : public MEVehicle, public GUIBaseVehicle {
55 public:
63  GUIMEVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
64  MSVehicleType* type, const double speedFactor);
65 
66 
68  ~GUIMEVehicle();
69 
70 
75  Position getPosition(const double offset = 0) const {
76  return MEVehicle::getPosition(offset);
77  }
78 
83  double getAngle() const {
84  return MEVehicle::getAngle();
85  }
86 
88  double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
89 
91  void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const;
92 
97  double getLastLaneChangeOffset() const;
98 
102  void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future, const RGBColor& col) const;
103 
105  std::string getStopInfo() const;
106 
107  std::string getEdgeID() const;
108 
109  int getSegmentIndex() const;
110 
112  void selectBlockingFoes() const;
113 
122 
130 
131 };
132 
133 
134 #endif
135 
136 /****************************************************************************/
137 
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:65
MEVehicle
A vehicle from the mesoscopic point of view.
Definition: MEVehicle.h:44
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:62
GUIBaseVehicle
A MSVehicle extended by some values for usage within the gui.
Definition: GUIBaseVehicle.h:61
GUIMEVehicle::getSegmentIndex
int getSegmentIndex() const
Definition: GUIMEVehicle.cpp:251
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
GUIMEVehicle::selectBlockingFoes
void selectBlockingFoes() const
adds the blocking foes to the current selection
Definition: GUIMEVehicle.cpp:257
GUIMEVehicle::~GUIMEVehicle
~GUIMEVehicle()
destructor
Definition: GUIMEVehicle.cpp:57
MEVehicle::getPosition
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MEVehicle.cpp:99
GUIMEVehicle::drawRouteHelper
void drawRouteHelper(const GUIVisualizationSettings &s, const MSRoute &r, bool future, const RGBColor &col) const
Draws the route.
Definition: GUIMEVehicle.cpp:214
GUIMEVehicle
A MSVehicle extended by some values for usage within the gui.
Definition: GUIMEVehicle.h:54
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:297
MSRoute
Definition: MSRoute.h:66
GUIMEVehicle::getAngle
double getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:83
RGBColor
Definition: RGBColor.h:39
MEVehicle::getAngle
double getAngle() const
Returns the vehicle's direction in degrees.
Definition: MEVehicle.cpp:85
GUIMEVehicle::getEdgeID
std::string getEdgeID() const
Definition: GUIMEVehicle.cpp:246
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GUIMEVehicle::drawAction_drawCarriageClass
void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, bool asImage) const
draws the given guiShape with distinct carriages/modules
Definition: GUIMEVehicle.cpp:152
GUIMEVehicle::getPosition
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: GUIMEVehicle.h:75
GUIMEVehicle::getTypeParameterWindow
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
Definition: GUIMEVehicle.cpp:127
GUIMainWindow
Definition: GUIMainWindow.h:46
GUIMEVehicle::getLastLaneChangeOffset
double getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
Definition: GUIMEVehicle.cpp:226
MEVehicle.h
GUIMEVehicle::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIMEVehicle.cpp:61
GUIBaseVehicle.h
config.h
GUIMEVehicle::getStopInfo
std::string getStopInfo() const
retrieve information about the current stop state
Definition: GUIMEVehicle.cpp:233
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
GUIMEVehicle::getColorValue
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
Definition: GUIMEVehicle.cpp:158
GUIMEVehicle::GUIMEVehicle
GUIMEVehicle(SUMOVehicleParameter *pars, const MSRoute *route, MSVehicleType *type, const double speedFactor)
Constructor.
Definition: GUIMEVehicle.cpp:47