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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // The gui-version of a MSE3Collector
20 /****************************************************************************/
21 #ifndef GUIE3Collector_h
22 #define GUIE3Collector_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <vector>
36 #include "GUIDetectorWrapper.h"
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
52 class GUIE3Collector : public MSE3Collector {
53 public:
55  GUIE3Collector(const std::string& id,
56  const CrossSectionVector& entries, const CrossSectionVector& exits,
57  double haltingSpeedThreshold,
58  SUMOTime haltingTimeThreshold, const std::string& vTypes);
59 
62 
63 
67  const CrossSectionVector& getEntries() const;
68 
69 
73  const CrossSectionVector& getExits() const;
74 
75 
81 
82 
83 public:
88  class MyWrapper : public GUIDetectorWrapper {
89  public:
91  MyWrapper(GUIE3Collector& detector);
92 
94  ~MyWrapper();
95 
96 
98 
99 
108  GUIMainWindow& app, GUISUMOAbstractView& parent);
109 
110 
117 
118 
123  void drawGL(const GUIVisualizationSettings& s) const;
125 
126 
129 
130 
131  protected:
139  double myFGRotation;
140  };
141 
142  protected:
145 
147  void drawSingleCrossing(const Position& pos, double rot,
148  double upscale) const;
149 
150  private:
153 
156 
158  typedef std::vector<SingleCrossingDefinition> CrossingDefinitions;
159 
161  CrossingDefinitions myEntryDefinitions;
162 
164  CrossingDefinitions myExitDefinitions;
165 
166  };
167 
168 };
169 
170 
171 #endif
172 
173 /****************************************************************************/
174 
The gui-version of the MSE3Collector.
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:47
~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:45
MyWrapper(GUIE3Collector &detector)
Constructor.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes)
Constructor.
CrossingDefinitions myExitDefinitions
The list of exit positions.
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:64
GUIE3Collector & getDetector()
Returns the detector itself.
long long int SUMOTime
Definition: TraCIDefs.h:51
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.