SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NBNode::ApproachingDivider Class Reference

Computes lane-2-lane connections. More...

#include <NBNode.h>

Inheritance diagram for NBNode::ApproachingDivider:
Bresenham::BresenhamCallBack

Public Member Functions

 ApproachingDivider (EdgeVector *approaching, NBEdge *currentOutgoing, const bool buildCrossingsAndWalkingAreas)
 Constructor.
void execute (const unsigned int src, const unsigned int dest)
unsigned int numAvailableLanes () const
std::deque< int > * spread (const std::vector< int > &approachingLanes, int dest) const
 ~ApproachingDivider ()
 Destructor.

Private Attributes

EdgeVectormyApproaching
 The list of edges that approach the current edge.
std::vector< unsigned intmyAvailableLanes
 The available lanes to which connections shall be built.
NBEdgemyCurrentOutgoing
 The approached current edge.

Detailed Description

Computes lane-2-lane connections.

Being a bresenham-callback, this class computes which lanes are approached by the current lane (first callback parameter). The second callback parameter is the destination lane that is the middle of the computed lanes. The lanes are spreaded from this middle position both to left and right but may also be transposed in full when there is not enough space.

Definition at line 94 of file NBNode.h.

Constructor & Destructor Documentation

NBNode::ApproachingDivider::ApproachingDivider ( EdgeVector approaching,
NBEdge currentOutgoing,
const bool  buildCrossingsAndWalkingAreas 
)

Constructor.

Parameters
[in]approachingThe list of the edges that approach the outgoing edge
[in]currentOutgoingThe outgoing edge

Definition at line 95 of file NBNode.cpp.

References NBEdge::getNumLanes(), NBEdge::getPermissions(), isForbidden(), myApproaching, myAvailableLanes, myCurrentOutgoing, and SVC_PEDESTRIAN.

NBNode::ApproachingDivider::~ApproachingDivider ( )

Destructor.

Definition at line 125 of file NBNode.cpp.

Member Function Documentation

void NBNode::ApproachingDivider::execute ( const unsigned int  src,
const unsigned int  dest 
)
virtual
unsigned int NBNode::ApproachingDivider::numAvailableLanes ( ) const
inline

Definition at line 116 of file NBNode.h.

References myAvailableLanes.

Referenced by NBNode::computeLanes2Lanes().

std::deque< int > * NBNode::ApproachingDivider::spread ( const std::vector< int > &  approachingLanes,
int  dest 
) const

the method that spreads the wished number of lanes from the the lane given by the bresenham-call to both left and right

Definition at line 155 of file NBNode.cpp.

Field Documentation

EdgeVector* NBNode::ApproachingDivider::myApproaching
private

The list of edges that approach the current edge.

Definition at line 97 of file NBNode.h.

Referenced by ApproachingDivider().

std::vector<unsigned int> NBNode::ApproachingDivider::myAvailableLanes
private

The available lanes to which connections shall be built.

Definition at line 103 of file NBNode.h.

Referenced by ApproachingDivider(), and numAvailableLanes().

NBEdge* NBNode::ApproachingDivider::myCurrentOutgoing
private

The approached current edge.

Definition at line 100 of file NBNode.h.

Referenced by ApproachingDivider().


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