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-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
21 // A MSVehicle extended by some values for usage within the gui
22 /****************************************************************************/
23 #pragma once
24 #include <config.h>
25 
26 #include <vector>
27 #include <set>
28 #include <string>
29 #include <guisim/GUIBaseVehicle.h>
30 #include <mesosim/MEVehicle.h>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
52 class GUIMEVehicle : public MEVehicle, public GUIBaseVehicle {
53 public:
61  GUIMEVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
62  MSVehicleType* type, const double speedFactor);
63 
64 
66  ~GUIMEVehicle();
67 
68 
73  Position getPosition(const double offset = 0) const {
74  return MEVehicle::getPosition(offset);
75  }
76 
82  virtual Boundary getCenteringBoundary() const;
83 
88  double getAngle() const {
89  return MEVehicle::getAngle();
90  }
91 
93  double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
94 
96  void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const;
97 
102  double getLastLaneChangeOffset() const;
103 
107  void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future, bool noLoop, const RGBColor& col) const;
108 
110  std::string getStopInfo() const;
111 
112  std::string getEdgeID() const;
113 
114  int getSegmentIndex() const;
115 
117  void selectBlockingFoes() const;
118 
127 
135 
136 };
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
A MSVehicle extended by some values for usage within the gui.
A MSVehicle extended by some values for usage within the gui.
Definition: GUIMEVehicle.h:52
void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, bool asImage) const
draws the given guiShape with distinct carriages/modules
std::string getStopInfo() const
retrieve information about the current stop state
GUIMEVehicle(SUMOVehicleParameter *pars, const MSRoute *route, MSVehicleType *type, const double speedFactor)
Constructor.
int getSegmentIndex() const
~GUIMEVehicle()
destructor
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
virtual Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window.
double getLastLaneChangeOffset() const
Returns the time since the last lane change in seconds.
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: GUIMEVehicle.h:73
void selectBlockingFoes() const
adds the blocking foes to the current selection
double getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:88
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
std::string getEdgeID() const
void drawRouteHelper(const GUIVisualizationSettings &s, const MSRoute &r, bool future, bool noLoop, const RGBColor &col) const
Draws the route.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
A vehicle from the mesoscopic point of view.
Definition: MEVehicle.h:42
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
Definition: MEVehicle.cpp:100
double getAngle() const
Returns the vehicle's direction in degrees.
Definition: MEVehicle.cpp:86
The car-following model and parameter.
Definition: MSVehicleType.h:62
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:36
Structure representing possible vehicle parameter.