Eclipse SUMO - Simulation of Urban MObility
GUIE3Collector.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 a MSE3Collector
17 /****************************************************************************/
18 #ifndef GUIE3Collector_h
19 #define GUIE3Collector_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <vector>
29 #include "GUIDetectorWrapper.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
45 class GUIE3Collector : public MSE3Collector {
46 public:
48  GUIE3Collector(const std::string& id,
49  const CrossSectionVector& entries, const CrossSectionVector& exits,
50  double haltingSpeedThreshold,
51  SUMOTime haltingTimeThreshold, const std::string& vTypes, bool openEntry);
52 
55 
56 
60  const CrossSectionVector& getEntries() const;
61 
62 
66  const CrossSectionVector& getExits() const;
67 
68 
74 
75 
76 public:
81  class MyWrapper : public GUIDetectorWrapper {
82  public:
84  MyWrapper(GUIE3Collector& detector);
85 
87  ~MyWrapper();
88 
89 
91 
92 
101  GUIMainWindow& app, GUISUMOAbstractView& parent);
102 
103 
110 
111 
116  void drawGL(const GUIVisualizationSettings& s) const;
118 
119 
122 
123 
124  protected:
132  double myFGRotation;
133  };
134 
135  protected:
138 
140  void drawSingleCrossing(const Position& pos, double rot,
141  double upscale) const;
142 
143  private:
146 
149 
151  typedef std::vector<SingleCrossingDefinition> CrossingDefinitions;
152 
155 
158 
159  };
160 
161 };
162 
163 
164 #endif
165 
166 /****************************************************************************/
167 
GUIE3Collector::MyWrapper::MyWrapper
MyWrapper(GUIE3Collector &detector)
Constructor.
Definition: GUIE3Collector.cpp:42
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:62
GUIE3Collector::MyWrapper::~MyWrapper
~MyWrapper()
Destrutor.
Definition: GUIE3Collector.cpp:61
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
GUIE3Collector::~GUIE3Collector
~GUIE3Collector()
Destructor.
Definition: GUIE3Collector.cpp:167
MSE3Collector
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:60
GUIE3Collector::buildDetectorGUIRepresentation
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
Definition: GUIE3Collector.cpp:184
GUIDetectorWrapper
Definition: GUIDetectorWrapper.h:42
GUIE3Collector::MyWrapper::myExitDefinitions
CrossingDefinitions myExitDefinitions
The list of exit positions.
Definition: GUIE3Collector.h:157
GUIE3Collector::MyWrapper::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUIE3Collector.cpp:144
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
MSCrossSection
A simple description of a position on a lane (crossing of a lane)
Definition: MSCrossSection.h:43
GUIE3Collector::MyWrapper
Definition: GUIE3Collector.h:81
GUIE3Collector::MyWrapper::SingleCrossingDefinition::myFGRotation
double myFGRotation
The rotation.
Definition: GUIE3Collector.h:132
GUIE3Collector::MyWrapper::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIE3Collector.cpp:74
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GUIE3Collector
The gui-version of the MSE3Collector.
Definition: GUIE3Collector.h:45
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GUIE3Collector::MyWrapper::buildDefinition
SingleCrossingDefinition buildDefinition(const MSCrossSection &section)
Builds the description about the position of the entry/exit point.
Definition: GUIE3Collector.cpp:65
GUIDetectorWrapper.h
GUIE3Collector::MyWrapper::getDetector
GUIE3Collector & getDetector()
Returns the detector itself.
Definition: GUIE3Collector.cpp:152
GUIE3Collector::MyWrapper::myBoundary
Boundary myBoundary
The detector's boundary.
Definition: GUIE3Collector.h:148
GUIE3Collector::getExits
const CrossSectionVector & getExits() const
Returns the list of exit points.
Definition: GUIE3Collector.cpp:177
GUIE3Collector::MyWrapper::myEntryDefinitions
CrossingDefinitions myEntryDefinitions
The list of entry positions.
Definition: GUIE3Collector.h:154
GUIE3Collector::MyWrapper::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIE3Collector.cpp:93
GUIE3Collector::GUIE3Collector
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes, bool openEntry)
Constructor.
Definition: GUIE3Collector.cpp:160
ValueSource.h
GUIMainWindow
Definition: GUIMainWindow.h:46
GUIE3Collector::MyWrapper::CrossingDefinitions
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
Definition: GUIE3Collector.h:151
GUIE3Collector::getEntries
const CrossSectionVector & getEntries() const
Returns the list of entry points.
Definition: GUIE3Collector.cpp:171
GUIE3Collector::MyWrapper::drawSingleCrossing
void drawSingleCrossing(const Position &pos, double rot, double upscale) const
Draws a single entry/exit point.
Definition: GUIE3Collector.cpp:115
config.h
GUIE3Collector::MyWrapper::myDetector
GUIE3Collector & myDetector
The wrapped detector.
Definition: GUIE3Collector.h:145
GUIE3Collector::MyWrapper::SingleCrossingDefinition::myFGPosition
Position myFGPosition
The position.
Definition: GUIE3Collector.h:130
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
PositionVector.h
MSE3Collector.h
GUIE3Collector::MyWrapper::SingleCrossingDefinition
Representation of a single crossing point.
Definition: GUIE3Collector.h:128
CrossSectionVector
std::vector< MSCrossSection > CrossSectionVector
Definition: MSCrossSection.h:63