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-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
20 // The gui-version of a MSE3Collector
21 /****************************************************************************/
22 #pragma once
23 #include <config.h>
24 
25 #include <string>
26 #include <vector>
27 #include "GUIDetectorWrapper.h"
31 
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
43 class GUIE3Collector : public MSE3Collector {
44 public:
46  GUIE3Collector(const std::string& id,
47  const CrossSectionVector& entries, const CrossSectionVector& exits,
48  double haltingSpeedThreshold,
49  SUMOTime haltingTimeThreshold, const std::string& vTypes, int detectPersons, bool openEntry);
50 
53 
54 
58  const CrossSectionVector& getEntries() const;
59 
60 
64  const CrossSectionVector& getExits() const;
65 
66 
72 
73 
74 public:
79  class MyWrapper : public GUIDetectorWrapper {
80  public:
82  MyWrapper(GUIE3Collector& detector);
83 
85  ~MyWrapper();
86 
87 
89 
90 
99  GUIMainWindow& app, GUISUMOAbstractView& parent);
100 
102  double getExaggeration(const GUIVisualizationSettings& s) const;
103 
110 
115  void drawGL(const GUIVisualizationSettings& s) const;
117 
118 
121 
122 
123  protected:
131  double myFGRotation;
132  };
133 
134  protected:
137 
139  void drawSingleCrossing(const Position& pos, double rot,
140  double upscale) const;
141 
142  private:
145 
148 
150  typedef std::vector<SingleCrossingDefinition> CrossingDefinitions;
151 
154 
157 
158  };
159 
160 };
std::vector< MSCrossSection > CrossSectionVector
long long int SUMOTime
Definition: SUMOTime.h:32
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
SingleCrossingDefinition buildDefinition(const MSCrossSection &section)
Builds the description about the position of the entry/exit point.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration asociated with this GLObject
GUIE3Collector & myDetector
The wrapped detector.
void drawSingleCrossing(const Position &pos, double rot, double upscale) const
Draws a single entry/exit point.
GUIE3Collector & getDetector()
Returns the detector itself.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
CrossingDefinitions myExitDefinitions
The list of exit positions.
CrossingDefinitions myEntryDefinitions
The list of entry positions.
MyWrapper(GUIE3Collector &detector)
Constructor.
Boundary myBoundary
The detector's boundary.
The gui-version of the MSE3Collector.
~GUIE3Collector()
Destructor.
const CrossSectionVector & getExits() const
Returns the list of exit points.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
const CrossSectionVector & getEntries() const
Returns the list of entry points.
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, double haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes, int detectPersons, bool openEntry)
Constructor.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
A simple description of a position on a lane (crossing of a lane)
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:59
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
Representation of a single crossing point.