Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIJunctionWrapper.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-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/****************************************************************************/
20// Holds geometrical values for a junction
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
25#include <string>
26#include <utility>
31
32
33// ===========================================================================
34// class declarations
35// ===========================================================================
36class MSNet;
37class MSJunction;
38#ifdef HAVE_OSG
39namespace osg {
40class Geometry;
41}
42#endif
43
44
45// ===========================================================================
46// class definitions
47// ===========================================================================
60public:
64 GUIJunctionWrapper(MSJunction& junction, const std::string& tllID);
65
66
68 virtual ~GUIJunctionWrapper();
69
70
71
73
74
83
92
94 double getExaggeration(const GUIVisualizationSettings& s) const override;
95
101 Boundary getCenteringBoundary() const override;
102
104 const std::string getOptionalName() const override;
105
110 void drawGL(const GUIVisualizationSettings& s) const override;
112
117 return myBoundary;
118 }
119
121 bool isInternal() const {
122 return myIsInternal;
123 }
124
128 const MSJunction& getJunction() const {
129 return myJunction;
130 }
131
132
133#ifdef HAVE_OSG
134 void setGeometry(osg::Geometry* geom) {
135 myGeom = geom;
136 }
137
138 void updateColor(const GUIVisualizationSettings& s);
139#endif
140
141private:
142 double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const override;
143
144private:
147
150 mutable double myExaggeration;
151
153 double myMaxSize;
154
157
160
167
169 const std::string myTLLID;
170
171#ifdef HAVE_OSG
172 osg::Geometry* myGeom;
173#endif
174
175
176private:
179
182
183};
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
The popup menu of a globject.
const std::string getOptionalName() const override
Returns the value for generic parameter 'name' or ''.
GUIJunctionWrapper & operator=(const GUIJunctionWrapper &)
Invalidated assignment operator.
bool myAmAirway
whether this junction has only airways as incoming and outgoing edges
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
double myMaxSize
The maximum size (in either x-, or y-dimension) for determining whether to draw or not.
TesselatedPolygon myTesselation
An object that stores the shape and its tesselation.
GUIJunctionWrapper(const GUIJunctionWrapper &)
Invalidated copy constructor.
const MSJunction & getJunction() const
Returns the represented junction.
Boundary getBoundary() const
Returns the boundary of the junction.
Boundary myBoundary
The represented junction's boundary.
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
const std::string myTLLID
the associated traffic light or ""
bool isInternal() const
whether this is an inner junction (a waiting spot for crossing a "real" junction)
bool myAmRailway
whether this junction has only railways as incoming and outgoing edges
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
bool myIsInternal
whether this wraps an instance of MSInternalJunction
bool myAmWaterway
whether this junction has only waterways as incoming and outgoing edges
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const override
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
MSJunction & myJunction
A reference to the represented junction.
virtual ~GUIJunctionWrapper()
Destructor.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
The base class for an intersection.
Definition MSJunction.h:58
The simulated network and simulation perfomer.
Definition MSNet.h:89