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-2018 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(int activeScheme) const;
90 
92  bool drawAction_drawCarriageClass(const GUIVisualizationSettings& s, SUMOVehicleShape guiShape, bool asImage) const;
93 
98  double getLastLaneChangeOffset() const;
99 
103  void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r) const;
104 
106  std::string getStopInfo() const;
107 
109  void selectBlockingFoes() const;
110 
119 
127 
128 };
129 
130 
131 #endif
132 
133 /****************************************************************************/
134 
double getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:84
double getAngle() const
Returns the vehicle&#39;s direction in degrees.
Definition: MEVehicle.cpp:86
A vehicle from the mesoscopic point of view.
Definition: MEVehicle.h:45
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:100
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:66
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: GUIMEVehicle.h:76
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:39
~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:55
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.