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-2018 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 
155  CrossingDefinitions myEntryDefinitions;
156 
158  CrossingDefinitions myExitDefinitions;
159 
160  };
161 
162 };
163 
164 
165 #endif
166 
167 /****************************************************************************/
168 
The gui-version of the MSE3Collector.
long long int SUMOTime
Definition: SUMOTime.h:36
const CrossSectionVector & getEntries() const
Returns the list of entry points.
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
const CrossSectionVector & getExits() const
Returns the list of exit points.
A simple description of a position on a lane (crossing of a lane)
Stores the information about how to visualize structures.
SingleCrossingDefinition buildDefinition(const MSCrossSection &section)
Builds the description about the position of the entry/exit point.
std::vector< MSCrossSection > CrossSectionVector
GUIE3Collector & myDetector
The wrapped detector.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes, bool openEntry)
Constructor.
~GUIE3Collector()
Destructor.
CrossingDefinitions myEntryDefinitions
The list of entry positions.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
MyWrapper(GUIE3Collector &detector)
Constructor.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
CrossingDefinitions myExitDefinitions
The list of exit positions.
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:58
GUIE3Collector & getDetector()
Returns the detector itself.
Representation of a single crossing point.
void drawSingleCrossing(const Position &pos, double rot, double upscale) const
Draws a single entry/exit point.
Boundary myBoundary
The detector&#39;s boundary.
A window containing a gl-object&#39;s parameter.