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-2024 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 GUISUMOAbstractView& parent);
84
94
96 double getExaggeration(const GUIVisualizationSettings& s) const;
97
104
106 const std::string getOptionalName() const;
107
112 void drawGL(const GUIVisualizationSettings& s) const;
114
119 return myBoundary;
120 }
121
123 bool isInternal() const {
124 return myIsInternal;
125 }
126
130 const MSJunction& getJunction() const {
131 return myJunction;
132 }
133
134
135#ifdef HAVE_OSG
136 void setGeometry(osg::Geometry* geom) {
137 myGeom = geom;
138 }
139
140 void updateColor(const GUIVisualizationSettings& s);
141#endif
142
143private:
144 double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
145
146private:
149
152 mutable double myExaggeration;
153
155 double myMaxSize;
156
159
162
169
171 const std::string myTLLID;
172
173#ifdef HAVE_OSG
174 osg::Geometry* myGeom;
175#endif
176
177
178private:
181
184
185};
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
The popup menu of a globject.
GUIJunctionWrapper & operator=(const GUIJunctionWrapper &)
Invalidated assignment operator.
bool myAmAirway
whether this junction has only airways as incoming and outgoing edges
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.
const std::string myTLLID
the associated traffic light or ""
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
const std::string getOptionalName() const
Returns the value for generic parameter 'name' 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
bool myIsInternal
whether this wraps an instance of MSInternalJunction
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool myAmWaterway
whether this junction has only waterways as incoming and outgoing edges
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
MSJunction & myJunction
A reference to the represented junction.
virtual ~GUIJunctionWrapper()
Destructor.
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