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  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 
A vehicle from the mesoscopic point of view.
Definition: MEVehicle.h:52
Stores the information about how to visualize structures.
double getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:90
double getColorValue(int activeScheme) const
gets the color value according to the current scheme index
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
The car-following model and parameter.
Definition: MSVehicleType.h:73
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void drawRouteHelper(const MSRoute &r, double exaggeration) const
Draws the route.
double getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
~GUIMEVehicle()
destructor
double getAngle() const
Returns the vehicle&#39;s direction in degrees.
Definition: MEVehicle.cpp:89
A MSVehicle extended by some values for usage within the gui.
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MEVehicle.cpp:103
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 ...
std::string getStopInfo() const
retrieve information about the current stop state
Structure representing possible vehicle parameter.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
void selectBlockingFoes() const
adds the blocking foes to the current selection
A MSVehicle extended by some values for usage within the gui.
Definition: GUIMEVehicle.h:61
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: GUIMEVehicle.h:82
GUIMEVehicle(SUMOVehicleParameter *pars, const MSRoute *route, MSVehicleType *type, const double speedFactor)
Constructor.
A window containing a gl-object&#39;s parameter.