Eclipse SUMO - Simulation of Urban MObility
GUIBusStop.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 /****************************************************************************/
21 // A lane area vehicles can halt at (gui-version)
22 /****************************************************************************/
23 #pragma once
24 #include <config.h>
25 
26 #include <vector>
27 #include <string>
29 #include <utils/common/Command.h>
31 #include <utils/common/RGBColor.h>
36 #include <utils/geom/Position.h>
38 #include <gui/GUIManipulator.h>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class MSNet;
45 class MSLane;
46 class GUIManipulator;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
64 public:
73  GUIBusStop(const std::string& id,
74  SumoXMLTag element,
75  const std::vector<std::string>& lines, MSLane& lane,
76  double frompos, double topos, const std::string name,
77  int personCapacity, double parkingLength, const RGBColor& color);
78 
79 
81  ~GUIBusStop();
82 
83 
85  bool addAccess(MSLane* const lane, const double startPos, const double endPos, double length, const bool doors);
86 
88 
89 
98  GUISUMOAbstractView& parent);
99 
110  GUISUMOAbstractView& parent);
111 
113  double getExaggeration(const GUIVisualizationSettings& s) const;
114 
121 
123  const std::string getOptionalName() const;
124 
126  double getCroppedLastFreePos() const;
127 
132  void drawGL(const GUIVisualizationSettings& s) const;
133 
135 
136 private:
137 
138 
140  void initShape(PositionVector& fgShape,
141  std::vector<double>& fgShapeRotations, std::vector<double>& fgShapeLengths,
142  Position& fgSignPos, double& fgSignRot, bool secondaryShape = false);
143 
144 private:
146  std::vector<double> myFGShapeRotations;
147  std::vector<double> myFGShapeRotations2;
148 
150  std::vector<double> myFGShapeLengths;
151  std::vector<double> myFGShapeLengths2;
152 
156 
160 
162  double myFGSignRot;
163  double myFGSignRot2;
164 
166  double myWidth;
167 
170 
171 
172 };
SumoXMLTag
Numbers representing SUMO-XML - element names.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
A lane area vehicles can halt at (gui-version)
Definition: GUIBusStop.h:63
Position myFGSignPos
The position of the sign.
Definition: GUIBusStop.h:158
std::vector< double > myFGShapeRotations2
Definition: GUIBusStop.h:147
bool addAccess(MSLane *const lane, const double startPos, const double endPos, double length, const bool doors)
adds an access point to this stop
Definition: GUIBusStop.cpp:105
double myFGSignRot
The rotation of the sign.
Definition: GUIBusStop.h:162
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUIBusStop.cpp:170
double myFGSignRot2
Definition: GUIBusStop.h:163
void initShape(PositionVector &fgShape, std::vector< double > &fgShapeRotations, std::vector< double > &fgShapeLengths, Position &fgSignPos, double &fgSignRot, bool secondaryShape=false)
init constants for faster rendering
Definition: GUIBusStop.cpp:75
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUIBusStop.cpp:115
~GUIBusStop()
Destructor.
Definition: GUIBusStop.cpp:71
std::vector< double > myFGShapeLengths
The lengths of the shape parts.
Definition: GUIBusStop.h:150
PositionVector myFGShape
The shape.
Definition: GUIBusStop.h:154
std::vector< double > myFGShapeLengths2
Definition: GUIBusStop.h:151
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUIBusStop.cpp:129
double myWidth
The visual width of the stoppling place.
Definition: GUIBusStop.h:166
std::vector< double > myFGShapeRotations
The rotations of the shape parts.
Definition: GUIBusStop.h:146
const std::string getOptionalName() const
Returns the street name.
Definition: GUIBusStop.cpp:277
double getCroppedLastFreePos() const
Formats the last free pos value.
Definition: GUIBusStop.cpp:282
PositionVector myAccessCoords
The coordinates of access points.
Definition: GUIBusStop.h:169
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUIBusStop.cpp:266
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
Definition: GUIBusStop.cpp:260
GUIBusStop(const std::string &id, SumoXMLTag element, const std::vector< std::string > &lines, MSLane &lane, double frompos, double topos, const std::string name, int personCapacity, double parkingLength, const RGBColor &color)
Constructor.
Definition: GUIBusStop.cpp:57
Position myFGSignPos2
Definition: GUIBusStop.h:159
PositionVector myFGShape2
Definition: GUIBusStop.h:155
The popup menu of a globject.
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
A lane area vehicles can halt at.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
A list of positions.