Eclipse SUMO - Simulation of Urban MObility
NBTurningDirectionsComputer Class Reference

#include <NBAlgorithms.h>

Data Structures

struct  Combination
 Stores the information about the angle between an incoming ("from") and an outgoing ("to") edge. More...
 
class  combination_by_angle_sorter
 Sorts "Combination"s by decreasing angle. More...
 

Static Public Member Functions

static void computeTurnDirections (NBNodeCont &nc, bool warn=true)
 Computes turnaround destinations for all edges (if exist) More...
 
static void computeTurnDirectionsForNode (NBNode *node, bool warn)
 Computes turnaround destinations for all incoming edges of the given nodes (if any) More...
 
static double getFarAngleAtNode (const NBEdge *e, const NBNode *n, double dist=50)
 compute angle to junction at a point further away More...
 

Detailed Description

Definition at line 43 of file NBAlgorithms.h.

Member Function Documentation

◆ computeTurnDirections()

void NBTurningDirectionsComputer::computeTurnDirections ( NBNodeCont nc,
bool  warn = true 
)
static

Computes turnaround destinations for all edges (if exist)

Parameters
[in]ncThe container of nodes to loop along
[in]warnWhether warnings shall be issued

Definition at line 52 of file NBAlgorithms.cpp.

References NBNodeCont::begin(), computeTurnDirectionsForNode(), and NBNodeCont::end().

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ computeTurnDirectionsForNode()

void NBTurningDirectionsComputer::computeTurnDirectionsForNode ( NBNode node,
bool  warn 
)
static

Computes turnaround destinations for all incoming edges of the given nodes (if any)

Parameters
[in]nodeThe node for which to compute turnaround destinations
[in]warnWhether warnings shall be issued
Note
: This is needed by netedit

Definition at line 59 of file NBAlgorithms.cpp.

References NBTurningDirectionsComputer::Combination::angle, DEBUGCOND2, NBTurningDirectionsComputer::Combination::from, NBNode::geometryLike(), getFarAngleAtNode(), Named::getID(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), NBHelpers::normRelAngle(), NBHelpers::relAngle(), SVC_PEDESTRIAN, TL, NBTurningDirectionsComputer::Combination::to, and WRITE_WARNINGF.

Referenced by computeTurnDirections(), GNEJunction::getPopUpMenu(), GNEJunction::setLogicValid(), NBNode::updateSurroundingGeometry(), and NBRailwayTopologyAnalyzer::updateTurns().

Here is the caller graph for this function:

◆ getFarAngleAtNode()

double NBTurningDirectionsComputer::getFarAngleAtNode ( const NBEdge e,
const NBNode n,
double  dist = 50 
)
static

compute angle to junction at a point further away

Definition at line 175 of file NBAlgorithms.cpp.

References Position::angleTo2D(), NBEdge::getGeometry(), NBNode::getIncomingEdges(), NBNode::getOutgoingEdges(), NBEdge::getToNode(), GeomHelper::legacyDegree(), PositionVector::length(), and PositionVector::positionAtOffset().

Referenced by computeTurnDirectionsForNode().

Here is the caller graph for this function:

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