60 myParentJunction(parentJunction),
61 myCrossing(crossing) {
82 for (
int i = 0; i < segments; ++i) {
117 glColor3d(0.118, 0.565, 1.000);
119 glColor3d(1.0, 0.1, 0.1);
121 glColor3d(0.9, 0.9, 0.9);
123 glColor3d(0.1, 0.1, 0.1);
126 glTranslated(0, 0, .2);
129 double spacing = 1.0;
134 glTranslated(0, 0, 0.1);
144 glVertex2d(-halfWidth, -t);
145 glVertex2d(-halfWidth, -t - length);
146 glVertex2d(halfWidth, -t - length);
147 glVertex2d(halfWidth, -t);
157 glTranslated(0, 0, -.2);
239 std::vector<std::string> NBEdgeIDs = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
241 for (std::vector<std::string>::iterator i = NBEdgeIDs.begin(); i != NBEdgeIDs.end(); i++) {
249 return canParse<double>(value) && isPositive<double>(value);
251 return canParse<bool>(value);
270 for (std::vector<GNEEdge*>::const_iterator i = edges.begin(); i != edges.end(); i++) {
290 std::vector<std::string> NBEdgeIDs = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
292 for (std::vector<std::string>::iterator i = NBEdgeIDs.begin(); i != NBEdgeIDs.end(); i++) {
bool checkEdgeBelong(GNEEdge *edges) const
return true if a edge belongs to crossing's edges
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
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 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
This functions has to be implemented in allGNEAttributeCarrier.
GNECrossing(GNEJunction *parentJunction, NBNode::Crossing *crossing)
Constructor.
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 updateGeometry()
update pre-computed geometry information
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
NBNode::Crossing * myCrossing
the data for this crossing
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
NBNode::Crossing * getNBCrossing() const
get referente to NBode::Crossing
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
A road/street connecting two junctions (netedit-version)
double width
This lane's width.
void updateGeometry()
Update the boundary of the junction.
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.
A window containing a gl-object's parameter.
bool valid
whether this crossing is valid (and can be written to the net.xml). This is needed for netedit becaus...
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.