NBContHelper::edge_similar_direction_sorter Class Reference

#include <NBContHelper.h>


Detailed Description

edge_similar_direction_sorter Class to sort edges by their angle in relation to the given edge The resulting list should have the edge in the most similar direction to the given edge as her first entry

Definition at line 195 of file NBContHelper.h.


Public Member Functions

 edge_similar_direction_sorter (NBEdge *e)
 constructor
int operator() (NBEdge *e1, NBEdge *e2) const
 comparing operation

Private Attributes

SUMOReal myAngle
 the angle to find the edge with the opposite direction

Constructor & Destructor Documentation

NBContHelper::edge_similar_direction_sorter::edge_similar_direction_sorter ( NBEdge e  )  [inline, explicit]

constructor

Definition at line 198 of file NBContHelper.h.

00199                 : myAngle(e->getAngle()) {}


Member Function Documentation

int NBContHelper::edge_similar_direction_sorter::operator() ( NBEdge e1,
NBEdge e2 
) const [inline]

comparing operation

Definition at line 202 of file NBContHelper.h.

References NBEdge::getAngle(), GeomHelper::getMinAngleDiff(), myAngle, and SUMOReal.

00202                                                      {
00203             SUMOReal d1 = GeomHelper::getMinAngleDiff(e1->getAngle(), myAngle);
00204             SUMOReal d2 = GeomHelper::getMinAngleDiff(e2->getAngle(), myAngle);
00205             return d1 < d2;
00206         }


Field Documentation

the angle to find the edge with the opposite direction

Definition at line 210 of file NBContHelper.h.

Referenced by operator()().


The documentation for this class was generated from the following file:

Generated on Wed May 5 00:06:51 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6