Eclipse 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-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 // The gui-version of the MS_E2_ZS_Collector
18 /****************************************************************************/
19 #ifndef GUIE2Collector_h
20 #define GUIE2Collector_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
29 #include "GUIDetectorWrapper.h"
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
44 class GUIE2Collector : public MSE2Collector {
45 public:
66  GUIE2Collector(const std::string& id, DetectorUsage usage,
67  MSLane* lane, double startPos, double endPos, double detLength,
68  SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,
69  const std::string& vTypes, bool showDetector);
70 
71 
86  GUIE2Collector(const std::string& id, DetectorUsage usage,
87  std::vector<MSLane*> lanes, double startPos, double endPos,
88  SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,
89  const std::string& vTypes, bool showDetector);
90 
91 
94 
95 
101 
102 private:
105 
106 public:
111  class MyWrapper : public GUIDetectorWrapper {
112  public:
114  MyWrapper(GUIE2Collector& detector);
115 
117  ~MyWrapper();
118 
119 
121 
122 
131  GUIMainWindow& app, GUISUMOAbstractView& parent);
132 
133 
140 
141 
146  void drawGL(const GUIVisualizationSettings& s) const;
148 
149 
152 
153 
154  private:
157 
160 
163 
165  std::vector<double> myShapeLengths;
166 
168  std::vector<double> myShapeRotations;
169 
170  private:
172  MyWrapper(const MyWrapper&);
173 
175  MyWrapper& operator=(const MyWrapper&);
176 
177  };
178 
179 };
180 
181 
182 #endif
183 
184 /****************************************************************************/
185 
std::vector< double > myShapeLengths
A sequence of lengths in full-geometry mode.
long long int SUMOTime
Definition: SUMOTime.h:35
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:81
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:42
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.
~GUIE2Collector()
Destructor.
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
A window containing a gl-object&#39;s parameter.
GUIE2Collector & getDetector()
Returns the detector itself.
Boundary myBoundary
The detector&#39;s boundary.