70 GNENetElement(from->getNet(),
"from" + from->getMicrosimID() +
"to" + to->getMicrosimID(),
102 if (
getEdgeFrom()->getNBEdge()->getToNode()->getShape().area() > 4) {
108 (
double) 5. * (
double)
getEdgeFrom()->getNBEdge()->getNumLanes(),
118 int segments = (int)
myShape.size() - 1;
122 for (
int i = 0; i < segments; ++i) {
221 (
dynamic_cast<GNEViewNet&
>(parent)).markPopupPosition();
341 return canParse<bool>(value);
343 return canParse<bool>(value);
345 return canParse<double>(value);
347 return canParse<bool>(value);
349 return canParse<double>(value) && isPositive<double>(value);
370 nbCon.
contPos = parse<double>(value);
void updateGeometry()
update pre-computed geometry information
std::vector< double > myShapeLengths
The lengths of the shape parts.
A structure which describes a connection between edges or lanes.
int getFromLaneIndex() const
get lane index of the incoming lane
int toLane
The lane the connections yields in.
double scale
information about a lane's width (temporary, used for a single view)
bool isValid(SumoXMLAttr key, const std::string &value)
Whether vehicles must keep the junction clear.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
GNENet * myNet
the net to inform about updates
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
int getToLaneIndex() const
get lane index of the outgoing lane
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
NBEdge * toEdge
The edge the connections yields in.
Boundary getBoundary() const
Returns the street's geometry.
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
double x() const
Returns the x-position.
Stores the information about how to visualize structures.
connectio between two lanes
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
foe visibility distance of a link
static RGBColor colorForLinksState(FXuint state)
return the color for each linkstate
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
GNELane * myFromLane
incoming lane of this connection
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
double visibility
custom foe visiblity for connection
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
The link is controlled by a tls which is off, not blinking, may pass.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
int getIndex() const
returns the index of the lane
GUIGlID getGlID() const
Returns the numerical id of the object.
#define UNUSED_PARAMETER(x)
A class that stores a 2D geometrical boundary.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GNELane * getLaneFrom() const
get lane of the incoming lane
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
bool keepClear
whether the junction must be kept clear when using this connection
NBConnection getNBConnection() const
get NBConnection
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
const std::string & getID() const
Returns the id.
PositionVector myShape
the shape of the connection
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GNEEdge * getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void updateID()
update internal ID of Connection
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
GNEEdge & getParentEdge()
Returns underlying parent edge.
std::vector< double > myShapeRotations
LinkState myLinkState
Linkstate.
std::string tlID
The id of the traffic light that controls this connection.
int fromLane
The lane the connections starts at.
GNEConnection(GNELane *from, GNELane *to)
A point in 2D or 3D with translation and scaling methods.
friend class GNEChange_Attribute
declare friend class
double y() const
Returns the y-position.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
int getNumLanes() const
Returns the number of lanes.
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
double length() const
Returns the length.
LinkState getLinkState() const
get LinkState
GNELane * myToLane
outgoing lane of this connection
LinkState getLinkState(const NBEdge *incoming, NBEdge *outgoing, int fromLane, int toLane, bool mayDefinitelyPass, const std::string &tlID) const
get link state
~GNEConnection()
Destructor.
Boundary & grow(double by)
extends the boundary by the given amount
GUIColorer junctionColorer
The junction colorer.
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
const std::string getID() const
function to support debugging
NBEdge::Connection & getNBEdgeConnection() const
get Edge::Connection
A road/street connecting two junctions (netedit-version)
NBNode * getToNode() const
Returns the destination node of the edge.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
PositionVector computeSmoothShape(const PositionVector &begShape, const PositionVector &endShape, int numPoints, bool isTurnaround, double extrapolateBeg, double extrapolateEnd, NBNode *recordError=0) const
Compute a smooth curve between the given geometries.
bool showConnections()
show connections over junctions
static const RGBColor selectedConnectionColor
color of selected connection
double contPos
custom position for internal junction on this connection
bool uncontrolled
check if Connection is uncontrolled
GNELane * getLaneTo() const
get lane of the outgoing lane
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
SumoXMLTag getTag() const
get XML Tag assigned to this object
void updateLinkState()
recompute cached myLinkState
NBEdge * getNBEdge()
returns the internal NBEdge
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in allGNEAttributeCarrier.
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.
Connection & getConnectionRef(int fromLane, const NBEdge *to, int toLane)
Returns reference to the specified connection This method goes through "myConnections" and returns th...
GNEViewNet * getViewNet() const
get view net
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.