SUMO - Simulation of Urban MObility
NBHelpers Class Reference

#include <NBHelpers.h>

Collaboration diagram for NBHelpers:
Collaboration graph

Static Public Member Functions

static SUMOReal distance (NBNode *node1, NBNode *node2)
 
static void loadEdgesFromFile (const std::string &file, std::set< std::string > &into)
 Add edge ids defined in file (either ID or edge::ID per line) into the given set. More...
 
static std::string normalIDRepresentation (const std::string &id)
 
static SUMOReal normRelAngle (SUMOReal angle1, SUMOReal angle2)
 ensure that reverse relAngles (>=179.999) always count as turnarounds (-180) More...
 
static SUMOReal relAngle (SUMOReal angle1, SUMOReal angle2)
 

Detailed Description

Some mathmatical methods for the computation of angles

Definition at line 54 of file NBHelpers.h.

Member Function Documentation

§ distance()

SUMOReal NBHelpers::distance ( NBNode node1,
NBNode node2 
)
static

returns the distance between both nodes

Definition at line 91 of file NBHelpers.cpp.

References Position::distanceTo(), and NBNode::getPosition().

§ loadEdgesFromFile()

void NBHelpers::loadEdgesFromFile ( const std::string &  file,
std::set< std::string > &  into 
)
static

Add edge ids defined in file (either ID or edge::ID per line) into the given set.

Definition at line 97 of file NBHelpers.cpp.

References StringUtils::startsWith().

Referenced by NBEdgeCont::applyOptions(), and NBNodeCont::removeUnwishedNodes().

§ normalIDRepresentation()

§ normRelAngle()

§ relAngle()

SUMOReal NBHelpers::relAngle ( SUMOReal  angle1,
SUMOReal  angle2 
)
static

computes the relative angle between the two angles

Definition at line 56 of file NBHelpers.cpp.

References SUMOReal.

Referenced by NBNode::buildCrossings(), NBOwnTLDef::computeLogicAndConts(), NBNode::geometryLike(), NBEdgeCont::guessRoundabouts(), NBRequest::laneConflict(), and normRelAngle().


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