Eclipse SUMO - Simulation of Urban MObility
GUIOverheadWire.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-2020 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 /****************************************************************************/
19 // The gui-version of a MSOverheadWire
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
24 #include <vector>
25 #include <string>
26 #include <utils/common/Command.h>
30 #include <guisim/GUIBusStop.h>
34 #include <utils/geom/Position.h>
35 #include <gui/GUIManipulator.h>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class MSNet;
42 class MSLane;
43 class GUIManipulator;
44 class GUIOverheadWire;
46 
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
63 public:
71  GUIOverheadWire(const std::string& id, MSLane& lane, double frompos, double topos,
72  bool voltageSource);
73 
76 
78 
79 
88 
99 
106 
111  void drawGL(const GUIVisualizationSettings& s) const;
113 
114 private:
116  std::vector<double> myFGShapeRotations;
117 
119  std::vector<double> myFGShapeLengths;
120 
123 
126 
128  double myFGSignRot;
129 };
130 
132 public:
139  GUIOverheadWireClamp(const std::string& id, MSLane& lane_start, MSLane& lane_end);
140 
143 
145 
146 
155 
166 
173 
178  void drawGL(const GUIVisualizationSettings& s) const;
180 
181 private:
182 
185 };
186 
187 
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
The popup menu of a globject.
PositionVector myFGShape
The shape.
~GUIOverheadWireClamp()
Destructor.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIOverheadWireClamp(const std::string &id, MSLane &lane_start, MSLane &lane_end)
Constructor.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GUI for the overhead wire system.
PositionVector myFGShape
The shape.
~GUIOverheadWire()
Destructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::vector< double > myFGShapeRotations
The rotations of the shape parts.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GUIOverheadWire(const std::string &id, MSLane &lane, double frompos, double topos, bool voltageSource)
Constructor.
double myFGSignRot
The rotation of the sign.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
std::vector< double > myFGShapeLengths
The lengths of the shape parts.
Position myFGSignPos
The position of the sign.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
The simulated network and simulation perfomer.
Definition: MSNet.h:89
Definition of overhead wire segment.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:36
A list of positions.