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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // Holds geometrical values for a junction
20 /****************************************************************************/
21 #ifndef GUIJunctionWrapper_h
22 #define GUIJunctionWrapper_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <utility>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class MSNet;
45 class MSJunction;
46 #ifdef HAVE_OSG
47 namespace osg {
48 class Geometry;
49 }
50 #endif
51 
52 
53 // ===========================================================================
54 // class definitions
55 // ===========================================================================
68 public:
72  GUIJunctionWrapper(MSJunction& junction);
73 
74 
76  virtual ~GUIJunctionWrapper();
77 
78 
79 
81 
82 
90  GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app,
91  GUISUMOAbstractView& parent);
92 
93 
101  GUIParameterTableWindow* getParameterWindow(
102  GUIMainWindow& app, GUISUMOAbstractView& parent);
103 
104 
110  Boundary getCenteringBoundary() const;
111 
112 
117  void drawGL(const GUIVisualizationSettings& s) const;
119 
124  return myBoundary;
125  }
126 
128  bool isInternal() const {
129  return myIsInternal;
130  }
131 
135  const MSJunction& getJunction() const {
136  return myJunction;
137  }
138 
139 
140 #ifdef HAVE_OSG
141  void setGeometry(osg::Geometry* geom) {
142  myGeom = geom;
143  }
144 
145  void updateColor(const GUIVisualizationSettings& s);
146 #endif
147 
148 private:
149  double getColorValue(const GUIVisualizationSettings& s) const;
150 
151 private:
154 
156  double myMaxSize;
157 
160 
163 
166 
167 #ifdef HAVE_OSG
168  osg::Geometry* myGeom;
169 #endif
170 
171 
172 private:
175 
177  GUIJunctionWrapper& operator=(const GUIJunctionWrapper&);
178 
179 };
180 
181 
182 #endif
183 
184 /****************************************************************************/
185 
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:64
bool myAmWaterway
whether this junction has only waterways as incoming and outgoing edges
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:47
The simulated network and simulation perfomer.
Definition: MSNet.h:90
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.
A window containing a gl-object&#39;s parameter.