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 /****************************************************************************/
18 // A MSVehicle extended by some values for usage within the gui
19 /****************************************************************************/
20 #ifndef GUIMEVehicle_h
21 #define GUIMEVehicle_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <vector>
30 #include <set>
31 #include <string>
32 #include <guisim/GUIBaseVehicle.h>
33 #include <mesosim/MEVehicle.h>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
55 class GUIMEVehicle : public MEVehicle, public GUIBaseVehicle {
56 public:
64  GUIMEVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
65  MSVehicleType* type, const double speedFactor);
66 
67 
69  ~GUIMEVehicle();
70 
71 
76  Position getPosition(const double offset = 0) const {
77  return MEVehicle::getPosition(offset);
78  }
79 
84  double getAngle() const {
85  return MEVehicle::getAngle();
86  }
87 
89  double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
90 
92  void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const;
93 
98  double getLastLaneChangeOffset() const;
99 
103  void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future) const;
104 
106  std::string getStopInfo() const;
107 
108  std::string getEdgeID() const;
109 
110  int getSegmentIndex() const;
111 
113  void selectBlockingFoes() const;
114 
123 
131 
132 };
133 
134 
135 #endif
136 
137 /****************************************************************************/
138 
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:66
MEVehicle
A vehicle from the mesoscopic point of view.
Definition: MEVehicle.h:45
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:63
GUIBaseVehicle
A MSVehicle extended by some values for usage within the gui.
Definition: GUIBaseVehicle.h:62
GUIMEVehicle::getSegmentIndex
int getSegmentIndex() const
Definition: GUIMEVehicle.cpp:252
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:73
GUIMEVehicle::selectBlockingFoes
void selectBlockingFoes() const
adds the blocking foes to the current selection
Definition: GUIMEVehicle.cpp:258
GUIMEVehicle::~GUIMEVehicle
~GUIMEVehicle()
destructor
Definition: GUIMEVehicle.cpp:58
MEVehicle::getPosition
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MEVehicle.cpp:100
GUIMEVehicle
A MSVehicle extended by some values for usage within the gui.
Definition: GUIMEVehicle.h:55
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:291
MSRoute
Definition: MSRoute.h:67
GUIMEVehicle::getAngle
double getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:84
MEVehicle::getAngle
double getAngle() const
Returns the vehicle's direction in degrees.
Definition: MEVehicle.cpp:86
GUIMEVehicle::getEdgeID
std::string getEdgeID() const
Definition: GUIMEVehicle.cpp:247
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
GUIMEVehicle::drawAction_drawCarriageClass
void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, bool asImage) const
draws the given guiShape with distinct carriages/modules
Definition: GUIMEVehicle.cpp:153
GUIMEVehicle::getPosition
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: GUIMEVehicle.h:76
GUIMEVehicle::getTypeParameterWindow
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
Definition: GUIMEVehicle.cpp:128
GUIMainWindow
Definition: GUIMainWindow.h:47
GUIMEVehicle::getLastLaneChangeOffset
double getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
Definition: GUIMEVehicle.cpp:227
MEVehicle.h
GUIMEVehicle::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIMEVehicle.cpp:62
GUIBaseVehicle.h
config.h
GUIMEVehicle::getStopInfo
std::string getStopInfo() const
retrieve information about the current stop state
Definition: GUIMEVehicle.cpp:234
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:346
GUIMEVehicle::getColorValue
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
Definition: GUIMEVehicle.cpp:159
GUIMEVehicle::GUIMEVehicle
GUIMEVehicle(SUMOVehicleParameter *pars, const MSRoute *route, MSVehicleType *type, const double speedFactor)
Constructor.
Definition: GUIMEVehicle.cpp:48
GUIMEVehicle::drawRouteHelper
void drawRouteHelper(const GUIVisualizationSettings &s, const MSRoute &r, bool future) const
Draws the route.
Definition: GUIMEVehicle.cpp:215