NBEdge::connections_relative_edgelane_sorter Class Reference

#include <NBEdge.h>


Detailed Description

connections_relative_edgelane_sorter Class to sort edges by their angle

Definition at line 1086 of file NBEdge.h.


Public Member Functions

 connections_relative_edgelane_sorter (NBEdge *e, NBNode *n)
 constructor
int operator() (const Connection &c1, const Connection &c2) const
 comparing operation

Private Attributes

NBEdgemyEdge
 the edge to compute the relative angle of
NBNodemyNode
 the node to use

Constructor & Destructor Documentation

NBEdge::connections_relative_edgelane_sorter::connections_relative_edgelane_sorter ( NBEdge e,
NBNode n 
) [inline, explicit]

constructor

Definition at line 1089 of file NBEdge.h.

01090                 : myEdge(e), myNode(n) {}


Member Function Documentation

int NBEdge::connections_relative_edgelane_sorter::operator() ( const Connection c1,
const Connection c2 
) const [inline]

comparing operation

Definition at line 1094 of file NBEdge.h.

References NBEdge::getAngle(), myEdge, NBHelpers::normRelAngle(), SUMOReal, NBEdge::Connection::toEdge, and NBEdge::Connection::toLane.

01094                                                                          {
01095             if (c1.toEdge!=c2.toEdge) {
01096                 SUMOReal relAngle1 = NBHelpers::normRelAngle(
01097                                          myEdge->getAngle(), c1.toEdge->getAngle());
01098                 SUMOReal relAngle2 = NBHelpers::normRelAngle(
01099                                          myEdge->getAngle(), c2.toEdge->getAngle());
01100                 return relAngle1 > relAngle2;
01101             }
01102             return c1.toLane<c2.toLane;
01103         }


Field Documentation

the edge to compute the relative angle of

Definition at line 1107 of file NBEdge.h.

Referenced by operator()().

the node to use

Definition at line 1110 of file NBEdge.h.


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