![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Computes lane-2-lane connections. More...
#include <NBNode.h>
Public Member Functions | |
ApproachingDivider (const EdgeVector &approaching, NBEdge *currentOutgoing) | |
Constructor. More... | |
void | execute (const int src, const int dest) |
the bresenham-callback More... | |
int | numAvailableLanes () const |
@ get number of avaliable lanes More... | |
std::deque< int > * | 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 More... | |
~ApproachingDivider () | |
Destructor. More... | |
Private Member Functions | |
ApproachingDivider & | operator= (const ApproachingDivider &)=delete |
Invalidated assignment operator. More... | |
Private Attributes | |
const EdgeVector & | myApproaching |
The list of edges that approach the current edge. More... | |
std::vector< int > | myAvailableLanes |
The available lanes to which connections shall be built. More... | |
NBEdge * | myCurrentOutgoing |
The approached current edge. More... | |
bool | myIsBikeEdge |
whether the outgoing edge is exclusively used by bikes More... | |
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.
NBNode::ApproachingDivider::ApproachingDivider | ( | const EdgeVector & | approaching, |
NBEdge * | currentOutgoing | ||
) |
Constructor.
[in] | approaching | The list of the edges that approach the outgoing edge |
[in] | currentOutgoing | The outgoing edge |
Definition at line 96 of file NBNode.cpp.
References NBEdge::getNumLanes(), NBEdge::getPermissions(), isForbidden(), myApproaching, myAvailableLanes, myCurrentOutgoing, myIsBikeEdge, SVC_BICYCLE, and SVC_PEDESTRIAN.
NBNode::ApproachingDivider::~ApproachingDivider | ( | ) |
Destructor.
Definition at line 128 of file NBNode.cpp.
|
virtual |
the bresenham-callback
Implements Bresenham::BresenhamCallBack.
Definition at line 132 of file NBNode.cpp.
References DEBUGCOND2, NBEdge::getConnectionLanes(), NBEdge::getID(), NBEdge::getPermissions(), NBEdge::getStep(), NBEdge::getToNode(), NBEdge::L2L_COMPUTED, NBEdge::LANES2LANES_DONE, NBEdge::LANES2LANES_USER, NBEdge::setConnection(), SVC_BICYCLE, and toString().
|
inline |
@ get number of avaliable lanes
Definition at line 99 of file NBNode.h.
References myAvailableLanes.
Referenced by NBNode::computeLanes2Lanes().
|
privatedelete |
Invalidated assignment operator.
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 165 of file NBNode.cpp.
|
private |
The list of edges that approach the current edge.
Definition at line 111 of file NBNode.h.
Referenced by ApproachingDivider().
|
private |
The available lanes to which connections shall be built.
Definition at line 117 of file NBNode.h.
Referenced by ApproachingDivider(), and numAvailableLanes().
|
private |
The approached current edge.
Definition at line 114 of file NBNode.h.
Referenced by ApproachingDivider().
|
private |
whether the outgoing edge is exclusively used by bikes
Definition at line 120 of file NBNode.h.
Referenced by ApproachingDivider().