Path: blob/main/src/utils/gui/globjects/GUIPointOfInterest.h
169684 views
/****************************************************************************/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 GUIPointOfInterest.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date June 200618///19// missing_desc20/****************************************************************************/21#pragma once22#include <config.h>2324#include <string>25#include <utils/shapes/PointOfInterest.h>26#include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>27#include <utils/gui/settings/GUIVisualizationSettings.h>282930// ===========================================================================31// class definitions32// ===========================================================================33/*34* @class GUIPointOfInterest35* @brief The GUI-version of a point of interest36*/37class GUIPointOfInterest : public PointOfInterest, public GUIGlObject_AbstractAdd {38public:39/** @brief Constructor40* @param[in] id The name of the POI41* @param[in] type The (abstract) type of the POI42* @param[in] color The color of the POI43* @param[in] pos The position of the POI44* @param[in[ geo use GEO coordinates (lon/lat)45* @param[in] lane The Lane in which this POI is placed46* @param[in] posOverLane The position over Lane47* @param[in] friendlyPos enable or disable friendlyPos48* @param[in] posLat The position lateral over Lane49* @param[in] icon The icon of the POI50* @param[in] layer The layer of the POI51* @param[in] angle The rotation of the POI52* @param[in] imgFile The raster image of the shape53* @param[in] width The width of the POI image54* @param[in] height The height of the POI image55*/56GUIPointOfInterest(const std::string& id, const std::string& type, const RGBColor& color,57const Position& pos, bool geo, const std::string& lane, double posOverLane,58bool friendlyPos, double posLat, const std::string& icon, double layer, double angle,59const std::string& imgFile, double width, double height);6061/// @brief Destructor62virtual ~GUIPointOfInterest();6364/// @name inherited from GUIGlObject65//@{6667/** @brief Returns an own popup-menu68*69* @param[in] app The application needed to build the popup-menu70* @param[in] parent The parent window needed to build the popup-menu71* @return The built popup-menu72* @see GUIGlObject::getPopUpMenu73*/74GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) override;7576/** @brief Returns an own parameter window77*78* @param[in] app The application needed to build the parameter window79* @param[in] parent The parent window needed to build the parameter window80* @return The built parameter window81* @see GUIGlObject::getParameterWindow82*/83GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent) override;8485/// @brief return exaggeration associated with this GLObject86double getExaggeration(const GUIVisualizationSettings& s) const override;8788/** @brief Returns the boundary to which the view shall be centered in order to show the object89*90* @return The boundary the object is within91* @see GUIGlObject::getCenteringBoundary92*/93Boundary getCenteringBoundary() const override;9495/** @brief Draws the object96* @param[in] s The settings for the current view (may influence drawing)97* @see GUIGlObject::drawGL98*/99void drawGL(const GUIVisualizationSettings& s) const override;100101double getClickPriority() const override {102return getShapeLayer();103}104105/// @brief Returns the name of the object (default "")106virtual const std::string getOptionalName() const override {107return getShapeName();108}109//@}110111/// @brief check if POI can be drawn112static bool checkDraw(const GUIVisualizationSettings& s, const GUIGlObject* o);113114/// @brief set color115static void setColor(const GUIVisualizationSettings& s, const PointOfInterest* POI, const GUIGlObject* o, bool forceSelectionColor);116117/// @brief draw inner POI (before pushName() )118static void drawInnerPOI(const GUIVisualizationSettings& s, const PointOfInterest* POI, const GUIGlObject* o, const bool disableSelectionColor,119const double layer, const double width, const double height);120};121122123