Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GUIMEVehicle.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 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:
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
77 Position getVisualPosition(bool s2, const double offset = 0) const;
78
80 double getExaggeration(const GUIVisualizationSettings& s) const;
81
87 virtual Boundary getCenteringBoundary() const;
88
93 double getAngle() const {
94 return MEVehicle::getAngle();
95 }
96
97 double getVisualAngle(bool /*s2*/) const {
98 return MEVehicle::getAngle();
99 }
100
102 double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
103
105 void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, double scaledLength, bool asImage) const;
106
111 double getLastLaneChangeOffset() const;
112
116 void drawRouteHelper(const GUIVisualizationSettings& s, ConstMSRoutePtr r, bool future, bool noLoop, const RGBColor& col) const;
117
119 std::string getStopInfo() const;
120
121 std::string getEdgeID() const;
122
124 void selectBlockingFoes() const;
125
134
142
144 bool isSelected() const;
145};
std::shared_ptr< const MSRoute > ConstMSRoutePtr
Definition Route.h:32
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.
std::string getStopInfo() const
retrieve information about the current stop state
bool isSelected() const
whether this vehicle is selected in the GUI
~GUIMEVehicle()
destructor
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
double getVisualAngle(bool) const
Returns the vehicle's direction in radians taking into account secondary shape.
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.
void drawRouteHelper(const GUIVisualizationSettings &s, ConstMSRoutePtr r, bool future, bool noLoop, const RGBColor &col) const
Draws the route.
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)
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void selectBlockingFoes() const
adds the blocking foes to the current selection
Position getVisualPosition(bool s2, const double offset=0) const
Return current position taking into account secondary shape.
void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, double scaledLength, bool asImage) const
draws the given guiShape with distinct carriages/modules
double getAngle() const
Return current angle.
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
gets the color value according to the current scheme index
std::string getEdgeID() const
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:94
double getAngle() const
Returns the vehicle's direction in degrees.
Definition MEVehicle.cpp:80
The car-following model and parameter.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
Structure representing possible vehicle parameter.