Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/utils/gui/globjects/GUIPointOfInterest.h
169684 views
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
/****************************************************************************/
14
/// @file GUIPointOfInterest.h
15
/// @author Daniel Krajzewicz
16
/// @author Jakob Erdmann
17
/// @author Michael Behrisch
18
/// @date June 2006
19
///
20
// missing_desc
21
/****************************************************************************/
22
#pragma once
23
#include <config.h>
24
25
#include <string>
26
#include <utils/shapes/PointOfInterest.h>
27
#include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>
28
#include <utils/gui/settings/GUIVisualizationSettings.h>
29
30
31
// ===========================================================================
32
// class definitions
33
// ===========================================================================
34
/*
35
* @class GUIPointOfInterest
36
* @brief The GUI-version of a point of interest
37
*/
38
class GUIPointOfInterest : public PointOfInterest, public GUIGlObject_AbstractAdd {
39
public:
40
/** @brief Constructor
41
* @param[in] id The name of the POI
42
* @param[in] type The (abstract) type of the POI
43
* @param[in] color The color of the POI
44
* @param[in] pos The position of the POI
45
* @param[in[ geo use GEO coordinates (lon/lat)
46
* @param[in] lane The Lane in which this POI is placed
47
* @param[in] posOverLane The position over Lane
48
* @param[in] friendlyPos enable or disable friendlyPos
49
* @param[in] posLat The position lateral over Lane
50
* @param[in] icon The icon of the POI
51
* @param[in] layer The layer of the POI
52
* @param[in] angle The rotation of the POI
53
* @param[in] imgFile The raster image of the shape
54
* @param[in] width The width of the POI image
55
* @param[in] height The height of the POI image
56
*/
57
GUIPointOfInterest(const std::string& id, const std::string& type, const RGBColor& color,
58
const Position& pos, bool geo, const std::string& lane, double posOverLane,
59
bool friendlyPos, double posLat, const std::string& icon, double layer, double angle,
60
const std::string& imgFile, double width, double height);
61
62
/// @brief Destructor
63
virtual ~GUIPointOfInterest();
64
65
/// @name inherited from GUIGlObject
66
//@{
67
68
/** @brief Returns an own popup-menu
69
*
70
* @param[in] app The application needed to build the popup-menu
71
* @param[in] parent The parent window needed to build the popup-menu
72
* @return The built popup-menu
73
* @see GUIGlObject::getPopUpMenu
74
*/
75
GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) override;
76
77
/** @brief Returns an own parameter window
78
*
79
* @param[in] app The application needed to build the parameter window
80
* @param[in] parent The parent window needed to build the parameter window
81
* @return The built parameter window
82
* @see GUIGlObject::getParameterWindow
83
*/
84
GUIParameterTableWindow* getParameterWindow(GUIMainWindow& app, GUISUMOAbstractView& parent) override;
85
86
/// @brief return exaggeration associated with this GLObject
87
double getExaggeration(const GUIVisualizationSettings& s) const override;
88
89
/** @brief Returns the boundary to which the view shall be centered in order to show the object
90
*
91
* @return The boundary the object is within
92
* @see GUIGlObject::getCenteringBoundary
93
*/
94
Boundary getCenteringBoundary() const override;
95
96
/** @brief Draws the object
97
* @param[in] s The settings for the current view (may influence drawing)
98
* @see GUIGlObject::drawGL
99
*/
100
void drawGL(const GUIVisualizationSettings& s) const override;
101
102
double getClickPriority() const override {
103
return getShapeLayer();
104
}
105
106
/// @brief Returns the name of the object (default "")
107
virtual const std::string getOptionalName() const override {
108
return getShapeName();
109
}
110
//@}
111
112
/// @brief check if POI can be drawn
113
static bool checkDraw(const GUIVisualizationSettings& s, const GUIGlObject* o);
114
115
/// @brief set color
116
static void setColor(const GUIVisualizationSettings& s, const PointOfInterest* POI, const GUIGlObject* o, bool forceSelectionColor);
117
118
/// @brief draw inner POI (before pushName() )
119
static void drawInnerPOI(const GUIVisualizationSettings& s, const PointOfInterest* POI, const GUIGlObject* o, const bool disableSelectionColor,
120
const double layer, const double width, const double height);
121
};
122
123