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-2016 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  const MSVehicleType* type, const SUMOReal speedFactor);
72 
73 
75  ~GUIMEVehicle();
76 
77 
82  Position getPosition(const SUMOReal offset = 0) const {
83  return MEVehicle::getPosition(offset);
84  }
85 
90  SUMOReal getAngle() const {
91  return MEVehicle::getAngle();
92  }
93 
95  SUMOReal getColorValue(int activeScheme) const;
96 
98  bool drawAction_drawCarriageClass(const GUIVisualizationSettings& s, SUMOVehicleShape guiShape, bool asImage) const;
99 
105 
109  void drawRouteHelper(const MSRoute& r, SUMOReal 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
Position getPosition(const SUMOReal offset=0) const
Return current position (x/y, cartesian)
Definition: GUIMEVehicle.h:82
Stores the information about how to visualize structures.
void drawRouteHelper(const MSRoute &r, SUMOReal exaggeration) 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:74
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:46
~GUIMEVehicle()
destructor
Position getPosition(const SUMOReal offset=0) const
Return current position (x/y, cartesian)
Definition: MEVehicle.cpp:106
SUMOReal 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.
SUMOReal getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:90
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
SUMOReal getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
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
#define SUMOReal
Definition: config.h:213
GUIMEVehicle(SUMOVehicleParameter *pars, const MSRoute *route, const MSVehicleType *type, const SUMOReal speedFactor)
Constructor.
A window containing a gl-object&#39;s parameter.
SUMOReal getAngle() const
Returns the vehicle&#39;s direction in degrees.
Definition: MEVehicle.cpp:92