![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Class to sort edges by their angle in relation to the given edge. More...
#include <NBContHelper.h>
Public Member Functions | |
edge_opposite_direction_sorter (const NBEdge *const e, const NBNode *const n, bool regardPriority) | |
Constructor. More... | |
int | operator() (NBEdge *e1, NBEdge *e2) const |
Comparing operation. More... | |
Protected Member Functions | |
double | getDiff (const NBEdge *const e) const |
Computes the angle difference between the related and the given edge. More... | |
double | getEdgeAngleAt (const NBEdge *const e, const NBNode *const n) const |
Returns the given edge's angle at the given node. More... | |
Private Member Functions | |
edge_opposite_direction_sorter & | operator= (const edge_opposite_direction_sorter &s) |
Invalidated assignment operator. More... | |
Private Attributes | |
double | myAngle |
The angle of the related edge at the given node. More... | |
const NBEdge *const | myEdge |
the reference edge More... | |
const NBNode *const | myNode |
The related node. More... | |
bool | myRegardPriority |
Whether edge priority may override closer angles. More... | |
Class to sort edges by their angle in relation to the given edge.
The resulting sorted list has the edge in the most opposite direction to the given edge as her first entry.
Definition at line 141 of file NBContHelper.h.
|
inlineexplicit |
Constructor.
[in] | e | The edge to which the sorting relates |
[in] | n | The node to consider |
Definition at line 147 of file NBContHelper.h.
|
inlineprotected |
Computes the angle difference between the related and the given edge.
[in] | e | The edge to compare the angle difference of |
Definition at line 172 of file NBContHelper.h.
References GeomHelper::angleDiff().
|
inlineprotected |
Returns the given edge's angle at the given node.
Please note that we always consider the "outgoing direction".
[in] | e | The edge to which the sorting relates |
[in] | n | The node to consider |
Definition at line 182 of file NBContHelper.h.
References PositionVector::angleAt2D(), NBEdge::getFromNode(), and NBEdge::getGeometry().
|
inline |
Comparing operation.
[in] | e1 | The first edge to compare |
[in] | e2 | The second edge to compare |
Definition at line 159 of file NBContHelper.h.
References NBEdge::getPriority(), and NBContHelper::relative_outgoing_edge_sorter::myEdge.
|
private |
Invalidated assignment operator.
|
private |
The angle of the related edge at the given node.
Definition at line 199 of file NBContHelper.h.
|
private |
the reference edge
Definition at line 196 of file NBContHelper.h.
|
private |
The related node.
Definition at line 193 of file NBContHelper.h.
|
private |
Whether edge priority may override closer angles.
Definition at line 202 of file NBContHelper.h.