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-2024 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 return MEVehicle::getPosition(offset);
79 }
80
82 double getExaggeration(const GUIVisualizationSettings& s) const;
83
89 virtual Boundary getCenteringBoundary() const;
90
95 double getAngle() const {
96 return MEVehicle::getAngle();
97 }
98
99 double getVisualAngle(bool /*s2*/) const {
100 return MEVehicle::getAngle();
101 }
102
104 double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
105
107 void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, bool asImage) const;
108
113 double getLastLaneChangeOffset() const;
114
118 void drawRouteHelper(const GUIVisualizationSettings& s, ConstMSRoutePtr r, bool future, bool noLoop, const RGBColor& col) const;
119
121 std::string getStopInfo() const;
122
123 std::string getEdgeID() const;
124
126 void selectBlockingFoes() const;
127
136
144
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 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
Position getVisualPosition(bool, const double offset=0) const
Return current position taking into account secondary shape.
~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
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.