SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GUIE3Collector.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // The gui-version of a MSE3Collector
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef GUIE3Collector_h
23 #define GUIE3Collector_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <string>
36 #include <vector>
37 #include "GUIDetectorWrapper.h"
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
53 class GUIE3Collector : public MSE3Collector {
54 public:
56  GUIE3Collector(const std::string& id,
57  const CrossSectionVector& entries, const CrossSectionVector& exits,
58  SUMOReal haltingSpeedThreshold,
59  SUMOTime haltingTimeThreshold, const std::string& vTypes);
60 
63 
64 
68  const CrossSectionVector& getEntries() const;
69 
70 
74  const CrossSectionVector& getExits() const;
75 
76 
82 
83 
84 public:
89  class MyWrapper : public GUIDetectorWrapper {
90  public:
92  MyWrapper(GUIE3Collector& detector);
93 
95  ~MyWrapper();
96 
97 
99 
100 
109  GUIMainWindow& app, GUISUMOAbstractView& parent);
110 
111 
118 
119 
124  void drawGL(const GUIVisualizationSettings& s) const;
126 
127 
130 
131 
132  protected:
141  };
142 
143  protected:
146 
148  void drawSingleCrossing(const Position& pos, SUMOReal rot,
149  SUMOReal upscale) const;
150 
151  private:
154 
157 
159  typedef std::vector<SingleCrossingDefinition> CrossingDefinitions;
160 
162  CrossingDefinitions myEntryDefinitions;
163 
165  CrossingDefinitions myExitDefinitions;
166 
167  };
168 
169 };
170 
171 
172 #endif
173 
174 /****************************************************************************/
175 
The gui-version of the MSE3Collector.
long long int SUMOTime
Definition: SUMOTime.h:43
std::vector< SingleCrossingDefinition > CrossingDefinitions
Definition of a list of cross (entry/exit-point) positions.
A simple description of a position on a lane (crossing of a lane)
const CrossSectionVector & getExits() const
Returns the list of exit points.
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.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
GUIE3Collector(const std::string &id, const CrossSectionVector &entries, const CrossSectionVector &exits, SUMOReal haltingSpeedThreshold, SUMOTime haltingTimeThreshold, const std::string &vTypes)
Constructor.
~GUIE3Collector()
Destructor.
CrossingDefinitions myEntryDefinitions
The list of entry positions.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
MyWrapper(GUIE3Collector &detector)
Constructor.
GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns the wrapper for this detector.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void drawSingleCrossing(const Position &pos, SUMOReal rot, SUMOReal upscale) const
Draws a single entry/exit point.
CrossingDefinitions myExitDefinitions
The list of exit positions.
A detector of vehicles passing an area between entry/exit points.
Definition: MSE3Collector.h:65
const CrossSectionVector & getEntries() const
Returns the list of entry points.
GUIE3Collector & getDetector()
Returns the detector itself.
#define SUMOReal
Definition: config.h:214
Representation of a single crossing point.
Boundary myBoundary
The detector's boundary.
A window containing a gl-object's parameter.