Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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 {
53
54public:
63 MSVehicleType* type, const double speedFactor);
64
67
72 Position getPosition(const double offset = 0) const override {
73 return MEVehicle::getPosition(offset);
74 }
75
76 Position getVisualPosition(bool s2, const double offset = 0) const override;
77
79 double getExaggeration(const GUIVisualizationSettings& s) const override;
80
86 virtual Boundary getCenteringBoundary() const override;
87
92 double getAngle() const override {
93 return MEVehicle::getAngle();
94 }
95
96 double getVisualAngle(bool /*s2*/) const override {
97 return MEVehicle::getAngle();
98 }
99
101 double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const override;
102
104 void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, double scaledLength, bool asImage) const override;
105
110 double getLastLaneChangeOffset() const override;
111
116 bool future, bool noLoop, const RGBColor& col) const override;
117
119 std::string getStopInfo() const override;
120
121 std::string getEdgeID() const;
122
124 void selectBlockingFoes() const override;
125
134
142
144 bool isSelected() const override;
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.
void selectBlockingFoes() const override
adds the blocking foes to the current selection
Position getVisualPosition(bool s2, const double offset=0) const override
Return current position taking into account secondary shape.
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const override
gets the color value according to the current scheme index
virtual Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
double getVisualAngle(bool) const override
Returns the vehicle's direction in radians taking into account secondary shape.
std::string getStopInfo() const override
retrieve information about the current stop state
~GUIMEVehicle()
destructor
Position getPosition(const double offset=0) const override
Return current position (x/y, cartesian)
void drawAction_drawCarriageClass(const GUIVisualizationSettings &s, double scaledLength, bool asImage) const override
draws the given guiShape with distinct carriages/modules
double getLastLaneChangeOffset() const override
Returns the time since the last lane change in seconds.
void drawRouteHelper(const GUIVisualizationSettings &s, ConstMSRoutePtr r, bool future, bool noLoop, const RGBColor &col) const override
Draws the route.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own type parameter window.
double getAngle() const override
Return current angle.
bool isSelected() const override
whether this vehicle is selected in the GUI
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.