|
SUMO - Simulation of Urban MObility
|
#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) |
| static SUMOReal | relAngle (SUMOReal angle1, SUMOReal angle2) |
| static SUMOReal | relAngle (SUMOReal angle, SUMOReal x1, SUMOReal y1, SUMOReal x2, SUMOReal y2) |
Some mathmatical methods for the computation of angles
Definition at line 52 of file NBHelpers.h.
| 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 52 of file NBHelpers.cpp.
Referenced by NBEdge::init(), and relAngle().
returns the distance between both nodes
Definition at line 103 of file NBHelpers.cpp.
References Position::distanceTo(), and NBNode::getPosition().
| std::string NBHelpers::normalIDRepresentation | ( | const std::string & | id | ) | [static] |
converts the numerical id to its "normal" string representation
Definition at line 92 of file NBHelpers.cpp.
Referenced by NIImporter_VISUM::getNamedEdge(), NIImporter_VISUM::getNamedEdgeContinuating(), NIImporter_VISUM::getNamedFloat(), NIImporter_VISUM::getNamedNode(), NIImporter_VISUM::getNamedString(), NIImporter_VISUM::parse_AreaSubPartElement(), 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().
| SUMOReal NBHelpers::normRelAngle | ( | SUMOReal | angle1, |
| SUMOReal | angle2 | ||
| ) | [static] |
normalises angle <-170 and >170 to 180 after the computation with "relAngle"
Definition at line 82 of file NBHelpers.cpp.
References relAngle(), and SUMOReal.
Referenced by NBNode::getDirection(), NBContHelper::same_connection_edge_sorter::getMinMaxRelAngles(), NBEdge::connections_relative_edgelane_sorter::operator()(), and NBContHelper::relative_edge_sorter::operator()().
| SUMOReal NBHelpers::relAngle | ( | SUMOReal | angle1, |
| SUMOReal | angle2 | ||
| ) | [static] |
computes the relative angle between the two angles
Definition at line 69 of file NBHelpers.cpp.
| SUMOReal NBHelpers::relAngle | ( | SUMOReal | angle, |
| SUMOReal | x1, | ||
| SUMOReal | y1, | ||
| SUMOReal | x2, | ||
| SUMOReal | y2 | ||
| ) | [static] |
computes the angle between the first angle and the straigth which is described by her coordinates (parameter 2-5)
Definition at line 62 of file NBHelpers.cpp.
References angle(), and SUMOReal.
Referenced by NBEdge::acceptBeingTurning(), NBEdge::computeTurningDirections(), normRelAngle(), and NBEdge::setTurningDestination().