Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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-2023 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>
36#include <utils/geom/Position.h>
37#include <gui/GUIManipulator.h>
38
39
40// ===========================================================================
41// class declarations
42// ===========================================================================
43class MSNet;
44class MSLane;
45class GUIManipulator;
46
47
48// ===========================================================================
49// class definitions
50// ===========================================================================
63public:
72 GUIBusStop(const std::string& id,
73 SumoXMLTag element,
74 const std::vector<std::string>& lines, MSLane& lane,
75 double frompos, double topos, const std::string name,
76 int personCapacity, double parkingLength, const RGBColor& color);
77
78
81
82
84 bool addAccess(MSLane* lane, const double pos, double length);
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
128 void drawGL(const GUIVisualizationSettings& s) const;
129
131
132private:
133
134
136 void initShape(PositionVector& fgShape,
137 std::vector<double>& fgShapeRotations, std::vector<double>& fgShapeLengths,
138 Position& fgSignPos, double& fgSignRot, bool secondaryShape = false);
139
140private:
142 std::vector<double> myFGShapeRotations;
143 std::vector<double> myFGShapeRotations2;
144
146 std::vector<double> myFGShapeLengths;
147 std::vector<double> myFGShapeLengths2;
148
152
156
160
162 double myWidth;
163
166
167
168};
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:62
Position myFGSignPos
The position of the sign.
Definition GUIBusStop.h:154
std::vector< double > myFGShapeRotations2
Definition GUIBusStop.h:143
bool addAccess(MSLane *lane, const double pos, double length)
adds an access point to this stop
double myFGSignRot
The rotation of the sign.
Definition GUIBusStop.h:158
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double myFGSignRot2
Definition GUIBusStop.h:159
void initShape(PositionVector &fgShape, std::vector< double > &fgShapeRotations, std::vector< double > &fgShapeLengths, Position &fgSignPos, double &fgSignRot, bool secondaryShape=false)
init constants for faster rendering
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
~GUIBusStop()
Destructor.
std::vector< double > myFGShapeLengths
The lengths of the shape parts.
Definition GUIBusStop.h:146
PositionVector myFGShape
The shape.
Definition GUIBusStop.h:150
std::vector< double > myFGShapeLengths2
Definition GUIBusStop.h:147
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
double myWidth
The visual width of the stoppling place.
Definition GUIBusStop.h:162
std::vector< double > myFGShapeRotations
The rotations of the shape parts.
Definition GUIBusStop.h:142
const std::string getOptionalName() const
Returns the street name.
PositionVector myAccessCoords
The coordinates of access points.
Definition GUIBusStop.h:165
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
Position myFGSignPos2
Definition GUIBusStop.h:155
PositionVector myFGShape2
Definition GUIBusStop.h:151
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:88
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.