Eclipse SUMO - Simulation of Urban MObility
|
#include <NBAlgorithms.h>
Data Structures | |
class | crossing_by_junction_angle_sorter |
Sorts crossings by minimum clockwise clockwise edge angle. Use the ordering found in myAllEdges of the given node. More... | |
class | edge_by_junction_angle_sorter |
Sorts incoming and outgoing edges clockwise around the given node. More... | |
Static Public Member Functions | |
static void | sortNodesEdges (NBNodeCont &nc, bool useNodeShape=false) |
Sorts a node's edges clockwise regarding driving direction. | |
static void | swapWhenReversed (const NBNode *const n, const std::vector< NBEdge * >::iterator &i1, const std::vector< NBEdge * >::iterator &i2) |
Assures correct order for same-angle opposite-direction edges. | |
Definition at line 115 of file NBAlgorithms.h.
|
static |
Sorts a node's edges clockwise regarding driving direction.
[in] | nc | The container of nodes to loop along |
[in] | useNodeShape | Whether to sort based on the node shape (instead of only the edge angle) |
Definition at line 229 of file NBAlgorithms.cpp.
References NBNodeCont::begin(), and NBNodeCont::end().
Referenced by NBNetBuilder::compute(), and GNENet::initJunctionsAndEdges().
|
static |
Assures correct order for same-angle opposite-direction edges.
[in] | n | The currently processed node |
[in] | i1 | Pointer to first edge |
[in] | i2 | Pointer to second edge |
Definition at line 237 of file NBAlgorithms.cpp.
References NBEdge::getToNode(), NBEdge::isTurningDirectionAt(), and std::swap().
Referenced by NBNode::sortEdges().