|
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) throw () | |
| Constructor. | |
| int | operator() (NBEdge *e1, NBEdge *e2) const throw () |
| Comparing operation. | |
Protected Member Functions | |
| SUMOReal | getDiff (const NBEdge *const e) const throw () |
| Computes the angle difference between the related and the given edge. | |
| SUMOReal | getEdgeAngleAt (const NBEdge *const e, const NBNode *const n) const throw () |
| Returns the given edge's angle at the given node. | |
Private Attributes | |
| SUMOReal | myAngle |
| The angle of the related edge at the given node. | |
| const NBNode *const | myNode |
| The related node. | |
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 158 of file NBContHelper.h.
| NBContHelper::edge_opposite_direction_sorter::edge_opposite_direction_sorter | ( | const NBEdge *const | e, |
| const NBNode *const | n | ||
| ) | throw () [inline, explicit] |
Constructor.
| [in] | e | The edge to which the sorting relates |
| [in] | n | The node to consider |
Definition at line 164 of file NBContHelper.h.
References getEdgeAngleAt(), and myAngle.
| SUMOReal NBContHelper::edge_opposite_direction_sorter::getDiff | ( | const NBEdge *const | e | ) | const throw () [inline, protected] |
Computes the angle difference between the related and the given edge.
| [in] | e | The edge to compare the angle difference of |
Definition at line 185 of file NBContHelper.h.
References getEdgeAngleAt(), GeomHelper::getMinAngleDiff(), myAngle, myNode, and SUMOReal.
Referenced by operator()().
| SUMOReal NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt | ( | const NBEdge *const | e, |
| const NBNode *const | n | ||
| ) | const throw () [inline, protected] |
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 196 of file NBContHelper.h.
Referenced by edge_opposite_direction_sorter(), and getDiff().
| int NBContHelper::edge_opposite_direction_sorter::operator() | ( | NBEdge * | e1, |
| NBEdge * | e2 | ||
| ) | const throw () [inline] |
Comparing operation.
| [in] | e1 | The first edge to compare |
| [in] | e2 | The second edge to compare |
Definition at line 174 of file NBContHelper.h.
SUMOReal NBContHelper::edge_opposite_direction_sorter::myAngle [private] |
The angle of the related edge at the given node.
Definition at line 206 of file NBContHelper.h.
Referenced by edge_opposite_direction_sorter(), and getDiff().
const NBNode* const NBContHelper::edge_opposite_direction_sorter::myNode [private] |