73 myGNEJunctionSource(myNet->retrieveJunction(myNBEdge.getFromNode()->getID())),
74 myGNEJunctionDestiny(myNet->retrieveJunction(myNBEdge.getToNode()->getID())),
75 myOrigShape(nbe.getInnerGeometry()),
77 myAmResponsible(false),
79 myConnectionStatus(loaded ? LOADED : GUESSED) {
83 for (
int i = 0; i < numLanes; i++) {
85 myLanes.back()->incRef(
"GNEEdge::GNEEdge");
88 for (LaneVector::iterator i =
myLanes.begin(); i !=
myLanes.end(); i++) {
89 (*i)->updateGeometry();
97 i->decRef(
"GNEEdge::~GNEEdge");
98 if (i->unreferenced()) {
101 WRITE_WARNING(
"Deleting unreferenced " +
toString(i->getTag()) +
" '" + i->getID() +
"' in GNEEdge destructor");
108 i->decRef(
"GNEEdge::~GNEEdge");
109 if (i->unreferenced()) {
112 WRITE_WARNING(
"Deleting unreferenced " +
toString(i->getTag()) +
" '" + i->getID() +
"' in GNEEdge destructor");
146 for (
auto i : innerGeometry) {
152 if (createIfNoExist) {
153 if (innerGeometry.size() == 0) {
154 innerGeometry.push_back(pos);
186 if (index < (
int)edgeGeometry.size()) {
188 edgeGeometry[index] = oldPos;
189 edgeGeometry[index].
add(offset);
207 for (
auto& i : modifiedShape) {
227 innerShapeToCommit.
removeClosest(innerShapeToCommit[(
int)innerShapeToCommit.size() - 1]);
249 modifiedShape.erase(modifiedShape.begin() + index);
280 ret.
add(i->getBoundary());
289 return (angleBetweenOriginAndDestiny < -1.5707) || (angleBetweenOriginAndDestiny > 1.5707);
360 glGetFloatv(GL_CURRENT_COLOR, color);
365 for (
int i = 1; i < (int)geom.size() - 1; i++) {
372 }
else if (s.
scale >= 2) {
374 }
else if (s.
scale >= 1) {
390 GNELane* lane2 = myLanes[myLanes.size() - 1];
396 if (angle > 90 && angle < 270) {
402 if (drawStreetName) {
421 if (geom[index].distanceTo(clickPos) <
SNAP_RADIUS) {
433 undoList->
p_begin(
"set endpoint");
486 std::vector<GNEConnection*> retrievedConnections;
488 for (
auto it : connections) {
492 retrievedConnections.push_back(retrievedGNEConnection);
499 retrievedGNEConnection->
incRef(
"GNEEdge::remakeGNEConnections");
505 if (it->unreferenced()) {
508 WRITE_WARNING(
"Deleting unreferenced " +
toString(it->getTag()) +
" '" + it->getID() +
"' in rebuildGNEConnections()");
514 myGNEConnections = retrievedConnections;
523 i->decRef(
"GNEEdge::clearGNEConnections");
525 if (i->unreferenced()) {
528 WRITE_WARNING(
"Deleting unreferenced " +
toString(i->getTag()) +
" '" + i->getID() +
"' in clearGNEConnections()");
533 myGNEConnections.clear();
539 std::vector<GNEAdditional*> routeProbes;
541 if (i->getTag() == routeProbe->
getTag()) {
542 routeProbes.push_back(i);
546 auto it = std::find(routeProbes.begin(), routeProbes.end(), routeProbe);
547 if (it == routeProbes.end()) {
550 return (
int)(it - routeProbes.begin());
557 std::vector<GNEAdditional*> vaporizers;
559 if (i->getTag() == vaporizer->
getTag()) {
560 vaporizers.push_back(i);
564 auto it = std::find(vaporizers.begin(), vaporizers.end(), vaporizer);
565 if (it == vaporizers.end()) {
568 return (
int)(it - vaporizers.begin());
573 std::vector<GNECrossing*>
575 std::vector<GNECrossing*> crossings;
577 if (i->checkEdgeBelong(
this)) {
578 crossings.push_back(i);
582 if (i->checkEdgeBelong(
this)) {
583 crossings.push_back(i);
595 std::vector<std::string> edgeIDs = parse<std::vector<std::string> >(i->getAttribute(
SUMO_ATTR_EDGES));
597 if (edgeIDs.empty()) {
599 }
else if ((edgeIDs.size() == 1) && (allowEmpty ==
false)) {
601 if (edgeIDs.front() ==
getID()) {
604 throw ProcessError(
"Edge ID wasnt' found in Additional");
607 auto it = std::find(edgeIDs.begin(), edgeIDs.end(),
getID());
608 if (it != edgeIDs.end()) {
613 throw ProcessError(
"Edge ID wasnt' found in Additional");
622 undoList->
p_begin(
"copy template");
631 for (
int i = 0; i < (int)
myLanes.size(); i++) {
644 std::set<GUIGlID> result;
646 result.insert(i->getGlID());
652 const std::vector<GNELane*>&
658 const std::vector<GNEConnection*>&
700 return "lane specific";
706 return "lane specific";
714 return "lane specific";
755 const std::string origValue =
myLanes.at(0)->getAttribute(key);
758 it->setAttribute(key, value, undoList);
877 return canParse<double>(value) && isPositive<double>(value);
879 return canParse<int>(value) && isPositive<int>(value);
881 return canParse<int>(value);
899 if (value ==
"default") {
905 return canParse<double>(value);
972 throw InvalidArgument(
"GNEEdge::setAttribute (private) called for attr SUMO_ATTR_NUMLANES. This should never happen");
998 if (value ==
"default") {
1016 }
else if (value !=
GUESSED) {
1023 geom.erase(geom.begin());
1056 const int oldNumLanes = (int)
myLanes.size();
1057 for (
int i = oldNumLanes; i < numLanes; i++) {
1062 for (
int i = oldNumLanes - 1; i > numLanes - 1; i--) {
1081 lane =
new GNELane(*
this, index);
1084 lane->
incRef(
"GNEEdge::addLane");
1092 for (
int i = 0; i < (int)
myLanes.size(); ++i) {
1103 i->remakeGNEConnections();
1107 i->remakeGNEConnections();
1124 lane->
decRef(
"GNEEdge::removeLane");
1135 for (
int i = 0; i < (int)
myLanes.size(); ++i) {
1146 i->remakeGNEConnections();
1150 i->remakeGNEConnections();
1169 if (selectAfterCreation) {
1190 con->
decRef(
"GNEEdge::removeConnection");
1207 if ((i->getFromLaneIndex() == fromLane) && (i->getEdgeTo()->getNBEdge() == to) && (i->getToLaneIndex() == toLane)) {
1211 if (createIfNoExist) {
1218 return createdConnection;
1230 i->setMicrosimID(
getNBEdge()->getLaneID(i->getIndex()));
1238 if (i->isRestricted(vclass)) {
1250 if (i->checkEdgeBelong(
this)) {
1262 PositionVector innerShape(modifiedShape.begin() + 1, modifiedShape.end() - 1);
1275 #ifdef DEBUG_SMOOTH_GEOM 1277 <<
" forElevation=" << forElevation
1280 <<
" smoothShape old=" << old <<
"\n";
1282 if (old.size() == 3 || old.size() == 4) {
1284 }
else if (old.size() > 4 && !forElevation) {
1286 init.push_back(old[0]);
1287 init.push_back(old[1]);
1288 init.push_back(old[-2]);
1289 init.push_back(old[-1]);
1295 if (incoming.size() == 1) {
1296 begShape = incoming[0]->getGeometry();
1298 assert(incoming.size() == 2);
1301 if (outgoing.size() == 1) {
1302 endShape = outgoing[0]->getGeometry();
1304 assert(outgoing.size() == 2);
1310 init.push_back(old[0]);
1313 init.push_back(old[-1]);
1317 init[1].setz(2 * init[0].z() - begZ);
1318 init[2].setz(2 * init[-1].z() - endZ);
1321 const double straightThresh =
DEG2RAD(oc.
getFloat(
"opendrive-output.straight-threshold"));
1324 #ifdef DEBUG_SMOOTH_GEOM 1326 std::cout <<
" begShape=" << begShape <<
" endShape=" << endShape <<
" forElevation=" << forElevation <<
" dist=" << dist <<
" ok=" << ok <<
" init=" << init <<
"\n";
1330 if (init.size() == 0) {
1333 const int numPoints =
MAX2(oc.
getInt(
"junctions.internal-link-detail"),
1335 return bezier(init, numPoints);
1343 if (modifiedShape.size() < 2) {
1346 PositionVector innerShape(modifiedShape.begin() + 1, modifiedShape.end() - 1);
1356 if (elevationBase.size() == 0 || elevationBase[-1].z() != pos.z()) {
1357 elevationBase.push_back(pos);
1361 if (elevation.size() <= 2) {
1365 if (modifiedShape.size() < 5) {
1371 for (
int i = 1; i < (int)modifiedShape.size(); ++i) {
1372 seen += modifiedShape[i - 1].distanceTo2D(modifiedShape[i]);
1376 PositionVector innerShape(modifiedShape.begin() + 1, modifiedShape.end() - 1);
GUIVisualizationSizeSettings junctionSize
void addLane(GNELane *lane, const NBEdge::Lane &laneAttrs)
increase number of lanes by one use the given attributes and restore the GNELane
static const PositionVector EMPTY
empty Vector
void copyTemplate(GNEEdge *tpl, GNEUndoList *undolist)
copy edge attributes from tpl
void invalidateConnections(bool reallowSetting=false)
invalidate current connections of edge
GNEJunction * myGNEJunctionSource
pointer to GNEJunction source
The information about how to spread the lanes from the given position.
void updateGeometry()
update pre-computed geometry information
std::string getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
void remakeGNEConnections()
remake connections
double z() const
Returns the z-position.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
const std::string & getTypeID() const
get ID of type
A structure which describes a connection between edges or lanes.
std::vector< GNEAdditional * > myAdditionalParents
list of Additional parents of this NetElement
void addIncomingGNEEdge(GNEEdge *edge)
add incoming GNEEdge
void setNumLanes(int numLanes, GNEUndoList *undoList)
changes the number of lanes. When reducing the number of lanes, higher-numbered lanes are removed fir...
void setLogicValid(bool valid, GNEUndoList *undoList, const std::string &status=GUESSED)
int toLane
The lane the connections yields in.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
double scale
information about a lane's width (temporary, used for a single view)
GUIVisualizationTextSettings streetName
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
GNEJunction * getGNEJunctionSource() const
returns the source-junction
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
static const double UNSPECIFIED_LOADED_LENGTH
no length override given
void resetWritable()
Resets all options to be writeable.
GNENet * myNet
the net to inform about updates
bool myAmResponsible
whether we are responsible for deleting myNBNode
void smoothElevation(GNEUndoList *undoList)
smooth elevation with regard to adjoining edges
void removeIncomingGNEEdge(GNEEdge *edge)
remove incoming GNEEdge
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.
begin/end of the description of a single lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
std::string myConnectionStatus
modification status of the connections
void add(const Position &pos)
Adds the given position to this one.
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
void setEndOffset(int lane, double offset)
set lane specific end-offset (negative lane implies set for all lanes)
GNEJunction * myGNEJunctionDestiny
pointer to GNEJunction destiny
bool hasString(const std::string &str) const
PositionVector myOrigShape
restore point for undo
void setMicrosimID(const std::string &newID)
override to also set lane ids
static StringBijection< LaneSpreadFunction > LaneSpreadFunctions
lane spread functions
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
void straightenElevation(GNEUndoList *undoList)
interpolate z values linear between junctions
bool hasLaneSpecificEndOffset() const
whether lanes differ in offset
std::set< GUIGlID > getLaneGlIDs()
returns GLIDs of all lanes
void setSpeed(int lane, double speed)
set lane specific speed (negative lane implies set for all lanes)
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
double exaggeration
The size exaggeration (upscale)
GUIColorer laneColorer
The lane colorer.
double x() const
Returns the x-position.
Stores the information about how to visualize structures.
static const double SNAP_RADIUS
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
The representation of a single edge during network building.
const std::vector< T > & getSchemes() const
bool hasRestrictedLane(SUMOVehicleClass vclass) const
check if edge has a restricted lane
Representation of a RouteProbe in netedit.
NBNode * getNBNode() const
Return net build node.
void setStreetName(const std::string &name)
sets the street name of this edge
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void smooth(GNEUndoList *undoList)
make geometry smooth
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
void removeFromConnections(NBEdge *toEdge, int fromLane=-1, int toLane=-1, bool tryLater=false, const bool adaptToLaneRemoval=false)
Removes the specified connection(s)
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
Position getPositionInView() const
Return current position.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
A NBNetBuilder extended by visualisation and editing capabilities.
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given ...
double getEndOffset() const
Returns the offset to the destination node.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
double getSpeed() const
Returns the speed allowed on this edge.
void setLoadedLength(double val)
set loaded lenght
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
double endOffset
This lane's offset to the intersection begin.
void clearGNEConnections()
clear current connections
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
double visibility
custom foe visiblity for connection
void removeEdgeFromCrossings(GNEJunction *junction, GNEUndoList *undoList)
remove crossing of junction
const std::vector< GNEConnection * > & getGNEConnections()
returns a reference to the GNEConnection vector
bool isInverted() const
return true if edge is inverted (Angle between origin and destiny junction is -PI/2 <= angle < PI/2 ...
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
const SVCPermissions SVCAll
all VClasses are allowed
Lane & getLaneStruct(int lane)
PositionVector smoothShape(const PositionVector &shape, bool forElevation)
return smoothed shape
int getRouteProbeRelativePosition(GNERouteProbe *routeProbe) const
obtain relative positions of RouteProbes
bool myWasSplit
whether this edge was created from a split
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
PositionVector interpolateZ(double zStart, double zEnd) const
returned vector that varies z smoothly over its length
first coordinate of edge shape
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.
void setGeometry(const PositionVector &g, bool inner=false)
(Re)sets the edge's geometry
int getIndex() const
returns the index of the lane
GUIGlID getGlID() const
Returns the numerical id of the object.
static const double UNSPECIFIED_WIDTH
unspecified lane width
A class that stores a 2D geometrical boundary.
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
#define WRITE_WARNING(msg)
static OptionsCont & getOptions()
Retrieves the options.
whether a feature has been loaded,guessed,modified or approved
SVCPermissions invertPermissions(SVCPermissions permissions)
negate the given permissions and ensure that only relevant bits are set
GNEUndoList * getUndoList() const
get the undoList object
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
int getVertexIndex(const Position &pos, bool createIfNoExist=true)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void removeOutgoingGNEEdge(GNEEdge *edge)
remove outgoing GNEEdge
bool keepClear
whether the junction must be kept clear when using this connection
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationTextSettings edgeName
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
An (internal) definition of a single lane of an edge.
const std::string & getID() const
Returns the id.
static bool isValidID(const std::string &value)
true if value is a valid sumo ID
SVCPermissions permissions
List of vehicle types that are allowed on this lane.
void addLane(int index, bool recompute=true)
add lane
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
void push_front_noDoublePos(const Position &p)
insert in front a non double position
void removeDoublePoints(double minDist=POSITION_EPS, bool assertLength=false)
Removes positions if too near.
const Position & getPosition() const
double getLaneWidth() const
Returns the default width of lanes of this edge.
bool hasLaneSpecificSpeed() const
whether lanes differ in speed
int getPriority() const
Returns the priority of the edge.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEEdge * getOppositeEdge() const
get opposite edge
const double SUMO_const_halfLaneWidth
SVCPermissions preferred
List of vehicle types that are preferred on this lane.
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
int fromLane
The lane the connections starts at.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
void deleteLane(int index, bool recompute=true)
delete lane
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true)
get junction by id
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
int indexOfClosest(const Position &p) const
index of the closest position to p
bool hasLaneSpecificPermissions() const
whether lanes differ in allowed vehicle classes
friend class GNEChange_Attribute
declare friend class
PositionVector resample(double maxLength) const
resample shape with the given number of points (equal spacing)
Boundary getBoundary() const
Returns the street's geometry.
double y() const
Returns the y-position.
Representation of a vaporizer in netedit.
bool geometryLike() const
whether this is structurally similar to a geometry node
int getNumLanes() const
Returns the number of lanes.
int getVaporizerRelativePosition(GNEVaporizer *vaporizer) const
obtain relative positions of Vaporizer
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
GNEConnection * retrieveGNEConnection(int fromLane, NBEdge *to, int toLane, bool createIfNoExist=true)
get GNEConnection if exist, and if not create it if create is enabled
double length() const
Returns the length.
int myPriority
The priority of the edge.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
edge: the shape in xml-definition
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
Boundary & grow(double by)
extends the boundary by the given amount
GUIColorer junctionColorer
The junction colorer.
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
void addOutgoingGNEEdge(GNEEdge *edge)
add outgoing GNEEdge
int insertAtClosest(const Position &p)
inserts p between the two closest positions and returns the insertion index
const std::string getID() const
function to support debugging
void incRef(const std::string &debugMsg="")
Increarse reference.
The connection was given by the user.
double speed
The speed allowed on this lane.
double width
This lane's width.
void removeLane(GNELane *lane)
the number of lanes by one. argument is only used to increase robustness (assertions) ...
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void decRef(const std::string &debugMsg="")
Decrease reference.
std::vector< GNECrossing * > getGNECrossings()
get GNECrossings vinculated with this Edge
begin/end of the description of an edge
void setGeometry(PositionVector geom, bool inner)
update edge geometry and inform the lanes
GNEEdge(NBEdge &nbe, GNENet *net, bool wasSplit=false, bool loaded=false)
Constructor.
bool canParseVehicleClasses(const std::string &classes)
Checks whether the given string contains only known vehicle classes.
A road/street connecting two junctions (netedit-version)
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
ConnectionVector myGNEConnections
vector with the connections of this edge
bool setConnection(int lane, NBEdge *destEdge, int destLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, double contPos=UNSPECIFIED_CONTPOS, double visibility=UNSPECIFIED_VISIBILITY_DISTANCE, double speed=UNSPECIFIED_SPEED, const PositionVector &customShape=PositionVector::EMPTY)
Adds a connection to a certain lane of a certain edge.
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
static const double BUBBLE_RADIUS
void setResponsible(bool newVal)
set responsibility for deleting internal strctures
void addConnection(NBEdge::Connection nbCon, bool selectAfterCreation=false)
adds a connection
NBNode * getToNode() const
Returns the destination node of the edge.
const PositionVector & getShape() const
returns the shape of the lane
void deselect(GUIGlID id)
Deselects the object with the given id.
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
double length2D() const
Returns the length.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
void updateGeometry()
Update the boundary of the junction.
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.
void moveEntireShape(const PositionVector &oldShape, const Position &offset)
move entire shape without commiting change
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
void setPreferredVehicleClass(SVCPermissions permissions, int lane=-1)
set preferred Vehicle Class
const PositionVector & getGeometry() const
Returns the geometry of the edge.
double getFinalLength() const
get length that will be assigned to the lanes in the final network
double contPos
custom position for internal junction on this connection
A storage for options typed value containers)
void updateJunctionPosition(GNEJunction *junction, const Position &origPos)
update edge geometry after junction move
void updateGeometry()
update pre-computed geometry information
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
std::string myType
The type of the edge.
void renameEdge(GNEEdge *edge, const std::string &newID)
updates the map and reserves new id
bool isValid(SumoXMLAttr key, const std::string &value)
void removeEdgeOfAdditionalParents(GNEUndoList *undoList, bool allowEmpty)
remove Edge of Additional Parent
void declareConnectionsAsLoaded(EdgeBuildingStep step=LANES2LANES_USER)
declares connections as fully loaded. This is needed to avoid recomputing connections if an edge has ...
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge's lanes' lateral offset is computed.
void removeExplicitTurnaround(std::string id)
remove edge id from the list of explicit turnarounds
void commitShapeChange(const PositionVector &oldShape, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of changeShapeGeometry(...)
LaneVector myLanes
vectgor with the lanes of this edge
std::vector< GNEAdditional * > myAdditionalChilds
list of Additional Childs of this NetElement
SumoXMLTag getTag() const
get XML Tag assigned to this object
GUIVisualizationSettings * getVisualisationSettings() const
get visualitation settings
void removeConnection(NBEdge::Connection nbCon)
removes a connection
bool hasLaneSpecificWidth() const
whether lanes differ in width
void updateLinkState()
recompute cached myLinkState
static const std::string GUESSED
feature has been reguessed (may still be unchanged be we can't tell (yet)
last coordinate of edge shape
void setEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end
void push_back_noDoublePos(const Position &p)
insert in back a non double position
static const RGBColor selectionColor
NBEdge & myNBEdge
the underlying NBEdge
void mul(double val)
Multiplies both positions with the given value.
NBEdge * getNBEdge()
returns the internal NBEdge
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
std::string getAttributeForSelection(SumoXMLAttr key) const
method for getting the attribute in the context of object selection
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
void add(double xoff, double yoff, double zoff)
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getStreetName() const
Returns the street name of this edge.
GUISelectedStorage gSelected
A global holder of selected objects.
const std::vector< Connection > & getConnections() const
Returns the connections.
void resetEndpoint(const Position &pos, GNEUndoList *undoList)
restores the endpoint to the junction position at the appropriate end
void changeEdgeEndpoints(GNEEdge *edge, const std::string &newSourceID, const std::string &newDestID)
modifies endpoins of the given edge
NBEdge * getTurnDestination(bool possibleDestination=false) const
int removeClosest(const Position &p)
removes the point closest to p and return the removal index
GNEViewNet * getViewNet() const
get view net
bool wasSplit()
whether this edge was created from a split
static PositionVector bezierControlPoints(const PositionVector &begShape, const PositionVector &endShape, bool isTurnaround, double extrapolateBeg, double extrapolateEnd, bool &ok, NBNode *recordError=0, double straightThresh=DEG2RAD(5))
get bezier control points
Position getSplitPos(const Position &clickPos)
bool unreferenced()
check if object ins't referenced
friend class GNEChange_Lane
Friend class.
static PositionVector parseShapeReporting(const std::string &shpdef, const std::string &objecttype, const char *objectid, bool &ok, bool allowEmpty, bool report=true)
Builds a PositionVector from a string representation, reporting occured errors.
void setLaneWidth(int lane, double width)
set lane specific width (negative lane implies set for all lanes)
double beginEndAngle() const
returns the angle in radians of the line connecting the first and the last position ...
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
void bezier(int npts, double b[], int cpts, double p[])
NBNode * getFromNode() const
Returns the origin node of the edge.