Eclipse SUMO - Simulation of Urban MObility
GUIJunctionWrapper.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // Holds geometrical values for a junction
18 /****************************************************************************/
19 #ifndef GUIJunctionWrapper_h
20 #define GUIJunctionWrapper_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <utility>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class MSNet;
39 class MSJunction;
40 #ifdef HAVE_OSG
41 namespace osg {
42 class Geometry;
43 }
44 #endif
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
62 public:
66  GUIJunctionWrapper(MSJunction& junction, const std::string& tllID);
67 
68 
70  virtual ~GUIJunctionWrapper();
71 
72 
73 
75 
76 
84  GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app,
85  GUISUMOAbstractView& parent);
86 
87 
95  GUIParameterTableWindow* getParameterWindow(
96  GUIMainWindow& app, GUISUMOAbstractView& parent);
97 
98 
104  Boundary getCenteringBoundary() const;
105 
106 
111  void drawGL(const GUIVisualizationSettings& s) const;
113 
118  return myBoundary;
119  }
120 
122  bool isInternal() const {
123  return myIsInternal;
124  }
125 
129  const MSJunction& getJunction() const {
130  return myJunction;
131  }
132 
133 
134 #ifdef HAVE_OSG
135  void setGeometry(osg::Geometry* geom) {
136  myGeom = geom;
137  }
138 
139  void updateColor(const GUIVisualizationSettings& s);
140 #endif
141 
142 private:
143  double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const;
144 
145 private:
148 
150  double myMaxSize;
151 
154 
157 
162 
164  const std::string myTLLID;
165 
166 #ifdef HAVE_OSG
167  osg::Geometry* myGeom;
168 #endif
169 
170 
171 private:
174 
176  GUIJunctionWrapper& operator=(const GUIJunctionWrapper&);
177 
178 };
179 
180 
181 #endif
182 
183 /****************************************************************************/
184 
bool isInternal() const
whether this is an inner junction (a waiting spot for crossing a "real" junction) ...
Stores the information about how to visualize structures.
The base class for an intersection.
Definition: MSJunction.h:61
bool myAmRailway
whether this junction has only railways as incoming and outgoing edges
bool myAmWaterway
whether this junction has only waterways as incoming and outgoing edges
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
The simulated network and simulation perfomer.
Definition: MSNet.h:92
bool myIsInternal
whether this wraps an instance of MSInternalJunction
double myMaxSize
The maximum size (in either x-, or y-dimension) for determining whether to draw or not...
const MSJunction & getJunction() const
Returns the represented junction.
Boundary myBoundary
The represented junction&#39;s boundary.
The popup menu of a globject.
MSJunction & myJunction
A reference to the represented junction.
Boundary getBoundary() const
Returns the boundary of the junction.
const std::string myTLLID
the associated traffic light or ""
A window containing a gl-object&#39;s parameter.