52 #ifdef CHECK_MEMORY_LEAKS 54 #endif // CHECK_MEMORY_LEAKS 69 myParentJunction(parentJunction),
70 myCrossing(parentJunction.getNBNode()->getCrossing(id)),
71 myShape(myCrossing.shape) {
72 int segments = (int)
myShape.size() - 1;
76 for (
int i = 0; i < segments; ++i) {
99 glColor3d(0.9, 0.9, 0.9);
101 glColor3d(0.1, 0.1, 0.1);
103 glTranslated(0, 0, .2);
111 glTranslated(0, 0, 0.1);
112 int e = (int)
myShape.size() - 1;
113 for (
int i = 0; i < e; ++i) {
119 glVertex2d(-halfWidth, -t);
120 glVertex2d(-halfWidth, -t - length);
121 glVertex2d(halfWidth, -t - length);
122 glVertex2d(halfWidth, -t);
131 glTranslated(0, 0, -.2);
212 return isPositive<SUMOReal>(value);
214 return value ==
"true" || value ==
"false";
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
SUMOReal width
This lane's width.
GNECrossing(GNEJunction &parentJunction, const std::string &id)
Constructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::vector< SUMOReal > myShapeLengths
The lengths of the shape parts.
Stores the information about how to visualize structures.
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getAttribute(SumoXMLAttr key) const
SUMOReal x() const
Returns the x-position.
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
bool priority
whether the pedestrians have priority
void updateCrossingAttributes(NBNode::Crossing crossing)
modify the specified crossing (using friend privileges)
A point in 2D or 3D with translation and scaling methods.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
friend class GNEChange_Attribute
GNEJunction & myParentJunction
the parent junction of this crossing
GUIGLObjectPopupMenu * myPopup
the created popup
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
NBNode::Crossing myCrossing
the data for this crossing
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
SUMOReal y() const
Returns the y-position.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
virtual ~GNECrossing()
Destructor.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
EdgeVector edges
The edges being crossed.
SUMOReal distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
bool isValid(SumoXMLAttr key, const std::string &value)
const PositionVector myShape
the shape of the edge
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
void closeBuilding()
Closes the building of the table.
A window containing a gl-object's parameter.
std::vector< SUMOReal > myShapeRotations
The rotations of the shape parts.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.