53 #ifdef CHECK_MEMORY_LEAKS 55 #endif // CHECK_MEMORY_LEAKS 70 myNBConnection(from.getNBEdge(), fromLane, to.getNBEdge(), toLane, tlIndex),
71 myConnection(fromLane, to.getNBEdge(), toLane),
74 myJunction(from.getNBEdge()->getToNode()),
76 myKeepClear(keepClear),
78 myUncontrolled(uncontrolled) {
90 int segments = (int)
myShape.size() - 1;
94 for (
int i = 0; i < segments; ++i) {
GNEEdge & getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
void updateGeometry()
update pre-computed geometry information
void setKeepClear(bool keepClear)
set parameter keepClear
const NBEdge::Connection & getNBEdgeConnection() const
get Edge::NBConnection
GNELane * getToLane() const
get lane of the outgoing lane
A structure which describes a connection between edges or lanes.
GNEEdge & myFromEdge
incoming edge of this connection
int getFromLaneIndex() const
get lane index of the incoming lane
int toLane
The lane the connections yields in.
bool isValid(SumoXMLAttr key, const std::string &value)
NBConnection myNBConnection
NBConnection associated with this connection.
int getToLaneIndex() const
get lane index of the outgoing lane
GNEEdge & myToEdge
outcoming edge of this connection
Boundary getBoundary() const
Returns the street's geometry.
Stores the information about how to visualize structures.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
static void drawBoxLines(const PositionVector &geom, const std::vector< SUMOReal > &rots, const std::vector< SUMOReal > &lengths, SUMOReal width, int cornerDetail=0, SUMOReal offset=0)
Draws thick lines.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool getKeepClear()
get parameter keepClear
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
SUMOReal x() const
Returns the x-position.
std::vector< SUMOReal > myShapeRotations
GUIGlID getGlID() const
Returns the numerical id of the object.
#define UNUSED_PARAMETER(x)
bool myPass
if set, vehicles which pass this (lane-2-lane) connection) will not wait
A class that stores a 2D geometrical boundary.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
std::vector< SUMOReal > myShapeLengths
The lengths of the shape parts.
PositionVector myShape
the shape of the edge
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
bool getPass()
get parameter pass
NBNode * myJunction
junction in which this connection is placed
int fromLane
The lane the connections starts at.
A point in 2D or 3D with translation and scaling methods.
bool myKeepClear
if set to false, vehicles which pass this (lane-2-lane) connection) will not worry about blocking the...
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
~GNEConnection()
Destructor.
GNEConnection(GNEEdge &from, int fromLane, GNEEdge &to, int toLane, bool pass, bool keepClear, SUMOReal contPos, bool uncontrolled, int tlIndex=NBConnection::InvalidTlIndex)
Constructor.
SUMOReal myContPos
if set to 0, no internal junction will be built for this connection. If set to a positive value...
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
GNELane * getFromLane() const
get lane of the incoming lane
A road/street connecting two junctions (netedit-version)
NBEdge::Connection myConnection
NBEdge::Connection associated with this connection.
PositionVector computeInternalLaneShape(NBEdge *fromE, const NBEdge::Connection &con, int numPoints) const
Compute the shape for an internal lane.
void setUncontrolled(bool uncontrolled)
set parameter uncontrolled
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
void setPass(bool pass)
set parameter pass
SUMOReal y() const
Returns the y-position.
void setContPos(SUMOReal contPos)
set parameter ContPos
SUMOReal getContPos()
get parameter ContPos
SUMOReal distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
static void drawLine(const Position &beg, SUMOReal rot, SUMOReal visLength)
Draws a thin line.
bool getUncontrolled()
get parameter uncontrolled
NBEdge * getNBEdge()
returns the internal NBEdge
const NBConnection & getNBConnection() const
get NBConnection
std::string getAttribute(SumoXMLAttr key) const
A window containing a gl-object's parameter.
GNEEdge & getEdgeFrom() const
get the name of the edge the vehicles leave
bool myUncontrolled
if set to true, This connection will not be TLS-controlled despite its node being controlled...