81 if (crossing->unreferenced()) {
83 if (
myNet->getAttributeCarriers()->getCrossings().count(crossing) > 0) {
84 myNet->getAttributeCarriers()->deleteCrossing(crossing);
91 walkingArea->decRef();
92 if (walkingArea->unreferenced()) {
94 if (
myNet->getAttributeCarriers()->getWalkingAreas().count(walkingArea) > 0) {
95 myNet->getAttributeCarriers()->deleteWalkingArea(walkingArea);
158 const auto& modes =
myNet->getViewNet()->getEditModes();
159 const auto& viewParent =
myNet->getViewNet()->getViewParent();
160 const auto& inspectedElements =
myNet->getViewNet()->getInspectedElements();
162 if (inspectedElements.isInspectingSingleElement()) {
163 const auto inspectedAC = inspectedElements.getFirstAC();
168 }
else if ((inspectedAC->getTagProperty()->getTag() ==
SUMO_TAG_EDGE) &&
171 }
else if ((inspectedAC->getTagProperty()->getTag() ==
SUMO_TAG_LANE) &&
175 }
else if (modes.isCurrentSupermodeNetwork()) {
177 if (viewParent->getCreateEdgeFrame()->getJunctionSource()) {
178 return viewParent->getCreateEdgeFrame()->getJunctionSource() ==
this;
180 return myNet->getViewNet()->getViewObjectsSelector().getJunctionFront() ==
this;
183 viewParent->getTLSEditorFrame()->getTLSJunction()->isJoiningJunctions()) {
184 for (
const auto&
id : viewParent->getTLSEditorFrame()->getTLSJunction()->getSelectedJunctionIDs()) {
190 }
else if (modes.isCurrentSupermodeDemand()) {
194 planCreator = viewParent->getPersonFrame()->getPlanCreator();
196 planCreator = viewParent->getPersonPlanFrame()->getPlanCreator();
198 planCreator = viewParent->getContainerFrame()->getPlanCreator();
200 planCreator = viewParent->getContainerPlanFrame()->getPlanCreator();
208 const auto& selectedJunctions = viewParent->getVehicleFrame()->getPathCreator()->getSelectedJunctions();
210 if ((selectedJunctions.size() > 0) && (selectedJunctions.front() ==
this)) {
223 const auto& modes =
myNet->getViewNet()->getEditModes();
224 const auto& viewParent =
myNet->getViewNet()->getViewParent();
225 const auto& inspectedElements =
myNet->getViewNet()->getInspectedElements();
227 if (inspectedElements.isInspectingSingleElement()) {
228 const auto inspectedAC = inspectedElements.getFirstAC();
230 if (inspectedAC->getTagProperty()->vehicleJunctions() &&
233 }
else if ((inspectedAC->getTagProperty()->getTag() ==
SUMO_TAG_EDGE) &&
236 }
else if ((inspectedAC->getTagProperty()->getTag() ==
SUMO_TAG_LANE) &&
240 }
else if (modes.isCurrentSupermodeNetwork()) {
242 if (viewParent->getCreateEdgeFrame()->getJunctionSource() &&
243 (viewParent->getCreateEdgeFrame()->getJunctionSource() !=
this)) {
244 return myNet->getViewNet()->getViewObjectsSelector().getJunctionFront() ==
this;
248 const auto movedJunction =
dynamic_cast<GNEJunction*
>(
myNet->getViewNet()->getMoveSingleElementValues().getMovedElement());
249 if (movedJunction && (movedJunction !=
this)) {
251 if (
myNBNode->getShape().area() < 4) {
253 const double junctionBubbleRadius =
myNet->getViewNet()->getVisualisationSettings().neteditSizeSettings.junctionBubbleRadius;
254 const double radiusTo =
getExaggeration(
myNet->getViewNet()->getVisualisationSettings()) * junctionBubbleRadius;
255 if (
myNBNode->getPosition().distanceSquaredTo2D(movedJunction->getPositionInView()) < (radiusTo * radiusTo)) {
261 }
else if (
myNBNode->getShape().around(movedJunction->getNBNode()->getPosition())) {
269 }
else if (modes.isCurrentSupermodeDemand()) {
273 planCreator = viewParent->getPersonFrame()->getPlanCreator();
275 planCreator = viewParent->getPersonPlanFrame()->getPlanCreator();
277 planCreator = viewParent->getContainerFrame()->getPlanCreator();
279 planCreator = viewParent->getContainerPlanFrame()->getPlanCreator();
287 const auto& selectedJunctions = viewParent->getVehicleFrame()->getPathCreator()->getSelectedJunctions();
289 if ((selectedJunctions.size() > 1) && (selectedJunctions.back() ==
this)) {
301 if (
myNet->getViewNet()->getViewParent()->getCrossingFrame()->getEdgesSelector()->getCurrentJunction() ==
this) {
305 if (
myNet->getViewNet()->getPopup()) {
306 return myNet->getViewNet()->getPopup()->getGLObject() ==
this;
315 const auto& modes =
myNet->getViewNet()->getEditModes();
316 const auto& viewParent =
myNet->getViewNet()->getViewParent();
317 const auto& viewObjectsSelector =
myNet->getViewNet()->getViewObjectsSelector();
318 if (viewObjectsSelector.getJunctionFront() !=
this) {
321 if (modes.isCurrentSupermodeNetwork()) {
323 return (viewObjectsSelector.getJunctionFront() ==
this);
325 }
else if (modes.isCurrentSupermodeDemand()) {
329 planSelector = viewParent->getPersonFrame()->getPlanSelector();
331 planSelector = viewParent->getPersonPlanFrame()->getPlanSelector();
333 planSelector = viewParent->getContainerFrame()->getPlanSelector();
335 planSelector = viewParent->getContainerPlanFrame()->getPlanSelector();
339 return (viewObjectsSelector.getAttributeCarrierFront() == viewObjectsSelector.getJunctionFront());
342 const auto& vehicleTemplate = viewParent->getVehicleFrame()->getVehicleTagSelector()->getCurrentTemplateAC();
344 if (vehicleTemplate && vehicleTemplate->getTagProperty()->vehicleJunctions()) {
345 return (viewObjectsSelector.getAttributeCarrierFront() == viewObjectsSelector.getJunctionFront());
357 const auto& editModes =
myNet->getViewNet()->getEditModes();
376 const auto& editModes =
myNet->getViewNet()->getEditModes();
389 const auto& editModes =
myNet->getViewNet()->getEditModes();
391 if (!
myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
394 const GNENetworkElement* editedNetworkElement =
myNet->getViewNet()->getEditNetworkElementShapes().getEditedNetworkElement();
395 if (editedNetworkElement) {
396 return editedNetworkElement ==
this;
399 return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() ==
this;
410 if (
myNet->getNetBuilder()->haveNetworkCrossings()) {
411 if (rebuildNBNodeCrossings) {
414 myNBNode->buildCrossingsAndWalkingAreas();
418 std::vector<GNECrossing*> retrievedCrossings;
420 for (
const auto& crossing :
myNBNode->getCrossingsIncludingInvalid()) {
423 retrievedCrossings.push_back(retrievedGNECrossing);
434 retrievedGNECrossing->
incRef();
441 if (crossing->isAttributeCarrierSelected()) {
442 crossing->unselectAttributeCarrier();
445 if (
myNet->getViewNet()) {
446 myNet->getViewNet()->getInspectedElements().uninspectAC(crossing);
449 myNet->removeGLObjectFromGrid(crossing);
451 myNet->getAttributeCarriers()->deleteCrossing(crossing);
452 if (crossing->unreferenced()) {
477 FXMenuPane* TLSOperations =
new FXMenuPane(ret);
484 if (
myNBNode->getControllingTLS().size() > 0) {
486 mcAddJoinedTLS->disable();
491 mcAddJoinedTLS->enable();
493 mcAddJoinedTLS->disable();
509 if (
myNet->getViewNet()->getEditModes().isCurrentSupermodeNetwork()) {
510 const int numSelectedJunctions =
myNet->getAttributeCarriers()->getNumberOfSelectedJunctions();
511 const int numEndpoints = (int)
myNBNode->getEndPoints().size();
535 const std::string menuEntryInfo =
TLF(
"Convert to roundabout (using junction attribute radius %)",
toString(radius));
540 mcRoundabout->disable();
549 mcCustomShape->disable();
550 mcClearConnections->disable();
551 mcResetConnections->disable();
554 if (handlingSelection) {
555 mcResetCustomShape->setText(
TL(
"Reset junction shapes"));
559 mcClearConnections->disable();
562 if (
myNBNode->getShape().size() == 0) {
563 mcResetCustomShape->disable();
566 if ((
myNBNode->getIncomingEdges().size() == 2) && (
myNBNode->getOutgoingEdges().size() == 2)) {
569 std::string reason =
TL(
"wrong edit mode");
570 if (invalidMode || !
myNBNode->checkIsRemovableReporting(reason)) {
571 mcReplaceByGeometryPoint->setText(mcReplaceByGeometryPoint->getText() +
" (" + reason.c_str() +
")");
572 mcReplaceByGeometryPoint->disable();
575 if (numEndpoints == 1) {
576 mcSplitJunction->disable();
577 mcSplitJunctionAndReconnect->disable();
601 myNet->removeGLObjectFromGrid(
this);
608 if (
myNBNode->getShape().size() > 0) {
614 for (
const auto& connection : edge->getGNEConnections()) {
615 const auto boundary = connection->getCenteringBoundary();
616 if (boundary.isInitialised()) {
622 const auto boundary = crossing->getCenteringBoundary();
623 if (boundary.isInitialised()) {
628 const auto boundary = walkingArea->getCenteringBoundary();
629 if (boundary.isInitialised()) {
638 myNet->addGLObjectIntoGrid(
this);
657 if (junctionExaggeration > 0) {
661 const double junctionShapeArea =
myNBNode->getShape().area();
663 const bool drawBubble =
drawAsBubble(s, junctionShapeArea);
690 const GNENetworkElement* editedNetworkElement =
myNet->getViewNet()->getEditNetworkElementShapes().getEditedNetworkElement();
691 if (editedNetworkElement && (editedNetworkElement ==
this)) {
701 if (junctionShapeArea >= 4) {
722 myNet->deleteJunction(
this,
myNet->getViewNet()->getUndoList());
739std::vector<GNEJunction*>
742 std::set<GNEJunction*> junctions;
744 junctions.insert(incomingEdge->getFromJunction());
747 junctions.insert(outgoingEdge->getToJunction());
749 return std::vector<GNEJunction*>(junctions.begin(), junctions.end());
810const std::vector<GNEEdge*>&
816const std::vector<GNEEdge*>&
822const std::vector<GNECrossing*>&
828const std::vector<GNEWalkingArea*>&
834std::vector<GNEConnection*>
836 std::vector<GNEConnection*> connections;
838 for (
const auto& connection : incomingEdge->getGNEConnections()) {
839 connections.push_back(connection);
873 myNet->requireRecompute();
882 assert(undoList != 0);
886 for (EdgeVector::iterator it = incoming.begin(); it != incoming.end(); it++) {
887 GNEEdge* srcEdge =
myNet->getAttributeCarriers()->retrieveEdge((*it)->getID());
906 std::vector<NBEdge::Connection> connections = srcNBE->
getConnections();
908 for (std::vector<NBEdge::Connection>::reverse_iterator con_it = connections.rbegin(); con_it != connections.rend(); con_it++) {
909 if (lane >= 0 && (*con_it).fromLane != lane) {
912 bool hasTurn = con_it->toEdge == turnEdge;
917 myNet->addExplicitTurnaround(srcNBE->
getID());
921 std::vector<NBConnection> removeConnections;
923 removeConnections.push_back(
NBConnection(srcNBE, con.fromLane, con.toEdge, con.toLane));
933 std::vector<NBConnection> removeConnections;
935 GNEEdge* srcEdge =
myNet->getAttributeCarriers()->retrieveEdge(srcNBE->getID());
936 std::vector<NBEdge::Connection> connections = srcNBE->getConnections();
937 for (std::vector<NBEdge::Connection>::reverse_iterator con_it = connections.rbegin(); con_it != connections.rend(); con_it++) {
938 if ((*con_it).toEdge == destNBE) {
939 if (lane >= 0 && (*con_it).toLane != lane) {
942 bool hasTurn = srcNBE->getTurnDestination() == destNBE;
947 myNet->addExplicitTurnaround(srcNBE->getID());
949 removeConnections.push_back(
NBConnection(srcNBE, (*con_it).fromLane, destNBE, (*con_it).toLane));
961 if (connections.size() > 0) {
962 const std::set<NBTrafficLightDefinition*> coypOfTls =
myNBNode->getControllingTLS();
963 for (
const auto&
TLS : coypOfTls) {
966 if (tlDef !=
nullptr) {
967 std::string newID = tlDef->
getID();
974 undoList->
add(
new GNEChange_TLS(
this, replacementDef,
true,
false, newID),
true);
976 const std::vector<NBNode*> copyOfNodes = tlDef->
getNodes();
977 for (
const auto& node : copyOfNodes) {
978 GNEJunction* sharing =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
980 undoList->
add(
new GNEChange_TLS(sharing, replacementDef,
true,
false, newID),
true);
998 const std::set<NBTrafficLightDefinition*> coypOfTls =
myNBNode->getControllingTLS();
999 for (
const auto&
TLS : coypOfTls) {
1002 if (tlDef !=
nullptr) {
1003 std::string newID = tlDef->
getID();
1006 for (
int i = 0; i < (int)which->
getChildLanes().size(); ++i) {
1010 undoList->
add(
new GNEChange_TLS(
this, replacementDef,
true,
false, newID),
true);
1012 const std::vector<NBNode*> copyOfNodes = tlDef->
getNodes();
1013 for (
const auto& node : copyOfNodes) {
1014 GNEJunction* sharing =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1016 undoList->
add(
new GNEChange_TLS(sharing, replacementDef,
true,
false, newID),
true);
1026 for (EdgeVector::iterator it = incoming.begin(); it != incoming.end(); it++) {
1028 GNEEdge* srcEdge =
myNet->getAttributeCarriers()->retrieveEdge(srcNBE->
getID());
1038 const std::set<NBTrafficLightDefinition*> coypOfTls =
myNBNode->getControllingTLS();
1039 for (
const auto&
TLS : coypOfTls) {
1041 if (tlDef !=
nullptr) {
1043 const std::vector<NBNode*> copyOfNodes = tlDef->
getNodes();
1046 myNet->getNetBuilder()->setHaveNetworkCrossings(
true);
1048 for (
const auto& node : copyOfNodes) {
1049 GNEJunction* sharing =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1050 if (sharing !=
this) {
1056 std::string newID = tlDef->
getID();
1061 replacementDef = repl;
1078 replacementDef = repl;
1089 undoList->
add(
new GNEChange_TLS(
this, replacementDef,
true,
false, newID),
true);
1091 for (
const auto& node : copyOfNodes) {
1092 GNEJunction* sharing =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1093 if (sharing !=
this) {
1103 undoList->
add(
new GNEChange_TLS(sharing, replacementDef,
true,
false, newID),
true);
1115 for (
const auto& crossing : copyOfGNECrossings) {
1117 EdgeSet edgeSet(crossing->getCrossingEdges().begin(), crossing->getCrossingEdges().end());
1119 if (edgeSet.count(edge->
getNBEdge()) == 1) {
1121 if ((crossing->getCrossingEdges().size() == 1) && (crossing->getCrossingEdges().front() == edge->
getNBEdge())) {
1122 myNet->deleteCrossing(crossing, undoList);
1126 edges.erase(std::find(edges.begin(), edges.end(), edge->
getID()));
1145 if (crossing->getCrossingEdges() == NBNodeCrossing->
edges) {
1149 if (createIfNoExist) {
1155 myNet->addGLObjectIntoGrid(createdGNECrossing);
1157 myNet->getAttributeCarriers()->insertCrossing(createdGNECrossing);
1158 return createdGNECrossing;
1170 if (walkingArea->getID() == NBNodeWalkingAreaID) {
1174 if (createIfNoExist) {
1180 myNet->addGLObjectIntoGrid(createdGNEWalkingArea);
1182 myNet->getAttributeCarriers()->insertWalkingArea(createdGNEWalkingArea);
1183 return createdGNEWalkingArea;
1194 for (
const auto& j : i->getGNEConnections()) {
1195 j->markConnectionGeometryDeprecated();
1197 if (includingNeighbours) {
1198 i->getFromJunction()->markConnectionsDeprecated(
false);
1214 const std::set<NBTrafficLightDefinition*> copyOfTls =
myNBNode->getControllingTLS();
1215 for (
const auto&
TLS : copyOfTls) {
1223 }
else if (
getNBNode()->isTLControlled()) {
1226 const std::set<NBTrafficLightDefinition*> copyOfTls =
myNBNode->getControllingTLS();
1227 for (
const auto&
TLS : copyOfTls) {
1229 const std::vector<NBNode*> copyOfNodes =
TLS->getNodes();
1230 for (
const auto& node : copyOfNodes) {
1231 GNEJunction* sharing =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1250 walkingArea->decRef();
1252 if (walkingArea->isAttributeCarrierSelected()) {
1253 walkingArea->unselectAttributeCarrier();
1256 myNet->getViewNet()->getInspectedElements().uninspectAC(walkingArea);
1258 myNet->removeGLObjectFromGrid(walkingArea);
1260 myNet->getAttributeCarriers()->deleteWalkingArea(walkingArea);
1261 if (walkingArea->unreferenced()) {
1274 for (
const auto& walkingArea :
myNBNode->getWalkingAreas()) {
1278 retrievedGNEWalkingArea->
incRef();
1356 for (
const auto& j : i->getGNEConnections()) {
1357 if (j->getNBEdgeConnection().keepClear) {
1415 bool alreadyAsked =
false;
1423 b.add(edge->getNBEdge()->getGeometry().back());
1426 b.add(edge->getNBEdge()->getGeometry().front());
1428 newPosition = b.getCenter();
1431 myNet->getViewNet()->updateObjectsInPosition(newPosition);
1432 for (
const auto& junction :
myNet->getViewNet()->getViewObjectsSelector().getJunctions()) {
1434 if ((junctionToMerge ==
nullptr) && (junction !=
this) && (junction->getPositionInView().distanceTo2D(newPosition) < POSITION_EPS) &&
1435 myNet->getViewNet()->askMergeJunctions(
this, junction, alreadyAsked)) {
1436 junctionToMerge = junction;
1440 for (
const auto& junction :
myNet->getViewNet()->getViewObjectsSelector().getMergingJunctions()) {
1442 if ((junctionToMerge ==
nullptr) && (junction !=
this) &&
myNet->getViewNet()->askMergeJunctions(
this, junction, alreadyAsked)) {
1443 junctionToMerge = junction;
1447 if (junctionToMerge) {
1448 myNet->mergeJunctions(
this, junctionToMerge, undoList);
1451 undoList->
begin(
this,
TL(
"change junction position"));
1457 const bool moveOnlyCenter =
myNet->getViewNet()->getViewParent()->getMoveFrame()->getNetworkMoveOptions()->getMoveOnlyJunctionCenter();
1461 const Position newEnd = edge->getNBEdge()->getGeometry().back() + delta;
1465 const Position newStart = edge->getNBEdge()->getGeometry().front() + delta;
1474 undoList->
begin(
this,
TL(
"change keepClear for whole junction"));
1476 for (
const auto& junction : incomingEdge->getGNEConnections()) {
1490 const std::set<NBTrafficLightDefinition*> copyOfTls =
myNBNode->getControllingTLS();
1491 for (
const auto&
TLS : copyOfTls) {
1493 if (oldLoaded !=
nullptr) {
1504 std::vector<NBNode*> nodes =
TLS->getNodes();
1505 for (
const auto& node : nodes) {
1506 GNEJunction* junction =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1518 const std::set<NBTrafficLightDefinition*> copyOfTls =
myNBNode->getControllingTLS();
1519 for (
const auto& oldTLS : copyOfTls) {
1520 std::vector<NBNode*> copyOfNodes = oldTLS->getNodes();
1524 for (
const auto& node : copyOfNodes) {
1525 GNEJunction* oldJunction =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1528 for (
const auto& node : copyOfNodes) {
1529 GNEJunction* oldJunction =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1538 const std::set<NBTrafficLightDefinition*> copyOfTls =
myNBNode->getControllingTLS();
1539 assert(copyOfTls.size() > 0);
1542 const bool currentIsSingle = currentTLS->
getNodes().size() == 1;
1543 const bool currentIsLoaded =
dynamic_cast<NBLoadedSUMOTLDef*
>(currentTLS) !=
nullptr;
1544 if (currentIsLoaded) {
1549 for (
const auto&
TLS : copyOfTls) {
1554 const std::map<std::string, NBTrafficLightDefinition*> programs = tlCont.
getPrograms(
value);
1555 if (programs.size() > 0) {
1556 for (
const auto& TLSProgram : programs) {
1558 if (
dynamic_cast<NBOwnTLDef*
>(oldTLS) !=
nullptr) {
1566 newTLSJoined->
joinLogic(currentTLSCopy);
1573 std::vector<NBNode*> copyOfNodes = oldTLS->
getNodes();
1574 for (
const auto& node : copyOfNodes) {
1575 GNEJunction* oldJunction =
myNet->getAttributeCarriers()->retrieveJunction(node->getID());
1582 if (currentIsSingle && currentIsLoaded) {
1594 delete currentTLSCopy;
1613 if (
value.empty()) {
1657 if (incomingEdge->getGNEConnections().size() > 0) {
1675 return !
myNBNode->hasCustomShape();
1693 const auto& editModes =
myNet->getViewNet()->getEditModes();
1694 const auto& inspectedElements =
myNet->getViewNet()->getInspectedElements();
1696 if (junctionShapeArea < 4) {
1703 if (editModes.isCurrentSupermodeDemand() &&
1711 if (inspectedElements.isInspectingSingleElement()) {
1725 if (
myNet->getViewNet()->showJunctionAsBubbles()) {
1729 if (junctionShapeArea >= 4) {
1733 if (!editModes.isCurrentSupermodeNetwork()) {
1743 const double exaggeration)
const {
1753 glTranslated(
myNBNode->getPosition().x(),
myNBNode->getPosition().y(), 1.5);
1786 if (
myShapeEdited &&
myNet->getViewNet()->getEditModes().isCurrentSupermodeNetwork() &&
1795 if (exaggeration > 1) {
1807 myNet->getViewNet()->getNetworkViewOptions().editingElevation());
1815 if (
myNet->getViewNet()->getViewParent()->getMoveFrame()->getNetworkMoveOptions()->getMoveOnlyJunctionCenter()) {
1821 glTranslated(
myNBNode->getPosition().x(),
myNBNode->getPosition().y(), 1.7);
1837 glTranslated(pos.
x(), pos.
y(), 2.2);
1839 const double halfWidth = 32 / s.
scale;
1840 const double halfHeight = 64 / s.
scale;
1850 if (
myNet->getViewNet()->getNetworkViewOptions().editingElevation()) {
1853 glTranslated(
myNBNode->getPosition().x(),
myNBNode->getPosition().y(), 0.1);
1876 crossing->drawGL(s);
1880 walkingArea->drawGL(s);
1884 internalLanes->drawGL(s);
1888 for (
const auto& connection : incomingEdge->getGNEConnections()) {
1889 connection->drawGL(s);
1894 demandElement->drawGL(s);
1898 demandElement->drawGL(s);
1901 myNet->getNetworkPathManager()->drawJunctionPathElements(s,
this);
1902 myNet->getDemandPathManager()->drawJunctionPathElements(s,
this);
1903 myNet->getDataPathManager()->drawJunctionPathElements(s,
this);
1910 const double exaggeration,
const bool drawBubble)
const {
1925 exaggeration,
true);
1938 myNet->getAttributeCarriers()->updateJunctionID(
this,
value);
1945 myNet->getNetBuilder()->getEdgeCont().removeRoundabout(
myNBNode);
1966 myNBNode->invalidateIncomingConnections();
1969 i->clearGNEConnections();
1993 const std::set<NBTrafficLightDefinition*> copyOfTls =
myNBNode->getControllingTLS();
1994 for (
const auto&
TLS : copyOfTls) {
2016 myNet->getDemandPathManager()->getPathCalculator()->invalidatePathCalculator();
2022 switch (activeScheme) {
2072 return myNBNode->getPosition().z();
2082 if (edge->getGNEConnections().size() > 0) {
2108 std::set<GNEJunction*> affectedJunctions;
2109 std::set<GNEEdge*> affectedEdges;
2113 affectedJunctions.insert(edge->getFromJunction());
2114 affectedJunctions.insert(edge->getToJunction());
2116 for (
const auto& junctionSourceEdge : edge->getFromJunction()->getChildEdges()) {
2117 affectedEdges.insert(junctionSourceEdge);
2120 for (
const auto& junctionDestinationEdge : edge->getToJunction()->getChildEdges()) {
2121 affectedEdges.insert(junctionDestinationEdge);
2125 for (
const auto& affectedJunction : affectedJunctions) {
2126 affectedJunction->clearWalkingAreas();
2129 for (
const auto& affectedEdge : affectedEdges) {
2131 if (updateEdgeBoundaries) {
2132 affectedEdge->updateCenteringBoundary(
true);
2135 affectedEdge->updateGeometry();
2159 if (
myNet->getViewNet()->getEditModes().isCurrentSupermodeData()) {
2190 tlCont.
insert(tlDef, forceInsert);
2198 if (tlDef->
getNodes().size() == 1) {
2201 myNBNode->removeTrafficLight(tlDef);
@ NETWORK_DELETE
mode for deleting network elements
@ NETWORK_MOVE
mode for moving network elements
@ NETWORK_CREATE_EDGE
mode for creating new edges
@ NETWORK_TLS
mode for editing tls
@ NETWORK_CROSSING
Mode for editing crossing.
@ NETWORK_SELECT
mode for selecting network elements
@ NETWORK_CONNECT
mode for connecting lanes
@ DEMAND_PERSONPLAN
Mode for editing person plan.
@ DEMAND_CONTAINER
Mode for editing container.
@ DEMAND_PERSON
Mode for editing person.
@ DEMAND_VEHICLE
Mode for editing vehicles.
@ DEMAND_CONTAINERPLAN
Mode for editing container plan.
@ MID_GNE_JUNCTION_ADDTLS
Add TLS into junction.
@ MID_GNE_JUNCTION_RESET_EDGE_ENDPOINTS
reset edge endpoints
@ MID_GNE_JUNCTION_CLEAR_CONNECTIONS
clear junction's connections
@ MID_GNE_JUNCTION_SELECT_ROUNDABOUT
select all roundabout nodes and edges of the current roundabout
@ MID_GNE_JUNCTION_RESET_SHAPE
reset junction shape
@ MID_GNE_JUNCTION_RESET_CONNECTIONS
reset junction's connections
@ MID_GNE_JUNCTION_SPLIT
turn junction into multiple junctions
@ MID_GNE_JUNCTION_REPLACE
turn junction into geometry node
@ MID_GNE_JUNCTION_CONVERT_ROUNDABOUT
convert junction to roundabout
@ MID_GNE_JUNCTION_SPLIT_RECONNECT
turn junction into multiple junctions and reconnect them heuristically
@ MID_GNE_JUNCTION_EDIT_SHAPE
edit junction shape
@ MID_GNE_JUNCTION_ADDJOINTLS
Add join TLS into junctions.
GUIViewObjectsHandler gViewObjectsHandler
std::set< NBEdge * > EdgeSet
container for unique edges
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
const std::string invalid_return< std::string >::value
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_TRAFFIC_LIGHT
a traffic light
@ SUMO_TAG_EDGE
begin/end of the description of an edge
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
@ TRAFFIC_LIGHT_RIGHT_ON_RED
@ TRAFFIC_LIGHT_NOJUNCTION
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_TLLINKINDEX2
link: the index of the opposite direction link of a pedestrian crossing
@ SUMO_ATTR_FROM_JUNCTION
@ SUMO_ATTR_RADIUS
The turning radius at an intersection in m.
@ SUMO_ATTR_TLLAYOUT
node: the layout of the traffic light program
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_FRINGE
Fringe type of node.
@ GNE_ATTR_MODIFICATION_STATUS
whether a feature has been loaded,guessed,modified or approved
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
@ SUMO_ATTR_TLTYPE
node: the type of traffic light
@ GNE_ATTR_SHAPE_END
last coordinate of edge shape
@ SUMO_ATTR_TLID
link,node: the traffic light id responsible for this link
@ SUMO_ATTR_RIGHT_OF_WAY
How to compute right of way.
@ GNE_ATTR_SHAPE_START
first coordinate of edge shape
@ SUMO_ATTR_TLLINKINDEX
link: the index of the link within the traffic light
@ SUMO_ATTR_KEEP_CLEAR
Whether vehicles must keep the junction clear.
const unsigned char TLS[]
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
std::string fromJunction
from junction
std::string toJunction
to junction
static void drawFilledPoly(const PositionVector &v, bool close)
Draws a filled polygon described by the list of points.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void drawBoundary(const GUIVisualizationSettings &s, const Boundary &b)
Draw a boundary (used for debugging).
static void drawFilledCircleDetailled(const GUIVisualizationSettings::Detail d, const double radius)
Draws a filled circle around (0,0) depending of level of detail.
static void pushMatrix()
push matrix
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, const int align=0, double width=-1)
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048, const int align=0)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
double getCommonAttributeDouble(SumoXMLAttr key) const
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
static const std::string FALSE_STR
true value in string format(used for comparing boolean values in getAttribute(...))
static const std::string TRUE_STR
true value in string format (used for comparing boolean values in getAttribute(......
const std::string getID() const override
get ID (all Attribute Carriers have one)
static const std::string FEATURE_LOADED
feature is still unchanged after being loaded (implies approval)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
PositionVector getCommonAttributePositionVector(SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
static const std::string FEATURE_GUESSED
feature has been reguessed (may still be unchanged be we can't tell (yet)
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
Position getCommonAttributePosition(SumoXMLAttr key) const
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
GNENet * myNet
pointer to net
bool inGrid() const
check if this AC was inserted in grid
static const std::string FEATURE_MODIFIED
feature has been manually modified (implies approval)
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
std::string getCommonAttribute(SumoXMLAttr key) const
const GNETagProperties * myTagProperty
reference to tagProperty associated with this attribute carrier
bool myPossibleCandidate
flag to mark this element as possible candidate
bool mySpecialCandidate
flag to mark this element as special candidate
bool myTargetCandidate
flag to mark this element as target candidate
bool myConflictedCandidate
flag to mark this element as conflicted candidate
bool mySourceCandidate
flag to mark this element as source candidate
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void updateGeometry() override
update pre-computed geometry information
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement)
NBEdge * getNBEdge() const
returns the internal NBEdge
const GNEHierarchicalContainerChildren< GNEEdge * > & getChildEdges() const
get child edges
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const GNEHierarchicalContainerChildren< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
void removeTLSConnections(std::vector< NBConnection > &connections, GNEUndoList *undoList)
remove the given connections from all traffic light definitions of this junction
void markAsCreateEdgeSource()
marks as first junction in createEdge-mode
bool checkDrawFromContour() const override
check if draw from contour (green)
void addTrafficLight(NBTrafficLightDefinition *tlDef, bool forceInsert)
adds a traffic light
bool isAttributeEnabled(SumoXMLAttr key) const override
const std::vector< GNEEdge * > & getGNEIncomingEdges() const
Returns incoming GNEEdges.
void rebuildGNEWalkingAreas()
rebuilds WalkingAreas objects for this junction
void updateGeometryAfterNetbuild(bool rebuildNBNodeCrossings=false)
update pre-computed geometry information without modifying netbuild structures
bool myAmResponsible
whether we are responsible for deleting myNBNode
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
friend class GNEChange_TLS
Declare friend class.
TesselatedPolygon myTesselation
An object that stores the shape and its tesselation.
const std::vector< GNEWalkingArea * > & getGNEWalkingAreas() const
Returns GNEWalkingAreas.
bool checkDrawDeleteContourSmall() const override
check if draw delete contour small (pink/white)
void setResponsible(bool newVal)
set responsibility for deleting internal structures
Position getAttributePosition(SumoXMLAttr key) const override
bool myColorForMissingConnections
whether this junction probably should have some connections but doesn't
std::vector< const GNEInternalLane * > myInternalLanes
internal lanes related placed in this junction
GNEJunction(GNENet *net, NBNode *nbn, bool loaded=false)
Constructor.
void unMarkAsCreateEdgeSource()
removes mark as first junction in createEdge-mode
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
std::string getAttribute(SumoXMLAttr key) const override
void moveJunctionGeometry(const Position &pos, const bool updateEdgeBoundaries)
reposition the node at pos without updating GRID and informs the edges
bool checkDrawSelectContour() const override
check if draw select contour (blue)
GNEContour myCircleContour
variable used for draw circle contours
bool isAttributeComputed(SumoXMLAttr key) const override
bool isLogicValid()
whether this junction has a valid logic
void drawTLSIcon(const GUIVisualizationSettings &s) const
draw TLS icon
std::vector< GNEEdge * > myGNEOutgoingEdges
vector with the (child) outgoings GNEEdges vinculated with this junction
void updateGeometry() override
update pre-computed geometry information (including crossings)
bool checkDrawOverContour() const override
check if draw over contour (orange)
void selectTLS(bool selected)
notify the junction of being selected in tls-mode. (used to control drawing)
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const override
determines color value
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
void replaceIncomingConnections(GNEEdge *which, GNEEdge *by, GNEUndoList *undoList)
replace one edge by another in all tls connections
bool checkDrawMoveContour() const override
check if draw move contour (red)
GNEMoveElementJunction * myMoveElementJunction
move element junction
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
void removeOutgoingGNEEdge(GNEEdge *edge)
remove outgoing GNEEdge
void markAsModified(GNEUndoList *undoList)
prevent re-guessing connections at this junction
std::vector< GNECrossing * > myGNECrossings
the built crossing objects
void invalidateTLS(GNEUndoList *undoList, const NBConnection &deletedConnection=NBConnection::InvalidConnection, const NBConnection &addedConnection=NBConnection::InvalidConnection)
void clearWalkingAreas()
clear walking areas
void removeIncomingGNEEdge(GNEEdge *edge)
remove incoming GNEEdge
std::vector< GNEConnection * > getGNEConnections() const
Returns all GNEConnections vinculated with this junction.
GNEWalkingArea * retrieveGNEWalkingArea(const std::string &NBNodeWalkingAreaID, bool createIfNoExist=true)
get GNEWalkingArea if exist, and if not create it if create is enabled
void updateGLObject() override
update GLObject (geometry, ID, etc.)
GNECrossing * retrieveGNECrossing(NBNode::Crossing *NBNodeCrossing, bool createIfNoExist=true)
get GNECrossing if exist, and if not create it if create is enabled
std::vector< GNEEdge * > myGNEIncomingEdges
vector with the (child) incomings GNEEdges vinculated with this junction
Boundary myJunctionBoundary
edge boundary
void calculateJunctioncontour(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const bool drawBubble) const
calculate contour
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
friend class GNEMoveElementJunction
void addInternalLane(const GNEInternalLane *internalLane)
add internal lane
const PositionVector & getJunctionShape() const
void drawJunctionName(const GUIVisualizationSettings &s) const
draw junction name
void markConnectionsDeprecated(bool includingNeighbours)
mark connections as deprecated
bool checkDrawDeleteContour() const override
check if draw delete contour (pink/white)
void mirrorXLeftHand()
temporarily mirror coordinates in lefthand network to compute correct crossing geometries
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
Position getPositionInView() const
Returns position of hierarchical element in view.
void drawJunctionAsBubble(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration) const
draw junction as bubble
void removeInternalLane(const GNEInternalLane *internalLane)
remove internal lane
bool checkDrawToContour() const override
check if draw from contour (magenta)
bool isValid(SumoXMLAttr key, const std::string &value) override
bool myAmTLSSelected
whether this junction is selected in tls-mode
void removeConnectionsFrom(GNEEdge *edge, GNEUndoList *undoList, bool updateTLS, int lane=-1)
remove all connections from the given edge
void addIncomingGNEEdge(GNEEdge *edge)
add incoming GNEEdge
RGBColor setColor(const GUIVisualizationSettings &s, bool bubble) const
sets junction color depending on circumstances
bool myHasValidLogic
whether this junctions logic is valid
std::string myLogicStatus
modification status of the junction logic (all connections across this junction)
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
const std::vector< GNEEdge * > & getGNEOutgoingEdges() const
Returns incoming GNEEdges.
void removeEdgeFromCrossings(GNEEdge *edge, GNEUndoList *undoList)
removes the given edge from all pedestrian crossings
void drawJunctionChildren(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d) const
draw junction childs
bool drawAsBubble(const GUIVisualizationSettings &s, const double junctionShapeArea) const
check if draw junction as bubble
NBNode * getNBNode() const
Return net build node.
void drawJunctionCenter(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d) const
draw junction center (only in move mode)
void drawElevation(const GUIVisualizationSettings &s) const
draw elevation
NBNode * myNBNode
A reference to the represented junction.
Parameterised * getParameters() override
get parameters associated with this junction
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this junction
int * myDrawingToggle
drawing toggle (used to avoid double draws)
void checkMissingConnections()
compute whether this junction probably should have some connections but doesn't
std::vector< GNEJunction * > getJunctionNeighbours() const
return GNEJunction neighbours
double getAttributeDouble(SumoXMLAttr key) const override
void setJunctionType(const std::string &value, GNEUndoList *undoList)
set junction Type (using undo/redo)
void drawJunctionAsShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration) const
draw junction as bubble
double myExaggeration
exaggeration used in tesselation
~GNEJunction()
Destructor.
void setLogicValid(bool valid, GNEUndoList *undoList, const std::string &status=FEATURE_GUESSED)
std::vector< GNEWalkingArea * > myGNEWalkingAreas
the built walkingArea objects
void removeConnectionsTo(GNEEdge *edge, GNEUndoList *undoList, bool updateTLS, int lane=-1)
remove all connections to the given edge
bool myAmCreateEdgeSource
whether this junction is the first junction for a newly creatededge
void buildTLSOperations(GUISUMOAbstractView &parent, GUIGLObjectPopupMenu *ret, const int numSelectedJunctions)
build TLS operations contextual menu
void addOutgoingGNEEdge(GNEEdge *edge)
add outgoing GNEEdge
void rebuildGNECrossings(bool rebuildNBNodeCrossings=true)
rebuilds crossing objects for this junction
void deleteGLObject() override
delete element
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
removes a traffic light
A NBNetBuilder extended by visualisation and editing capabilities.
bool checkDrawingBoundarySelection() const
GNEContour myNetworkElementContour
network element contour
bool myShapeEdited
flag to check if element shape is being edited
GNENetworkElement(GNENet *net, const std::string &id, SumoXMLTag tag)
Constructor.
GUIGLObjectPopupMenu * getShapeEditedPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent, const PositionVector &shape)
get shape edited popup menu
const CommonXMLStructure::PlanParameters & getPlanParameteres() const
get plan parameters
bool markJunctions() const
check if mark junctions with dotted contours
void incRef(const std::string &debugMsg="")
Increase reference.
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
bool hasCommandGroup() const
Check if undoList has command group.
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void updateGeometry() override
update pre-computed geometry information
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
static void drawGeometryPoints(const GUIVisualizationSettings::Detail d, const PositionVector &shape, const RGBColor &color, const double radius, const double exaggeration, const bool editingElevation)
draw geometry points
static void drawGeometry(const GUIVisualizationSettings::Detail d, const GUIGeometry &geometry, const double width, double offset=0)
draw geometry
void updateGeometry(const PositionVector &shape)
update entire geometry
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.
void buildPopUpMenuCommonOptions(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, GUISUMOAbstractView *parent, const SumoXMLTag tag, const bool selected, bool addSeparator=true)
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
T getColor(const double value) const
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings junctionName
GUIVisualizationSizeSettings junctionSize
bool drawJunctionShape
whether the shape of the junction should be drawn
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
GUIVisualizationTextSettings junctionID
bool drawMovingGeometryPoint(const double exaggeration, const double radius) const
check if moving geometry point can be draw
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
double scale
information about a lane's width (temporary, used for a single view)
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
GUIColorer junctionColorer
The junction colorer.
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
double angle
The current view rotation angle.
NBEdge * getFrom() const
returns the from-edge (start of the connection)
int getFromLane() const
returns the from-lane
int getTLIndex() const
returns the index within the controlling tls or InvalidTLIndex if this link is unontrolled
static const int InvalidTlIndex
int getToLane() const
returns the to-lane
NBEdge * getTo() const
returns the to-edge (end of the connection)
static const NBConnection InvalidConnection
The representation of a single edge during network building.
const std::vector< Connection > & getConnections() const
Returns the connections.
const std::string & getID() const
bool isTurningDirectionAt(const NBEdge *const edge) const
Returns whether the given edge is the opposite direction to this edge.
NBEdge * getTurnDestination(bool possibleDestination=false) const
A loaded (complete) traffic light logic.
void setID(const std::string &newID)
resets the id
NBTrafficLightLogic * getLogic()
Returns the internal logic.
void removeConnection(const NBConnection &conn, bool reconstruct=true)
removes the given connection from the traffic light if recontruct=true, reconstructs the logic and in...
void joinLogic(NBTrafficLightDefinition *def)
join nodes and states from the given logic (append red state)
void addConnection(NBEdge *from, NBEdge *to, int fromLane, int toLane, int linkIndex, int linkIndex2, bool reconstruct=true)
Adds a connection and immediately informs the edges.
void guessMinMaxDuration()
heuristically add minDur and maxDur when switching from tlType fixed to actuated
void replaceRemoved(NBEdge *removed, int removedLane, NBEdge *by, int byLane, bool incoming)
Replaces a removed edge/lane.
A definition of a pedestrian crossing.
EdgeVector edges
The edges being crossed.
Represents a single node (junction) during network building.
static const double UNSPECIFIED_RADIUS
unspecified lane width
static bool isTrafficLight(SumoXMLNodeType type)
return whether the given type is a traffic light
A traffic light logics which must be computed (only nodes/edges are given).
void setLayout(TrafficLightLayout layout)
sets the layout for the generated signal plan
The base class for traffic light logic definitions.
const std::vector< NBNode * > & getNodes() const
Returns the list of controlled nodes.
const std::string & getProgramID() const
Returns the ProgramID.
TrafficLightType getType() const
get the algorithm type (static etc..)
virtual void setProgramID(const std::string &programID)
Sets the programID.
virtual void addNode(NBNode *node)
Adds a node to the traffic light logic.
SUMOTime getOffset()
Returns the offset.
A container for traffic light definitions and built programs.
const std::map< std::string, NBTrafficLightDefinition * > & getPrograms(const std::string &id) const
Returns all programs for the given tl-id.
bool insert(NBTrafficLightDefinition *logic, bool forceInsert=false)
Adds a logic definition to the dictionary.
void extract(NBTrafficLightDefinition *definition)
Extracts a traffic light definition from myDefinitions but keeps it in myExtracted for eventual * del...
A SUMO-compliant built logic for a traffic light.
static void computeTurnDirectionsForNode(NBNode *node, bool warn)
Computes turnaround destinations for all incoming edges of the given nodes (if any).
virtual void setID(const std::string &newID)
resets the id
const std::string & getID() const
Returns the id.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float).
static OptionsCont & getOptions()
Retrieves the options.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
double x() const
Returns the x-position.
double y() const
Returns the y-position.
void scaleRelative(double factor)
enlarges/shrinks the polygon by a factor based at the centroid
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
static StringBijection< SumoXMLNodeType > NodeTypes
node types
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types
static StringBijection< TrafficLightLayout > TrafficLightLayouts
traffic light layouts
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
static StringBijection< RightOfWay > RightOfWayValues
righ of way algorithms
static StringBijection< FringeType > FringeTypeValues
fringe types
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
static const RGBColor special
color for selected special candidate element (Usually selected using shift+click)
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element
static const RGBColor source
color for selected candidate source
RGBColor selectionColor
basic selection color
static const RGBColor editShapeColor
color for edited shapes (Junctions, crossings and connections)
static const double segmentWidthSmall
width of small dotted contour segments
static const double segmentWidth
width of dotted contour segments
static const double junctionGeometryPointRadius
moving junction geometry point radius
static const double junctionBubbleRadius
junction bubble radius
static const double edgeGeometryPointRadius
moving edge geometry point radius
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool show(const GUIGlObject *o) const
whether to show the text
double scaledSize(double scale, double constFactor=0.1) const
get scale size
A structure which describes a connection between edges or lanes.