/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GUIMEVehicle.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Sascha Krieg17/// @author Michael Behrisch18/// @date Sept 200219///20// A MSVehicle extended by some values for usage within the gui21/****************************************************************************/22#pragma once23#include <config.h>2425#include <vector>26#include <set>27#include <string>28#include <guisim/GUIBaseVehicle.h>29#include <mesosim/MEVehicle.h>303132// ===========================================================================33// class declarations34// ===========================================================================35class GUISUMOAbstractView;36class GUIVisualizationSettings;373839// ===========================================================================40// class definitions41// ===========================================================================42/**43* @class GUIMEVehicle44* @brief A MSVehicle extended by some values for usage within the gui45*46* A visualisable MSVehicle. Extended by the possibility to retrieve names47* of all available vehicles (static) and the possibility to retrieve the48* color of the vehicle which is available in different forms allowing an49* easier recognition of done actions such as lane changing.50*/51class GUIMEVehicle : public MEVehicle, public GUIBaseVehicle {5253public:54/** @brief Constructor55* @param[in] pars The vehicle description56* @param[in] route The vehicle's route57* @param[in] type The vehicle's type58* @param[in] speedFactor The factor for driven lane's speed limits59* @exception ProcessError If a value is wrong60*/61GUIMEVehicle(SUMOVehicleParameter* pars, ConstMSRoutePtr route,62MSVehicleType* type, const double speedFactor);6364/// @brief destructor65~GUIMEVehicle();6667/** @brief Return current position (x/y, cartesian)68*69* @note implementation of abstract method does not work otherwise70*/71Position getPosition(const double offset = 0) const override {72return MEVehicle::getPosition(offset);73}7475Position getVisualPosition(bool s2, const double offset = 0) const override;7677/// @brief return exaggeration associated with this GLObject78double getExaggeration(const GUIVisualizationSettings& s) const override;7980/** @brief Returns the boundary to which the view shall be centered in order to show the object81*82* @return The boundary the object is within83* @see GUIGlObject::getCenteringBoundary84*/85virtual Boundary getCenteringBoundary() const override;8687/** @brief Return current angle88*89* @note implementation of abstract method does not work otherwise90*/91double getAngle() const override {92return MEVehicle::getAngle();93}9495double getVisualAngle(bool /*s2*/) const override {96return MEVehicle::getAngle();97}9899/// @brief gets the color value according to the current scheme index100double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const override;101102/// @brief draws the given guiShape with distinct carriages/modules103void drawAction_drawCarriageClass(const GUIVisualizationSettings& s, double scaledLength, bool asImage) const override;104105/** @brief Returns the time since the last lane change in seconds106* @see MSVehicle::myLastLaneChangeOffset107* @return The time since the last lane change in seconds108*/109double getLastLaneChangeOffset() const override;110111/** @brief Draws the route112* @param[in] r The route to draw113*/114void drawRouteHelper(const GUIVisualizationSettings& s, ConstMSRoutePtr r,115bool future, bool noLoop, const RGBColor& col) const override;116117/// @brief retrieve information about the current stop state118std::string getStopInfo() const override;119120std::string getEdgeID() const;121122/// @brief adds the blocking foes to the current selection123void selectBlockingFoes() const override;124125/** @brief Returns an own parameter window126*127* @param[in] app The application needed to build the parameter window128* @param[in] parent The parent window needed to build the parameter window129* @return The built parameter window130* @see GUIGlObject::getParameterWindow131*/132GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent) override;133134/** @brief Returns an own type parameter window135*136* @param[in] app The application needed to build the parameter window137* @param[in] parent The parent window needed to build the parameter window138* @return The built parameter window139*/140GUIParameterTableWindow* getTypeParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent) override;141142/// @brief whether this vehicle is selected in the GUI143bool isSelected() const override;144};145146147