69 myDrawingToggle(
new int),
70 myLogicStatus(loaded ? FEATURE_LOADED : FEATURE_GUESSED),
71 myHasValidLogic(loaded),
72myTesselation(nbn->getID(),
"",
RGBColor::MAGENTA, nbn->getShape(), false, true, 0) {
74 updateCenteringBoundary(
false);
84 if (crossing->unreferenced()) {
90 WRITE_DEBUG(
"Deleting unreferenced " + crossing->getTagStr() +
" '" + crossing->getID() +
"' in GNEJunction destructor");
96 walkingArea->decRef();
97 if (walkingArea->unreferenced()) {
103 WRITE_DEBUG(
"Deleting unreferenced " + walkingArea->getTagStr() +
" '" + walkingArea->getID() +
"' in GNEJunction destructor");
109 WRITE_DEBUG(
"Deleting NBNode of '" +
getID() +
"' in GNEJunction destructor");
153 if (inspectedElements.isInspectingSingleElement()) {
159 }
else if (modes.isCurrentSupermodeNetwork()) {
161 if (viewParent->getCreateEdgeFrame()->getJunctionSource()) {
162 return viewParent->getCreateEdgeFrame()->getJunctionSource() ==
this;
167 }
else if (modes.isCurrentSupermodeDemand()) {
171 planCreator = viewParent->getPersonFrame()->getPlanCreator();
173 planCreator = viewParent->getPersonPlanFrame()->getPlanCreator();
175 planCreator = viewParent->getContainerFrame()->getPlanCreator();
177 planCreator = viewParent->getContainerPlanFrame()->getPlanCreator();
185 const auto& selectedJunctions = viewParent->getVehicleFrame()->getPathCreator()->getSelectedJunctions();
187 if ((selectedJunctions.size() > 0) && (selectedJunctions.front() ==
this)) {
204 if (inspectedElements.isInspectingSingleElement()) {
206 if (inspectedElements.getFirstAC()->getTagProperty().vehicleJunctions() &&
210 }
else if (modes.isCurrentSupermodeNetwork()) {
212 if (viewParent->getCreateEdgeFrame()->getJunctionSource() &&
213 (viewParent->getCreateEdgeFrame()->getJunctionSource() !=
this)) {
219 if (movedJunction && (movedJunction !=
this)) {
239 }
else if (modes.isCurrentSupermodeDemand()) {
243 planCreator = viewParent->getPersonFrame()->getPlanCreator();
245 planCreator = viewParent->getPersonPlanFrame()->getPlanCreator();
247 planCreator = viewParent->getContainerFrame()->getPlanCreator();
249 planCreator = viewParent->getContainerPlanFrame()->getPlanCreator();
257 const auto& selectedJunctions = viewParent->getVehicleFrame()->getPathCreator()->getSelectedJunctions();
259 if ((selectedJunctions.size() > 1) && (selectedJunctions.back() ==
this)) {
281 if (viewObjectsSelector.getJunctionFront() !=
this) {
284 if (modes.isCurrentSupermodeNetwork()) {
286 return (viewObjectsSelector.getJunctionFront() ==
this);
288 }
else if (modes.isCurrentSupermodeDemand()) {
292 planSelector = viewParent->getPersonFrame()->getPlanSelector();
294 planSelector = viewParent->getPersonPlanFrame()->getPlanSelector();
296 planSelector = viewParent->getContainerFrame()->getPlanSelector();
298 planSelector = viewParent->getContainerPlanFrame()->getPlanSelector();
302 return (viewObjectsSelector.getAttributeCarrierFront() == viewObjectsSelector.getJunctionFront());
305 const auto& vehicleTemplate = viewParent->getVehicleFrame()->getVehicleTagSelector()->getCurrentTemplateAC();
307 if (vehicleTemplate && vehicleTemplate->getTagProperty().vehicleJunctions()) {
308 return (viewObjectsSelector.getAttributeCarrierFront() == viewObjectsSelector.getJunctionFront());
352 if (editedNetworkElement) {
353 return editedNetworkElement ==
this;
384 if (shape.size() > 2) {
390 if ((index != -1) && shape[index].distanceSquaredTo2D(clickedPosition) < (snap_radius * snap_radius)) {
392 shape.erase(shape.begin() + index);
407 if (rebuildNBNodeCrossings) {
414 std::vector<GNECrossing*> retrievedCrossings;
419 retrievedCrossings.push_back(retrievedGNECrossing);
430 retrievedGNECrossing->
incRef();
437 if (crossing->isAttributeCarrierSelected()) {
438 crossing->unselectAttributeCarrier();
446 if (crossing->unreferenced()) {
448 WRITE_DEBUG(
"Deleting unreferenced " + crossing->getTagStr() +
" in rebuildGNECrossings()");
473 FXMenuPane* TLSOperations =
new FXMenuPane(ret);
482 mcAddJoinedTLS->disable();
487 mcAddJoinedTLS->enable();
489 mcAddJoinedTLS->disable();
510 new FXMenuSeparator(ret);
538 const std::string menuEntryInfo =
TLF(
"Convert to roundabout (using junction attribute radius %)",
toString(radius));
543 mcRoundabout->disable();
552 mcCustomShape->disable();
553 mcClearConnections->disable();
554 mcResetConnections->disable();
557 if (handlingSelection) {
558 mcResetCustomShape->setText(
TL(
"Reset junction shapes"));
562 mcClearConnections->disable();
566 mcResetCustomShape->disable();
572 std::string reason =
TL(
"wrong edit mode");
574 mcReplaceByGeometryPoint->setText(mcReplaceByGeometryPoint->getText() +
" (" + reason.c_str() +
")");
575 mcReplaceByGeometryPoint->disable();
578 if (numEndpoints == 1) {
579 mcSplitJunction->disable();
580 mcSplitJunctionAndReconnect->disable();
617 for (
const auto& connection : edge->getGNEConnections()) {
618 const auto boundary = connection->getCenteringBoundary();
619 if (boundary.isInitialised()) {
625 const auto boundary = crossing->getCenteringBoundary();
626 if (boundary.isInitialised()) {
631 const auto boundary = walkingArea->getCenteringBoundary();
632 if (boundary.isInitialised()) {
660 if (junctionExaggeration > 0) {
666 const bool drawBubble =
drawAsBubble(s, junctionShapeArea);
691 if (editedNetworkElement && (editedNetworkElement ==
this)) {
697 if (junctionShapeArea >= 4) {
738std::vector<GNEJunction*>
741 std::set<GNEJunction*> junctions;
743 junctions.insert(incomingEdge->getFromJunction());
746 junctions.insert(outgoingEdge->getToJunction());
748 return std::vector<GNEJunction*>(junctions.begin(), junctions.end());
805const std::vector<GNEEdge*>&
811const std::vector<GNEEdge*>&
817const std::vector<GNECrossing*>&
823const std::vector<GNEWalkingArea*>&
829std::vector<GNEConnection*>
831 std::vector<GNEConnection*> connections;
833 for (
const auto& connection : incomingEdge->getGNEConnections()) {
834 connections.push_back(connection);
879 assert(undoList != 0);
883 for (EdgeVector::iterator it = incoming.begin(); it != incoming.end(); it++) {
903 std::vector<NBEdge::Connection> connections = srcNBE->
getConnections();
905 for (std::vector<NBEdge::Connection>::reverse_iterator con_it = connections.rbegin(); con_it != connections.rend(); con_it++) {
906 if (lane >= 0 && (*con_it).fromLane != lane) {
909 bool hasTurn = con_it->toEdge == turnEdge;
918 std::vector<NBConnection> removeConnections;
920 removeConnections.push_back(
NBConnection(srcNBE, con.fromLane, con.toEdge, con.toLane));
930 std::vector<NBConnection> removeConnections;
933 std::vector<NBEdge::Connection> connections = srcNBE->getConnections();
934 for (std::vector<NBEdge::Connection>::reverse_iterator con_it = connections.rbegin(); con_it != connections.rend(); con_it++) {
935 if ((*con_it).toEdge == destNBE) {
936 if (lane >= 0 && (*con_it).toLane != lane) {
939 bool hasTurn = srcNBE->getTurnDestination() == destNBE;
946 removeConnections.push_back(
NBConnection(srcNBE, (*con_it).fromLane, destNBE, (*con_it).toLane));
958 if (connections.size() > 0) {
960 for (
const auto&
TLS : coypOfTls) {
963 if (tlDef !=
nullptr) {
964 std::string newID = tlDef->
getID();
971 undoList->
add(
new GNEChange_TLS(
this, replacementDef,
true,
false, newID),
true);
973 const std::vector<NBNode*> copyOfNodes = tlDef->
getNodes();
974 for (
const auto& node : copyOfNodes) {
977 undoList->
add(
new GNEChange_TLS(sharing, replacementDef,
true,
false, newID),
true);
996 for (
const auto&
TLS : coypOfTls) {
999 if (tlDef !=
nullptr) {
1000 std::string newID = tlDef->
getID();
1003 for (
int i = 0; i < (int)which->
getLanes().size(); ++i) {
1007 undoList->
add(
new GNEChange_TLS(
this, replacementDef,
true,
false, newID),
true);
1009 const std::vector<NBNode*> copyOfNodes = tlDef->
getNodes();
1010 for (
const auto& node : copyOfNodes) {
1013 undoList->
add(
new GNEChange_TLS(sharing, replacementDef,
true,
false, newID),
true);
1023 for (EdgeVector::iterator it = incoming.begin(); it != incoming.end(); it++) {
1036 for (
const auto&
TLS : coypOfTls) {
1038 if (tlDef !=
nullptr) {
1040 const std::vector<NBNode*> copyOfNodes = tlDef->
getNodes();
1045 for (
const auto& node : copyOfNodes) {
1047 if (sharing !=
this) {
1053 std::string newID = tlDef->
getID();
1058 replacementDef = repl;
1075 replacementDef = repl;
1086 undoList->
add(
new GNEChange_TLS(
this, replacementDef,
true,
false, newID),
true);
1088 for (
const auto& node : copyOfNodes) {
1090 if (sharing !=
this) {
1100 undoList->
add(
new GNEChange_TLS(sharing, replacementDef,
true,
false, newID),
true);
1112 for (
const auto& crossing : copyOfGNECrossings) {
1114 EdgeSet edgeSet(crossing->getCrossingEdges().begin(), crossing->getCrossingEdges().end());
1116 if (edgeSet.count(edge->
getNBEdge()) == 1) {
1118 if ((crossing->getCrossingEdges().size() == 1) && (crossing->getCrossingEdges().front() == edge->
getNBEdge())) {
1122 std::vector<std::string> edges = GNEAttributeCarrier::parse<std::vector<std::string>>(crossing->getAttribute(
SUMO_ATTR_EDGES));
1123 edges.erase(std::find(edges.begin(), edges.end(), edge->
getID()));
1142 if (crossing->getCrossingEdges() == NBNodeCrossing->
edges) {
1146 if (createIfNoExist) {
1150 WRITE_DEBUG(
"Created " + createdGNECrossing->
getTagStr() +
" '" + createdGNECrossing->
getID() +
"' in retrieveGNECrossing()");
1157 return createdGNECrossing;
1169 if (walkingArea->getID() == NBNodeWalkingAreaID) {
1173 if (createIfNoExist) {
1177 WRITE_DEBUG(
"Created " + createdGNEWalkingArea->
getTagStr() +
" '" + createdGNEWalkingArea->
getID() +
"' in retrieveGNEWalkingArea()");
1184 return createdGNEWalkingArea;
1195 for (
const auto& j : i->getGNEConnections()) {
1196 j->markConnectionGeometryDeprecated();
1198 if (includingNeighbours) {
1199 i->getFromJunction()->markConnectionsDeprecated(
false);
1216 for (
const auto&
TLS : copyOfTls) {
1228 for (
const auto&
TLS : copyOfTls) {
1230 const std::vector<NBNode*> copyOfNodes =
TLS->getNodes();
1231 for (
const auto& node : copyOfNodes) {
1251 walkingArea->decRef();
1253 if (walkingArea->isAttributeCarrierSelected()) {
1254 walkingArea->unselectAttributeCarrier();
1262 if (walkingArea->unreferenced()) {
1264 WRITE_DEBUG(
"Deleting unreferenced " + walkingArea->getTagStr() +
" in rebuildGNEWalkingAreas()");
1281 retrievedGNEWalkingArea->
incRef();
1359 for (
const auto& j : i->getGNEConnections()) {
1360 if (j->getNBEdgeConnection().keepClear) {
1409 undoList->
begin(
this,
TL(
"change junction position"));
1418 const Position newEnd = edge->getNBEdge()->getGeometry().back() + delta;
1422 const Position newStart = edge->getNBEdge()->getGeometry().front() + delta;
1430 undoList->
begin(
this,
TL(
"change keepClear for whole junction"));
1432 for (
const auto& junction : incomingEdge->getGNEConnections()) {
1447 for (
const auto&
TLS : copyOfTls) {
1449 if (oldLoaded !=
nullptr) {
1461 for (
const auto& node : nodes) {
1475 for (
const auto& oldTLS : copyOfTls) {
1476 std::vector<NBNode*> copyOfNodes = oldTLS->getNodes();
1480 for (
const auto& node : copyOfNodes) {
1484 for (
const auto& node : copyOfNodes) {
1495 assert(copyOfTls.size() > 0);
1498 const bool currentIsSingle = currentTLS->
getNodes().size() == 1;
1499 const bool currentIsLoaded =
dynamic_cast<NBLoadedSUMOTLDef*
>(currentTLS) !=
nullptr;
1500 if (currentIsLoaded) {
1505 for (
const auto&
TLS : copyOfTls) {
1510 const std::map<std::string, NBTrafficLightDefinition*> programs = tlCont.
getPrograms(value);
1511 if (programs.size() > 0) {
1512 for (
const auto& TLSProgram : programs) {
1514 if (
dynamic_cast<NBOwnTLDef*
>(oldTLS) !=
nullptr) {
1522 newTLSJoined->
joinLogic(currentTLSCopy);
1529 std::vector<NBNode*> copyOfNodes = oldTLS->
getNodes();
1530 for (
const auto& node : copyOfNodes) {
1538 if (currentIsSingle && currentIsLoaded) {
1541 renamedLogic->
setID(value);
1543 renamedTLS->
setID(value);
1550 delete currentTLSCopy;
1569 return canParse<Position>(value);
1572 return canParse<PositionVector>(value);
1574 if (value.empty() || (value ==
"default")) {
1577 return canParse<double>(value) && ((parse<double>(value) >= 0) || (parse<double>(value) == -1));
1586 return canParse<bool>(value);
1611 if (incomingEdge->getGNEConnections().size() > 0) {
1656 if (junctionShapeArea < 4) {
1663 if (editModes.isCurrentSupermodeDemand() &&
1671 if (inspectedElements.isInspectingSingleElement()) {
1689 if (junctionShapeArea >= 4) {
1693 if (!editModes.isCurrentSupermodeNetwork()) {
1703 const double exaggeration)
const {
1755 if (exaggeration > 1) {
1780 glTranslated(pos.
x(), pos.
y(), 2.2);
1782 const double halfWidth = 32 / s.
scale;
1783 const double halfHeight = 64 / s.
scale;
1819 crossing->drawGL(s);
1823 walkingArea->drawGL(s);
1827 internalLanes->drawGL(s);
1831 for (
const auto& connection : incomingEdge->getGNEConnections()) {
1832 connection->drawGL(s);
1837 demandElement->drawGL(s);
1841 demandElement->drawGL(s);
1853 const double exaggeration,
const bool drawBubble)
const {
1868 exaggeration,
true);
1908 i->clearGNEConnections();
1923 if (value.empty() || (value ==
"default")) {
1933 for (
const auto&
TLS : copyOfTls) {
2014 switch (activeScheme) {
2074 if (edge->getGNEConnections().size() > 0) {
2100 std::set<GNEJunction*> affectedJunctions;
2101 std::set<GNEEdge*> affectedEdges;
2105 affectedJunctions.insert(edge->getFromJunction());
2106 affectedJunctions.insert(edge->getToJunction());
2108 for (
const auto& junctionSourceEdge : edge->getFromJunction()->getChildEdges()) {
2109 affectedEdges.insert(junctionSourceEdge);
2112 for (
const auto& junctionDestinationEdge : edge->getToJunction()->getChildEdges()) {
2113 affectedEdges.insert(junctionDestinationEdge);
2117 for (
const auto& affectedJunction : affectedJunctions) {
2118 affectedJunction->clearWalkingAreas();
2121 for (
const auto& affectedEdge : affectedEdges) {
2123 if (updateEdgeBoundaries) {
2124 affectedEdge->updateCenteringBoundary(
true);
2127 affectedEdge->updateGeometry();
2182 tlCont.
insert(tlDef, forceInsert);
2190 if (tlDef->
getNodes().size() == 1) {
@ 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
GUIIcon
An enumeration of icons used by the gui applications.
#define WRITE_GLDEBUG(msg)
std::set< NBEdge * > EdgeSet
container for unique edges
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ 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
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ 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.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
bool isInitialised() const
check if Boundary is Initialised
Boundary & grow(double by)
extends the boundary by the given amount
bool contains2D(const Boundary &b) const
return true if this boundary contains the given boundary (only X-Y)
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)
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
static const std::string True
true value in string format (used for comparing boolean values in getAttribute(......
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.
bool isCommonValid(SumoXMLAttr key, const std::string &value)
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
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)
static const std::string False
true value in string format(used for comparing boolean values in getAttribute(...))
std::string getCommonAttribute(SumoXMLAttr key) const
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 clearContour() const
void clear contour
void drawDottedContourGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const PositionVector &shape, const double radius, const double scale, const double lineWidth) const
draw dotted contour for geometry points
void calculateContourCircleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, double radius, const double layer, const double scale, const GUIGlObject *boundaryParent) const
calculate contour (circle elements)
void calculateContourClosedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double scale, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) const
calculate contours
bool drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
void calculateContourAllGeometryPoints(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double radius, const double scale, const bool calculatePosOverShape) const
calculate contour for all geometry points
GNEJunction * getCurrentJunction() const
get current junction
GNECrossingFrame::EdgesSelector * getEdgesSelector() const
get edge selector modul
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void updateGeometry()
update pre-computed geometry information
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement)
ProtectElements * getProtectElements() const
get protect elements modul
A road/street connecting two junctions (netedit-version)
NBEdge * getNBEdge() const
returns the internal NBEdge
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEEdge * > & getChildEdges() const
get child edges
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
void removeTLSConnections(std::vector< NBConnection > &connections, GNEUndoList *undoList)
remove the given connections from all traffic light definitions of this junction
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
void updateGLObject()
update GLObject (geometry, ID, etc.)
void markAsCreateEdgeSource()
marks as first junction in createEdge-mode
void addTrafficLight(NBTrafficLightDefinition *tlDef, bool forceInsert)
adds a traffic light
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
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
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.
std::string getAttribute(SumoXMLAttr key) const
void setResponsible(bool newVal)
set responsibility for deleting internal structures
void deleteGLObject()
delete element
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
void moveJunctionGeometry(const Position &pos, const bool updateEdgeBoundaries)
reposition the node at pos without updating GRID and informs the edges
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
GNEContour myCircleContour
variable used for draw circle contours
void updateGeometry()
update pre-computed geometry information (including crossings)
void drawTLSIcon(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d) const
draw TLS icon
bool isLogicValid()
whether this junction has a valid logic
std::vector< GNEEdge * > myGNEOutgoingEdges
vector with the (child) outgoings GNEEdges vinculated with this junction
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
determines color value
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
void selectTLS(bool selected)
notify the junction of being selected in tls-mode. (used to control drawing)
void replaceIncomingConnections(GNEEdge *which, GNEEdge *by, GNEUndoList *undoList)
replace one edge by another in all tls connections
void removeOutgoingGNEEdge(GNEEdge *edge)
remove outgoing GNEEdge
void markAsModified(GNEUndoList *undoList)
prevent re-guessing connections at this junction
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
std::vector< GNECrossing * > myGNECrossings
the built crossing objects
bool checkDrawMoveContour() const
check if draw move contour (red)
void invalidateTLS(GNEUndoList *undoList, const NBConnection &deletedConnection=NBConnection::InvalidConnection, const NBConnection &addedConnection=NBConnection::InvalidConnection)
PositionVector getAttributePositionVector(SumoXMLAttr key) const
void clearWalkingAreas()
clear walking areas
void removeIncomingGNEEdge(GNEEdge *edge)
remove incoming GNEEdge
std::vector< GNEConnection * > getGNEConnections() const
Returns all GNEConnections vinculated with this junction.
bool checkDrawSelectContour() const
check if draw select contour (blue)
GNEWalkingArea * retrieveGNEWalkingArea(const std::string &NBNodeWalkingAreaID, bool createIfNoExist=true)
get GNEWalkingArea if exist, and if not create it if create is enabled
GNEMoveOperation * getMoveOperation()
get move operation
bool checkDrawFromContour() const
check if draw from contour (green)
bool checkDrawOverContour() const
check if draw over contour (orange)
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 addInternalLane(const GNEInternalLane *internalLane)
add internal lane
const PositionVector & getJunctionShape() const
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
void drawJunctionName(const GUIVisualizationSettings &s) const
draw junction name
void markConnectionsDeprecated(bool includingNeighbours)
mark connections as deprecated
bool checkDrawToContour() const
check if draw from contour (magenta)
const Parameterised::Map & getACParametersMap() const
get parameters map
void mirrorXLeftHand()
temporarily mirror coordinates in lefthand network to compute correct crossing geometries
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show 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
bool isAttributeComputed(SumoXMLAttr key) const
void removeInternalLane(const GNEInternalLane *internalLane)
remove internal lane
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
bool isValid(SumoXMLAttr key, const std::string &value)
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)
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.
NBNode * myNBNode
A reference to the represented junction.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
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
void setJunctionType(const std::string &value, GNEUndoList *undoList)
set junction Type (using undo/redo)
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
void drawJunctionAsShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration) const
draw junction as bubble
double myExaggeration
exaggeration used in tesselation
void drawElevation(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d) const
draw elevation
~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
bool isAttributeEnabled(SumoXMLAttr key) const
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
removes a traffic light
GNEMoveOperation * calculateMoveShapeOperation(const GUIGlObject *obj, const PositionVector originalShape, const bool maintainShapeClosed)
calculate move shape operation
PositionVector shapeToUpdate
shape to update (edited in moveElement)
void insertWalkingArea(GNEWalkingArea *walkingArea)
insert walkingArea in container
const std::unordered_map< const GUIGlObject *, GNECrossing * > & getCrossings() const
get crossings
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
void updateJunctionID(GNEJunction *junction, const std::string &newID)
update junction ID in container
void insertCrossing(GNECrossing *crossing)
insert crossing in container
void deleteWalkingArea(GNEWalkingArea *walkingArea)
delete walkingArea from container
int getNumberOfSelectedJunctions() const
get number of selected junctions
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
const std::unordered_map< const GUIGlObject *, GNEWalkingArea * > & getWalkingAreas() const
get walkingAreas
void deleteCrossing(GNECrossing *crossing)
delete crossing from container
A NBNetBuilder extended by visualisation and editing capabilities.
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
NBNetBuilder * getNetBuilder() const
get net builder
void addGLObjectIntoGrid(GNEAttributeCarrier *AC)
add GL Object into net
GNEPathManager * getDataPathManager()
get data path manager
void removeGLObjectFromGrid(GNEAttributeCarrier *AC)
add GL Object into net
NBTrafficLightLogicCont & getTLLogicCont()
returns the tllcont of the underlying netbuilder
GNEPathManager * getDemandPathManager()
get demand path manager
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEPathManager * getNetworkPathManager()
get network path manager
void requireRecompute()
inform the net about the need for recomputation
void addExplicitTurnaround(std::string id)
add edge id to the list of explicit turnarounds
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
GNEViewNet * getViewNet() const
get view net
bool checkDrawingBoundarySelection() const
GNEContour myNetworkElementContour
network element contour
bool myShapeEdited
flag to check if element shape is being edited
GUIGLObjectPopupMenu * getShapeEditedPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent, const PositionVector &shape)
get shape edited popup menu
bool isShapeEdited() const
check if shape is being edited
void invalidatePathCalculator()
invalidate pathCalculator
PathCalculator * getPathCalculator()
obtain instance of PathCalculator
void drawJunctionPathElements(const GUIVisualizationSettings &s, const GNEJunction *junction) const
draw junction path elements
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 uninspectAC(GNEAttributeCarrier *AC)
uninspect AC
const GUIGlObject * getGUIGlObjectFront() const
get front GUIGLObject or a pointer to nullptr
GNEJunction * getJunctionFront() const
get front junction or a pointer to nullptr
bool isCurrentlyMovingElements() const
check if an element is being moved
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
GNEViewNetHelper::InspectedElements & getInspectedElements()
get inspected elements
const GNEViewNetHelper::MoveSingleElementModul & getMoveSingleElementValues() const
get move single element values
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
int getDrawingToggle() const
get draw toggle (used to avoid drawing junctions twice)
GNEViewParent * getViewParent() const
get the net object
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
GNEUndoList * getUndoList() const
get the undoList object
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
bool checkMergeJunctions()
try to merge moved junction with another junction in that spot return true if merging did take place
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
GNECrossingFrame * getCrossingFrame() const
get frame for NETWORK_CROSSING
GNEDeleteFrame * getDeleteFrame() const
get frame for delete elements
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void updateGeometry()
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.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
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
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
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.
const Boundary & getSelectionBoundary() const
get selection boundary
bool selectObject(const GUIGlObject *GLObject, const double layer, const bool checkDuplicated, const bool fullBoundary, const GNESegment *segment)
bool addMergingJunctions(const GNEJunction *junction)
add to merging junctions (used for marking junctions to merge)
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
void removeRoundabout(const NBNode *node)
remove roundabout that contains the given node
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.
bool haveNetworkCrossings()
notify about style of loaded network (Without Crossings)
void setHaveNetworkCrossings(bool value)
enable crossing in networks
NBEdgeCont & getEdgeCont()
A definition of a pedestrian crossing.
EdgeVector edges
The edges being crossed.
Represents a single node (junction) during network building.
RightOfWay getRightOfWay() const
Returns hint on how to compute right of way.
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node (The set of tls that control this node)
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
static const double UNSPECIFIED_RADIUS
unspecified lane width
FringeType getFringeType() const
Returns fringe type.
void buildCrossingsAndWalkingAreas()
build crossings, and walkingareas. Also removes invalid loaded crossings if wished
SumoXMLNodeType getType() const
Returns the type of this node.
bool isTrafficLight() const
void setRightOfWay(RightOfWay rightOfWay)
set method for computing right-of-way
void setCustomShape(const PositionVector &shape)
set the junction shape
void invalidateIncomingConnections(bool reallowSetting=false)
invalidate incoming connections
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
void mirrorX()
mirror coordinates along the x-axis
std::vector< std::pair< Position, std::string > > getEndPoints() const
return list of unique endpoint coordinates of all edges at this node
const std::vector< std::unique_ptr< Crossing > > & getCrossingsIncludingInvalid() const
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
bool hasCustomShape() const
return whether the shape was set by the user
std::vector< Crossing * > getCrossings() const
return this junctions pedestrian crossings
const std::string & getName() const
Returns intersection name.
void setRadius(double radius)
set the turning radius
void setName(const std::string &name)
set intersection name
const Position & getPosition() const
void removeTrafficLight(NBTrafficLightDefinition *tlDef)
Removes the given traffic light from this node.
const EdgeVector & getEdges() const
Returns all edges which participate in this node (Edges that start or end at this node)
const PositionVector & getShape() const
retrieve the junction shape
double getRadius() const
Returns the turning radius of this node.
bool isRoundabout() const
return whether this node is part of a roundabout
bool checkIsRemovableReporting(std::string &reason) const
check if node is removable and return reason if not
const std::vector< WalkingArea > & getWalkingAreas() const
return this junctions pedestrian walking areas
PositionVector myPoly
the (outer) shape of the junction
void setFringeType(FringeType fringeType)
set method for computing right-of-way
bool isTLControlled() const
Returns whether this node is controlled by any tls.
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.
static bool areParametersValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
std::map< std::string, std::string > Map
parameters map
void setParametersStr(const std::string ¶msString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
A point in 2D or 3D with translation and scaling methods.
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions)
double x() const
Returns the x-position.
double z() const
Returns the z-position.
double y() const
Returns the y-position.
PositionVector added(const Position &offset) const
void closePolygon()
ensures that the last position equals the first
int indexOfClosest(const Position &p, bool twoD=false) const
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
void scaleRelative(double factor)
enlarges/shrinks the polygon by a factor based at the centroid
double area() const
Returns the area (0 for non-closed)
bool around(const Position &p, double offset=0) const
Returns the information whether the position vector describes a polygon lying around the given point.
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
const PositionVector & getShape() const
Returns the shape of the polygon.
virtual void setShape(const PositionVector &shape)
Sets the shape of the polygon.
PositionVector & getShapeRef()
Return the exterior shape of the polygon.
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
const std::string & getString(const T key) const
bool hasString(const std::string &str) const
T get(const std::string &str) const
std::vector< GLPrimitive > myTesselation
id of the display list for the cached tesselation
void drawTesselation(const PositionVector &shape) const
perform the tesselation / drawing
NetworkEditMode networkEditMode
the current Network edit mode
bool isCurrentSupermodeData() const
@check if current supermode is Data
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
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
GNEMoveElement * getMovedElement() const
get moved element
bool editingElevation() const
check if we're editing elevation
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
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.