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 /****************************************************************************/
17 // The gui-version of a MSE3Collector
18 /****************************************************************************/
19 #ifndef GUIE3Collector_h
20 #define GUIE3Collector_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <vector>
30 #include "GUIDetectorWrapper.h"
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
46 class GUIE3Collector : public MSE3Collector {
47 public:
49  GUIE3Collector(const std::string& id,
50  const CrossSectionVector& entries, const CrossSectionVector& exits,
51  double haltingSpeedThreshold,
52  SUMOTime haltingTimeThreshold, const std::string& vTypes, bool openEntry);
53 
56 
57 
61  const CrossSectionVector& getEntries() const;
62 
63 
67  const CrossSectionVector& getExits() const;
68 
69 
75 
76 
77 public:
82  class MyWrapper : public GUIDetectorWrapper {
83  public:
85  MyWrapper(GUIE3Collector& detector);
86 
88  ~MyWrapper();
89 
90 
92 
93 
102  GUIMainWindow& app, GUISUMOAbstractView& parent);
103 
104 
111 
112 
117  void drawGL(const GUIVisualizationSettings& s) const;
119 
120 
123 
124 
125  protected:
133  double myFGRotation;
134  };
135 
136  protected:
139 
141  void drawSingleCrossing(const Position& pos, double rot,
142  double upscale) const;
143 
144  private:
147 
150 
152  typedef std::vector<SingleCrossingDefinition> CrossingDefinitions;
153 
156 
159 
160  };
161 
162 };
163 
164 
165 #endif
166 
167 /****************************************************************************/
168 
GUIE3Collector::MyWrapper::MyWrapper
MyWrapper(GUIE3Collector &detector)
Constructor.
Definition: GUIE3Collector.cpp:43
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:63
GUIE3Collector::MyWrapper::~MyWrapper
~MyWrapper()
Destrutor.
Definition: GUIE3Collector.cpp:62
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:73
GUIE3Collector::~GUIE3Collector
~GUIE3Collector()
Destructor.
Definition: GUIE3Collector.cpp:168
MSE3Collector
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:58
GUIE3Collector::buildDetectorGUIRepresentation
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
Definition: GUIE3Collector.cpp:185
GUIDetectorWrapper
Definition: GUIDetectorWrapper.h:43
GUIE3Collector::MyWrapper::myExitDefinitions
CrossingDefinitions myExitDefinitions
The list of exit positions.
Definition: GUIE3Collector.h:158
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:145
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
MSCrossSection
A simple description of a position on a lane (crossing of a lane)
Definition: MSCrossSection.h:44
GUIE3Collector::MyWrapper
Definition: GUIE3Collector.h:82
GUIE3Collector::MyWrapper::SingleCrossingDefinition::myFGRotation
double myFGRotation
The rotation.
Definition: GUIE3Collector.h:133
GUIE3Collector::MyWrapper::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIE3Collector.cpp:75
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
GUIE3Collector
The gui-version of the MSE3Collector.
Definition: GUIE3Collector.h:46
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
GUIE3Collector::MyWrapper::buildDefinition
SingleCrossingDefinition buildDefinition(const MSCrossSection &section)
Builds the description about the position of the entry/exit point.
Definition: GUIE3Collector.cpp:66
GUIDetectorWrapper.h
GUIE3Collector::MyWrapper::getDetector
GUIE3Collector & getDetector()
Returns the detector itself.
Definition: GUIE3Collector.cpp:153
GUIE3Collector::MyWrapper::myBoundary
Boundary myBoundary
The detector's boundary.
Definition: GUIE3Collector.h:149
GUIE3Collector::getExits
const CrossSectionVector & getExits() const
Returns the list of exit points.
Definition: GUIE3Collector.cpp:178
GUIE3Collector::MyWrapper::myEntryDefinitions
CrossingDefinitions myEntryDefinitions
The list of entry positions.
Definition: GUIE3Collector.h:155
GUIE3Collector::MyWrapper::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIE3Collector.cpp:94
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:161
ValueSource.h
GUIMainWindow
Definition: GUIMainWindow.h:47
GUIE3Collector::MyWrapper::CrossingDefinitions
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
Definition: GUIE3Collector.h:152
GUIE3Collector::getEntries
const CrossSectionVector & getEntries() const
Returns the list of entry points.
Definition: GUIE3Collector.cpp:172
GUIE3Collector::MyWrapper::drawSingleCrossing
void drawSingleCrossing(const Position &pos, double rot, double upscale) const
Draws a single entry/exit point.
Definition: GUIE3Collector.cpp:116
config.h
GUIE3Collector::MyWrapper::myDetector
GUIE3Collector & myDetector
The wrapped detector.
Definition: GUIE3Collector.h:146
GUIE3Collector::MyWrapper::SingleCrossingDefinition::myFGPosition
Position myFGPosition
The position.
Definition: GUIE3Collector.h:131
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:346
PositionVector.h
MSE3Collector.h
GUIE3Collector::MyWrapper::SingleCrossingDefinition
Representation of a single crossing point.
Definition: GUIE3Collector.h:129
CrossSectionVector
std::vector< MSCrossSection > CrossSectionVector
Definition: MSCrossSection.h:64