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 /****************************************************************************/
16 // The gui-version of the MS_E2_ZS_Collector
17 /****************************************************************************/
18 #ifndef GUIE2Collector_h
19 #define GUIE2Collector_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
28 #include "GUIDetectorWrapper.h"
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
43 class GUIE2Collector : public MSE2Collector {
44 public:
65  GUIE2Collector(const std::string& id, DetectorUsage usage,
66  MSLane* lane, double startPos, double endPos, double detLength,
67  SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,
68  const std::string& vTypes, bool showDetector);
69 
70 
85  GUIE2Collector(const std::string& id, DetectorUsage usage,
86  std::vector<MSLane*> lanes, double startPos, double endPos,
87  SUMOTime haltingTimeThreshold, double haltingSpeedThreshold, double jamDistThreshold,
88  const std::string& vTypes, bool showDetector);
89 
90 
93 
94 
100 
101 private:
104 
105 public:
110  class MyWrapper : public GUIDetectorWrapper {
111  public:
113  MyWrapper(GUIE2Collector& detector);
114 
116  ~MyWrapper();
117 
118 
120 
121 
130  GUIMainWindow& app, GUISUMOAbstractView& parent);
131 
132 
139 
140 
145  void drawGL(const GUIVisualizationSettings& s) const;
147 
148 
151 
152 
153  private:
156 
159 
162 
164  std::vector<double> myShapeLengths;
165 
167  std::vector<double> myShapeRotations;
168 
169  private:
171  MyWrapper(const MyWrapper&);
172 
174  MyWrapper& operator=(const MyWrapper&);
175 
176  };
177 
178 };
179 
180 
181 #endif
182 
183 /****************************************************************************/
184 
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:62
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
GUIDetectorWrapper
Definition: GUIDetectorWrapper.h:42
GUIE2Collector::MyWrapper::myBoundary
Boundary myBoundary
The detector's boundary.
Definition: GUIE2Collector.h:158
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
MSE2Collector
An areal detector corresponding to a sequence of consecutive lanes.
Definition: MSE2Collector.h:81
PositionVector
A list of positions.
Definition: PositionVector.h:45
GUIE2Collector::MyWrapper::myShapeLengths
std::vector< double > myShapeLengths
A sequence of lengths in full-geometry mode.
Definition: GUIE2Collector.h:164
GUIE2Collector::MyWrapper
Definition: GUIE2Collector.h:110
MSE2Collector.h
GUIE2Collector::MyWrapper::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIE2Collector.cpp:154
GUIE2Collector::GUIE2Collector
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.
Definition: GUIE2Collector.cpp:43
GUIE2Collector::myShowDetectorInGUI
bool myShowDetectorInGUI
Whether the detector shall be drawn in the gui.
Definition: GUIE2Collector.h:103
GUIE2Collector::MyWrapper::operator=
MyWrapper & operator=(const MyWrapper &)
Invalidated assignment operator.
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GUIDetectorWrapper.h
GUIE2Collector::~GUIE2Collector
~GUIE2Collector()
Destructor.
Definition: GUIE2Collector.cpp:59
GUIE2Collector::MyWrapper::getDetector
GUIE2Collector & getDetector()
Returns the detector itself.
Definition: GUIE2Collector.cpp:187
GUIE2Collector::buildDetectorGUIRepresentation
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
Definition: GUIE2Collector.cpp:63
DetectorUsage
DetectorUsage
Definition: MSDetectorFileOutput.h:50
GUIMainWindow
Definition: GUIMainWindow.h:46
GUIE2Collector::MyWrapper::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIE2Collector.cpp:117
GUIE2Collector::MyWrapper::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUIE2Collector.cpp:109
config.h
GUIE2Collector
The gui-version of the MSE2Collector.
Definition: GUIE2Collector.h:43
GUIE2Collector::MyWrapper::myDetector
GUIE2Collector & myDetector
The wrapped detector.
Definition: GUIE2Collector.h:155
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
GUIE2Collector::MyWrapper::myShapeRotations
std::vector< double > myShapeRotations
A sequence of rotations in full-geometry mode.
Definition: GUIE2Collector.h:167
GUIE2Collector::MyWrapper::~MyWrapper
~MyWrapper()
Destrutor.
Definition: GUIE2Collector.cpp:105
GUIE2Collector::MyWrapper::myFullGeometry
PositionVector myFullGeometry
A sequence of positions in full-geometry mode.
Definition: GUIE2Collector.h:161
GUIE2Collector::MyWrapper::MyWrapper
MyWrapper(GUIE2Collector &detector)
Constructor.
Definition: GUIE2Collector.cpp:71