![]() |
SUMO - Simulation of Urban MObility
|
#include <NBHelpers.h>
Static Public Member Functions | |
static double | distance (NBNode *node1, NBNode *node2) |
returns the distance between both nodes More... | |
static void | interpretLaneID (const std::string &lane_id, std::string &edge_id, int &index) |
parses edge-id and index from lane-id More... | |
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 void | loadPrefixedIDsFomFile (const std::string &file, const std::string prefix, std::set< std::string > &into) |
Add prefixed ids defined in file. More... | |
static std::string | normalIDRepresentation (const std::string &id) |
converts the numerical id to its "normal" string representation More... | |
static double | normRelAngle (double angle1, double angle2) |
ensure that reverse relAngles (>=179.999) always count as turnarounds (-180) More... | |
static double | relAngle (double angle1, double angle2) |
computes the relative angle between the two angles More... | |
Some mathmatical methods for the computation of angles
Definition at line 53 of file NBHelpers.h.
returns the distance between both nodes
Definition at line 88 of file NBHelpers.cpp.
References Position::distanceTo(), and NBNode::getPosition().
|
static |
parses edge-id and index from lane-id
[in] | lane_id | The lane-id |
[out] | edge_id | ID of this lane's edge |
[out] | index | Index of this lane |
Definition at line 127 of file NBHelpers.cpp.
References TplConvert::_2int(), and WRITE_ERROR.
Referenced by NIImporter_SUMO::getLaneAttrsFromID(), GNEApplicationWindow::GNEShapeHandler::getLanePos(), and NWWriter_SUMO::writeNetwork().
|
static |
Add edge ids defined in file (either ID or edge:ID per line) into the given set.
Definition at line 94 of file NBHelpers.cpp.
References StringUtils::startsWith().
Referenced by NBEdgeCont::applyOptions(), and NBNodeCont::removeUnwishedNodes().
|
static |
Add prefixed ids defined in file.
Definition at line 112 of file NBHelpers.cpp.
References StringUtils::startsWith().
Referenced by NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and NWWriter_DlrNavteq::writeProhibitedManoeuvres().
|
static |
converts the numerical id to its "normal" string representation
Definition at line 77 of file NBHelpers.cpp.
Referenced by NIImporter_VISUM::getNamedEdge(), NIImporter_VISUM::getNamedEdgeContinuating(), NIImporter_VISUM::getNamedNode(), NIImporter_VISUM::getNamedString(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Districts(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Nodes(), NIImporter_VISUM::parse_Phases(), NIImporter_VISUM::parse_SignalGroups(), NIImporter_VISUM::parse_SignalGroupsToPhases(), NIImporter_VISUM::parse_TrafficLights(), and NIImporter_VISUM::parse_Types().
|
static |
ensure that reverse relAngles (>=179.999) always count as turnarounds (-180)
Definition at line 66 of file NBHelpers.cpp.
References NUMERICAL_EPS, and relAngle().
Referenced by NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NBNode::getDirection(), NBContHelper::same_connection_edge_sorter::getMinMaxRelAngles(), NBContHelper::relative_outgoing_edge_sorter::operator()(), NBContHelper::straightness_sorter::operator()(), and NBContHelper::relative_incoming_edge_sorter::operator()().
|
static |
computes the relative angle between the two angles
Definition at line 53 of file NBHelpers.cpp.
Referenced by NBNode::buildCrossings(), NBOwnTLDef::computeLogicAndConts(), NBNodeShapeComputer::computeNodeShapeDefault(), NBRampsComputer::fulfillsRampConstraints(), NBNode::geometryLike(), NBEdgeCont::guessRoundabouts(), NBRequest::laneConflict(), and normRelAngle().