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
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
GNENet * myNet
the net to inform about updates
NBNode::Crossing & getNBCrossing() const
get referente to NBode::Crossing
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double x() const
Returns the x-position.
Stores the information about how to visualize structures.
NBNode * getNBNode() const
Return net build node.
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.
std::string getAttribute(SumoXMLAttr key) const
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
GNECrossing(GNEJunction *parentJunction, const std::string &id)
Constructor.
void updateGeometry()
update pre-computed geometry information
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
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
double y() const
Returns the y-position.
GNEJunction * getParentJunction() const
get parent Junction
GNEJunction * myParentJunction
the parent junction of this crossing
Boundary & grow(double by)
extends the boundary by the given amount
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.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
crossing between edges for pedestrians
virtual ~GNECrossing()
Destructor.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
EdgeVector edges
The edges being crossed.
A definition of a pedestrian crossing.
SumoXMLTag getTag() const
get XML Tag assigned to this object
bool isValid(SumoXMLAttr key, const std::string &value)
std::vector< double > myShapeLengths
The lengths of the shape parts.
NBEdge * getNBEdge()
returns the internal NBEdge
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
GUISelectedStorage gSelected
A global holder of selected objects.
void closeBuilding()
Closes the building of the table.
A window containing a gl-object's parameter.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.