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.dev/sumo
3 // Copyright (C) 2001-2024 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 
101  double getExaggeration(const GUIVisualizationSettings& s) const;
102 
109 
114  void drawGL(const GUIVisualizationSettings& s) const;
116 
117 private:
119  std::vector<double> myFGShapeRotations;
120 
122  std::vector<double> myFGShapeLengths;
123 
126 
129 
131  double myFGSignRot;
132 };
133 
135 public:
142  GUIOverheadWireClamp(const std::string& id, MSLane& lane_start, MSLane& lane_end);
143 
146 
148 
149 
158 
169 
171  double getExaggeration(const GUIVisualizationSettings& s) const;
172 
179 
184  void drawGL(const GUIVisualizationSettings& s) const;
186 
187 private:
188 
191 };
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
The popup menu of a globject.
PositionVector myFGShape
The shape.
~GUIOverheadWireClamp()
Destructor.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
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 getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
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:84
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:37
A list of positions.