Eclipse SUMO - Simulation of Urban MObility
GUIMEInductLoop.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 /****************************************************************************/
18 // The gui-version of the MEInductLoop
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include <mesosim/MEInductLoop.h>
24 #include <utils/geom/Position.h>
26 
27 
28 // ===========================================================================
29 // class declarations
30 // ===========================================================================
31 class GUILane;
32 class MESegment;
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
44 class GUIMEInductLoop : public MEInductLoop {
45 public:
47  GUIMEInductLoop(const std::string& id, MESegment* s,
48  double position, const std::string& vTypes,
49  int detectPersons, bool show);
50 
53 
58 
59 
60 public:
65  class MyWrapper : public GUIDetectorWrapper {
66  public:
68  MyWrapper(GUIMEInductLoop& detector,
69  double pos);
70 
72  ~MyWrapper();
73 
75 
76 
85  GUIMainWindow& app, GUISUMOAbstractView& parent);
86 
92  void drawGL(const GUIVisualizationSettings& s) const;
93 
95  double getExaggeration(const GUIVisualizationSettings& s) const;
96 
104 
107 
108  private:
111 
114 
117 
119  double myFGRotation;
120 
122  double myPosition;
123 
124  private:
127 
130 
131  };
132 
133 };
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
Representation of a lane in the micro simulation (gui-version)
Definition: GUILane.h:59
GUIMEInductLoop & myDetector
The wrapped detector.
MyWrapper & operator=(const MyWrapper &)
Invalidated assignment operator.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration asociated with this GLObject
Boundary myBoundary
The detector's boundary.
Position myFGPosition
The position in full-geometry mode.
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.
double myPosition
The position on the lane.
GUIMEInductLoop & getLoop()
Returns the detector itself.
double myFGRotation
The rotation in full-geometry mode.
MyWrapper(GUIMEInductLoop &detector, double pos)
Constructor.
MyWrapper(const MyWrapper &)
Invalidated copy constructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIMEInductLoop(const std::string &id, MESegment *s, double position, const std::string &vTypes, int detectPersons, bool show)
Construtor.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
~GUIMEInductLoop()
Destructor.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
An induction loop for mesoscopic simulation.
Definition: MEInductLoop.h:45
A single mesoscopic segment (cell)
Definition: MESegment.h:49
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37