SUMO - Simulation of Urban MObility
|
#include <NBAlgorithms.h>
Data Structures | |
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 leftHand) |
Sorts a node's edges clockwise regarding driving direction. | |
Static Private Member Functions | |
static void | swapWhenReversed (const NBNode *const n, bool leftHand, const std::vector< NBEdge * >::iterator &i1, const std::vector< NBEdge * >::iterator &i2) |
Assures correct order for same-angle opposite-direction edges. |
Definition at line 105 of file NBAlgorithms.h.
void NBNodesEdgesSorter::sortNodesEdges | ( | NBNodeCont & | nc, |
bool | leftHand | ||
) | [static] |
Sorts a node's edges clockwise regarding driving direction.
[in] | nc | The container of nodes to loop along |
[in] | leftHand | Whether the network is left-handed |
Definition at line 130 of file NBAlgorithms.cpp.
References NBNodeCont::begin(), NBNodeCont::end(), NBNode::myAllEdges, and swapWhenReversed().
Referenced by NBNetBuilder::compute().
void NBNodesEdgesSorter::swapWhenReversed | ( | const NBNode *const | n, |
bool | leftHand, | ||
const std::vector< NBEdge * >::iterator & | i1, | ||
const std::vector< NBEdge * >::iterator & | i2 | ||
) | [static, private] |
Assures correct order for same-angle opposite-direction edges.
[in] | n | The currently processed node |
[in] | leftHand | Whether the network is left-handed |
[in] | i1 | Pointer to first edge |
[in] | i2 | Pointer to second edge |
Definition at line 155 of file NBAlgorithms.cpp.
References NBEdge::getToNode(), and NBEdge::isTurningDirectionAt().
Referenced by sortNodesEdges().