SUMO - Simulation of Urban MObility
GUIE2Collector.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 // The gui-version of the MS_E2_ZS_Collector
20 /****************************************************************************/
21 #ifndef GUIE2Collector_h
22 #define GUIE2Collector_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 
35 #include "GUIDetectorWrapper.h"
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
50 class GUIE2Collector : public MSE2Collector {
51 public:
72  GUIE2Collector(const std::string& id, DetectorUsage usage,
73  MSLane* lane, double startPos, double endPos, double detLength,
74  SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,
75  const std::string& vTypes, bool showDetector);
76 
77 
92  GUIE2Collector(const std::string& id, DetectorUsage usage,
93  std::vector<MSLane*> lanes, double startPos, double endPos,
94  SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,
95  const std::string& vTypes, bool showDetector);
96 
97 
100 
101 
107 
108 private:
111 
112 public:
117  class MyWrapper : public GUIDetectorWrapper {
118  public:
120  MyWrapper(GUIE2Collector& detector);
121 
123  ~MyWrapper();
124 
125 
127 
128 
137  GUIMainWindow& app, GUISUMOAbstractView& parent);
138 
139 
146 
147 
152  void drawGL(const GUIVisualizationSettings& s) const;
154 
155 
158 
159 
160  private:
163 
166 
169 
171  std::vector<double> myShapeLengths;
172 
174  std::vector<double> myShapeRotations;
175 
176  private:
178  MyWrapper(const MyWrapper&);
179 
181  MyWrapper& operator=(const MyWrapper&);
182 
183  };
184 
185 };
186 
187 
188 #endif
189 
190 /****************************************************************************/
191 
std::vector< double > myShapeLengths
A sequence of lengths in full-geometry mode.
std::vector< double > myShapeRotations
A sequence of rotations in full-geometry mode.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
An areal detector corresponding to a sequence of consecutive lanes.
Definition: MSE2Collector.h:86
MyWrapper(GUIE2Collector &detector)
Constructor.
Stores the information about how to visualize structures.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIE2Collector & myDetector
The wrapped detector.
The gui-version of the MSE2Collector.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:47
PositionVector myFullGeometry
A sequence of positions in full-geometry mode.
A list of positions.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
GUIE2Collector(const std::string &id, DetectorUsage usage, MSLane *lane, double startPos, double endPos, double detLength, SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold, const std::string &vTypes, bool showDetector)
Constructor with given end position and detector length.
MyWrapper & operator=(const MyWrapper &)
Invalidated assignment operator.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool myShowDetectorInGUI
Whether the detector shall be drawn in the gui.
long long int SUMOTime
Definition: TraCIDefs.h:51
~GUIE2Collector()
Destructor.
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
A window containing a gl-object&#39;s parameter.
GUIE2Collector & getDetector()
Returns the detector itself.
Boundary myBoundary
The detector&#39;s boundary.