60 myParentJunction(parentJunction),
61 myCrossing(parentJunction->getNBNode()->getCrossingRef(id)) {
82 for (
int i = 0; i < segments; ++i) {
86 myShapeRotations.push_back((
double) atan2((s.
x() - f.
x()), (f.
y() - s.
y())) * (double) 180.0 / (
double)
PI);
117 glColor3d(0.118, 0.565, 1.000);
119 glColor3d(0.9, 0.9, 0.9);
121 glColor3d(0.1, 0.1, 0.1);
124 glTranslated(0, 0, .2);
127 double spacing = 1.0;
132 glTranslated(0, 0, 0.1);
142 glVertex2d(-halfWidth, -t);
143 glVertex2d(-halfWidth, -t - length);
144 glVertex2d(halfWidth, -t - length);
145 glVertex2d(halfWidth, -t);
155 glTranslated(0, 0, -.2);
237 std::vector<std::string> NBEdgeIDs = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
239 for (std::vector<std::string>::iterator i = NBEdgeIDs.begin(); i != NBEdgeIDs.end(); i++) {
247 return isPositive<double>(value);
249 return ((value ==
"true") || (value ==
"false"));
267 std::vector<std::string> NBEdgeIDs = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
269 for (std::vector<std::string>::iterator i = NBEdgeIDs.begin(); i != NBEdgeIDs.end(); i++) {
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
NBNode::Crossing & myCrossing
the data for this crossing
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
GNENet * myNet
the net to inform about updates
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
double x() const
Returns the x-position.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
PositionVector shape
The lane's shape.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A class that stores a 2D geometrical boundary.
bool priority
whether the pedestrians have priority
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GNECrossing(GNEJunction *parentJunction, const std::string &id)
Constructor.
void updateGeometry()
update pre-computed geometry information
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::vector< double > myShapeRotations
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
declare friend class
GNEJunction * myParentJunction
the parent junction of this crossing
NBNode::Crossing & getNBCrossing() const
get referente to NBode::Crossing
Boundary & grow(double by)
extends the boundary by the given amount
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
GUIGLObjectPopupMenu * myPopup
the created popup
const PositionVector & getShape() const
retrieve the junction shape
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
double width
This lane's width.
crossing between edges for pedestrians
virtual ~GNECrossing()
Destructor.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
EdgeVector edges
The edges being crossed.
GUIGlID getGlID() const
Returns the numerical id of the object.
A definition of a pedestrian crossing.
bool isValid(SumoXMLAttr key, const std::string &value)
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
std::vector< double > myShapeLengths
The lengths of the shape parts.
NBEdge * getNBEdge()
returns the internal NBEdge
NBNode * getNBNode() const
Return net build node.
GUISelectedStorage gSelected
A global holder of selected objects.
void closeBuilding()
Closes the building of the table.
A window containing a gl-object's parameter.
std::string getAttribute(SumoXMLAttr key) const
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GNEJunction * getParentJunction() const
get parent Junction
SumoXMLTag getTag() const
get XML Tag assigned to this object