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-2022 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>
30#include <mesosim/MEVehicle.h>
31
32
33// ===========================================================================
34// class declarations
35// ===========================================================================
38
39
40// ===========================================================================
41// class definitions
42// ===========================================================================
52class GUIMEVehicle : public MEVehicle, public GUIBaseVehicle {
53public:
61 GUIMEVehicle(SUMOVehicleParameter* pars, const MSRoute* route,
62 MSVehicleType* type, const double speedFactor);
63
64
67
68
73 Position getPosition(const double offset = 0) const {
74 return MEVehicle::getPosition(offset);
75 }
76
78 double getExaggeration(const GUIVisualizationSettings& s) const;
79
85 virtual Boundary getCenteringBoundary() const;
86
91 double getAngle() const {
92 return MEVehicle::getAngle();
93 }
94
96 double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
97
99 void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const;
100
105 double getLastLaneChangeOffset() const;
106
110 void drawRouteHelper(const GUIVisualizationSettings& s, const MSRoute& r, bool future, bool noLoop, const RGBColor& col) const;
111
113 std::string getStopInfo() const;
114
115 std::string getEdgeID() const;
116
117 int getSegmentIndex() const;
118
120 void selectBlockingFoes() const;
121
130
138
139};
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
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void selectBlockingFoes() const
adds the blocking foes to the current selection
double getAngle() const
Return current angle.
Definition: GUIMEVehicle.h:91
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:101
double getAngle() const
Returns the vehicle's direction in degrees.
Definition: MEVehicle.cpp:87
The car-following model and parameter.
Definition: MSVehicleType.h:63
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
Structure representing possible vehicle parameter.