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

#include <NBHelpers.h>

Static Public Member Functions

static SUMOReal angle (SUMOReal x1, SUMOReal y1, SUMOReal x2, SUMOReal y2)
 
static SUMOReal distance (NBNode *node1, NBNode *node2)
 
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 53 of file NBHelpers.h.

Member Function Documentation

SUMOReal NBHelpers::angle ( SUMOReal  x1,
SUMOReal  y1,
SUMOReal  x2,
SUMOReal  y2 
)
static

computes the angle of the straight which is described by the two coordinates

Definition at line 53 of file NBHelpers.cpp.

References RAD2DEG, and SUMOReal.

Referenced by NBEdge::computeAngle(), NBContHelper::relative_outgoing_edge_sorter::operator()(), and NBContHelper::relative_incoming_edge_sorter::operator()().

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

returns the distance between both nodes

Definition at line 98 of file NBHelpers.cpp.

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

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

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