Eclipse SUMO - Simulation of Urban MObility
GUIParkingArea.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 // A area where vehicles can park next to the road (gui version)
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include <vector>
24 #include <string>
25 #include <utils/common/Command.h>
28 #include <microsim/MSParkingArea.h>
32 #include <utils/geom/Position.h>
33 #include <gui/GUIManipulator.h>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class MSNet;
40 class MSLane;
41 class GUIManipulator;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
59 public:
60 
73  GUIParkingArea(const std::string& id,
74  const std::vector<std::string>& lines, MSLane& lane,
75  double frompos, double topos, unsigned int capacity,
76  double width, double length, double angle, const std::string& name,
77  bool onRoad,
78  const std::string& departPos);
79 
80 
83 
84 
85 
87 
88 
97  GUISUMOAbstractView& parent);
98 
109  GUISUMOAbstractView& parent);
110 
112  double getExaggeration(const GUIVisualizationSettings& s) const;
113 
120 
122  const std::string getOptionalName() const;
123 
125  void addLotEntry(double x, double y, double z,
126  double width, double length,
127  double angle, double slope);
128 
133  void drawGL(const GUIVisualizationSettings& s) const;
135 
136  const Position& getSignPos() const {
137  return mySignPos;
138  }
139 
140 private:
142  std::vector<double> myShapeRotations;
143 
145  std::vector<double> myShapeLengths;
146 
149 
151  double mySignRot;
152 
155 
156 };
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
The popup menu of a globject.
A window containing a gl-object's parameter.
A lane area vehicles can halt at (gui-version)
std::vector< double > myShapeLengths
The lengths of the shape parts.
Boundary myBoundary
the centering boundary
std::vector< double > myShapeRotations
The rotations of the shape parts.
~GUIParkingArea()
Destructor.
void addLotEntry(double x, double y, double z, double width, double length, double angle, double slope)
extend boundary
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double mySignRot
The rotation of the sign.
const Position & getSignPos() const
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration asociated with this GLObject
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GUIParkingArea(const std::string &id, const std::vector< std::string > &lines, MSLane &lane, double frompos, double topos, unsigned int capacity, double width, double length, double angle, const std::string &name, bool onRoad, const std::string &departPos)
Constructor.
const std::string getOptionalName() const
Returns the stopping place name.
Position mySignPos
The position of the sign.
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:88
A lane area vehicles can halt at.
Definition: MSParkingArea.h:58
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37