/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 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 GUIParkingArea.h14/// @author Mirco Sturari15/// @date Tue, 19.01.201616///17// A area where vehicles can park next to the road (gui version)18/****************************************************************************/19#pragma once20#include <config.h>2122#include <vector>23#include <string>24#include <utils/common/Command.h>25#include <utils/common/VectorHelper.h>26#include <microsim/MSStoppingPlace.h>27#include <microsim/MSParkingArea.h>28#include <utils/gui/globjects/GUIGlObject.h>29#include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>30#include <utils/gui/globjects/GUIGLObjectPopupMenu.h>31#include <utils/geom/Position.h>32#include <gui/GUIManipulator.h>333435// ===========================================================================36// class declarations37// ===========================================================================38class MSNet;39class MSLane;40class GUIManipulator;414243// ===========================================================================44// class definitions45// ===========================================================================46/**47* @class GUIParkingArea48* @brief A lane area vehicles can halt at (gui-version)49*50* This gui-version of a parking-area extends MSStoppingPlace by methods for displaying51* and interaction.52*53* @see MSStoppingPlace54* @see GUIGlObject_AbstractAdd55* @see GUIGlObject56*/57class GUIParkingArea : public MSParkingArea, public GUIGlObject_AbstractAdd {58public:5960/** @brief Constructor61* @param[in] idStorage The gl-id storage for giving this object an gl-id62* @param[in] id The id of the parking area63* @param[in] lines Names of the parking lines that halt on this parking area64* @param[in] badges Names which grant access to this parking area65* @param[in] lane The lane the parking area is placed on66* @param[in] begPos Begin position of the parking area on the lane67* @param[in] endPos End position of the parking area on the lane68* @param[in] capacity Capacity of the parking area (if > 0 lots are generated, otherwise expected addLotEntry())69* @param[in] width Default width of the lot rectangle (if = 0 is computed from line.getWidth())70* @param[in] length Default length of the lot rectangle (if = 0 is computed from endPos-begPos)71* @param[in] angle Default angle of the lot rectangle relative to lane direction (if = 0 is computed ... TODO)72*/73GUIParkingArea(const std::string& id,74const std::vector<std::string>& lines, const std::vector<std::string>& badges, MSLane& lane,75double frompos, double topos, unsigned int capacity,76double width, double length, double angle, const std::string& name,77bool onRoad,78const std::string& departPos,79bool lefthand);808182/// @brief Destructor83~GUIParkingArea();84858687/// @name inherited from GUIGlObject88//@{8990/** @brief Returns an own popup-menu91*92* @param[in] app The application needed to build the popup-menu93* @param[in] parent The parent window needed to build the popup-menu94* @return The built popup-menu95* @see GUIGlObject::getPopUpMenu96*/97GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app,98GUISUMOAbstractView& parent);99100/** @brief Returns an own parameter window101*102* Container stops have no parameter windows (yet).103*104* @param[in] app The application needed to build the parameter window105* @param[in] parent The parent window needed to build the parameter window106* @return The built parameter window (always 0 in this case)107* @see GUIGlObject::getParameterWindow108*/109GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app,110GUISUMOAbstractView& parent);111112/// @brief return exaggeration associated with this GLObject113double getExaggeration(const GUIVisualizationSettings& s) const;114115/** @brief Returns the boundary to which the view shall be centered in order to show the object116*117* @return The boundary the object is within118* @see GUIGlObject::getCenteringBoundary119*/120Boundary getCenteringBoundary() const;121122/// @brief Returns the stopping place name123const std::string getOptionalName() const;124125/// @brief extend boundary126void addLotEntry(double x, double y, double z,127double width, double length,128double angle, double slope);129130/** @brief Draws the object131* @param[in] s The settings for the current view (may influence drawing)132* @see GUIGlObject::drawGL133*/134void drawGL(const GUIVisualizationSettings& s) const;135//@}136137const Position& getSignPos() const {138return mySignPos;139}140141private:142/// @brief The rotations of the shape parts143std::vector<double> myShapeRotations;144145/// @brief The lengths of the shape parts146std::vector<double> myShapeLengths;147148/// @brief The position of the sign149Position mySignPos;150151/// @brief The rotation of the sign152double mySignRot;153154/// @brief the centering boundary155Boundary myBoundary;156157};158159160