|
SUMO - Simulation of Urban MObility
|
#include <GeomHelper.h>
Static Public Member Functions | |
| static SUMOReal | Angle2D (SUMOReal x1, SUMOReal y1, SUMOReal x2, SUMOReal y2) |
| static SUMOReal | closestDistancePointLine (const Position &point, const Position &lineStart, const Position &lineEnd, Position &outIntersection) |
| static Position | crossPoint (const Boundary &b, const PositionVector &v) |
| static SUMOReal | distancePointLine (const Position &point, const Position &lineStart, const Position &lineEnd) |
| static Position | extrapolate_first (const Position &p1, const Position &p2, SUMOReal length) |
| static Position | extrapolate_second (const Position &p1, const Position &p2, SUMOReal length) |
| static SUMOReal | getCCWAngleDiff (SUMOReal angle1, SUMOReal angle2) throw () |
| Returns the distance of second angle from first angle counter-clockwise. | |
| static SUMOReal | getCWAngleDiff (SUMOReal angle1, SUMOReal angle2) throw () |
| Returns the distance of second angle from first angle clockwise. | |
| static SUMOReal | getMaxAngleDiff (SUMOReal angle1, SUMOReal angle2) throw () |
| Returns the maximum distance (clockwise/counter-clockwise) between both angles. | |
| static SUMOReal | getMinAngleDiff (SUMOReal angle1, SUMOReal angle2) throw () |
| Returns the minimum distance (clockwise/counter-clockwise) between both angles. | |
| static std::pair< SUMOReal, SUMOReal > | getNormal90D_CW (const Position &beg, const Position &end, SUMOReal length, SUMOReal wanted_offset) |
| static std::pair< SUMOReal, SUMOReal > | getNormal90D_CW (const Position &beg, const Position &end, SUMOReal wanted_offset) |
| static Position | interpolate (const Position &p1, const Position &p2, SUMOReal length) |
| static Position | intersection_position (const Position &p11, const Position &p12, const Position &p21, const Position &p22) |
| static bool | intersects (const Position &p11, const Position &p12, const Position &p21, const Position &p22) |
| static bool | intersects (SUMOReal x1b, SUMOReal y1b, SUMOReal x1e, SUMOReal y1e, SUMOReal x2b, SUMOReal y2b, SUMOReal x2e, SUMOReal y2e) |
| static SUMOReal | nearest_position_on_line_to_point (const Position &l1, const Position &l2, const Position &p, bool perpendicular=true) |
| static Position | transfer_to_side (Position &p, const Position &lineBeg, const Position &lineEnd, SUMOReal amount) |
Definition at line 47 of file GeomHelper.h.
| SUMOReal GeomHelper::Angle2D | ( | SUMOReal | x1, |
| SUMOReal | y1, | ||
| SUMOReal | x2, | ||
| SUMOReal | y2 | ||
| ) | [static] |
Definition at line 173 of file GeomHelper.cpp.
Referenced by PositionVector::around(), NGRandomNetBuilder::checkAngles(), and PositionVector::move2side().
| SUMOReal GeomHelper::closestDistancePointLine | ( | const Position & | point, |
| const Position & | lineStart, | ||
| const Position & | lineEnd, | ||
| Position & | outIntersection | ||
| ) | [static] |
Return the distance from point to line as well as the intersection point. If intersection does not lie within the line segment, the start or end point of the segment is returned
Definition at line 254 of file GeomHelper.cpp.
References Position::distanceTo(), Position::set(), SUMOReal, Position::x(), and Position::y().
Referenced by PositionVector::distance(), and PositionVector::insertAtClosest().
| Position GeomHelper::crossPoint | ( | const Boundary & | b, |
| const PositionVector & | v | ||
| ) | [static] |
Definition at line 301 of file GeomHelper.cpp.
References PositionVector::intersects(), PositionVector::intersectsAtPoint(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by NIVissimConnectionCluster::getPositionForEdge().
| SUMOReal GeomHelper::distancePointLine | ( | const Position & | point, |
| const Position & | lineStart, | ||
| const Position & | lineEnd | ||
| ) | [static] |
by Damian Coventry
Definition at line 236 of file GeomHelper.cpp.
References Position::distanceSquaredTo(), Position::distanceTo(), SUMOReal, Position::x(), and Position::y().
Referenced by NGRandomNetBuilder::canConnect(), PositionVector::pruneFromBeginAt(), PositionVector::pruneFromEndAt(), and PositionVector::removeColinearPoints().
| Position GeomHelper::extrapolate_first | ( | const Position & | p1, |
| const Position & | p2, | ||
| SUMOReal | length | ||
| ) | [static] |
Definition at line 196 of file GeomHelper.cpp.
References Position::distanceTo(), SUMOReal, Position::x(), and Position::y().
Referenced by PositionVector::extrapolate(), Line::extrapolateFirstBy(), and PositionVector::pruneFromBeginAt().
| Position GeomHelper::extrapolate_second | ( | const Position & | p1, |
| const Position & | p2, | ||
| SUMOReal | length | ||
| ) | [static] |
Definition at line 206 of file GeomHelper.cpp.
References Position::distanceTo(), SUMOReal, Position::x(), and Position::y().
Referenced by PositionVector::extrapolate(), Line::extrapolateSecondBy(), NIVissimAbstractEdge::getGeomPosition(), and PositionVector::pruneFromEndAt().
| SUMOReal GeomHelper::getCCWAngleDiff | ( | SUMOReal | angle1, |
| SUMOReal | angle2 | ||
| ) | throw () [static] |
Returns the distance of second angle from first angle counter-clockwise.
| [in] | angle1 | The first angle |
| [in] | angle2 | The second angle |
Definition at line 347 of file GeomHelper.cpp.
References SUMOReal.
Referenced by NBNode::computeLanes2Lanes(), and NBNode::isLeftMover().
| SUMOReal GeomHelper::getCWAngleDiff | ( | SUMOReal | angle1, |
| SUMOReal | angle2 | ||
| ) | throw () [static] |
Returns the distance of second angle from first angle clockwise.
| [in] | angle1 | The first angle |
| [in] | angle2 | The second angle |
Definition at line 357 of file GeomHelper.cpp.
References SUMOReal.
Referenced by NBNode::computeLanes2Lanes(), NBEdge::computeLaneShape(), and NBNode::isLeftMover().
| SUMOReal GeomHelper::getMaxAngleDiff | ( | SUMOReal | angle1, |
| SUMOReal | angle2 | ||
| ) | throw () [static] |
Returns the maximum distance (clockwise/counter-clockwise) between both angles.
| [in] | angle1 | The first angle |
| [in] | angle2 | The second angle |
Definition at line 373 of file GeomHelper.cpp.
References MAX2().
| SUMOReal GeomHelper::getMinAngleDiff | ( | SUMOReal | angle1, |
| SUMOReal | angle2 | ||
| ) | throw () [static] |
Returns the minimum distance (clockwise/counter-clockwise) between both angles.
| [in] | angle1 | The first angle |
| [in] | angle2 | The second angle |
Definition at line 367 of file GeomHelper.cpp.
References MIN2().
Referenced by NBNodeShapeComputer::compute(), NBEdge::computeEdgeShape(), NBOwnTLDef::getBestCombination(), NBContHelper::edge_opposite_direction_sorter::getDiff(), NBContHelper::edge_similar_direction_sorter::operator()(), MSLane::by_connections_to_sorter::operator()(), and NBNode::setPriorityJunctionPriorities().
| std::pair< SUMOReal, SUMOReal > GeomHelper::getNormal90D_CW | ( | const Position & | beg, |
| const Position & | end, | ||
| SUMOReal | length, | ||
| SUMOReal | wanted_offset | ||
| ) | [static] |
Definition at line 335 of file GeomHelper.cpp.
References toString(), Position::x(), and Position::y().
Referenced by getNormal90D_CW(), NBEdge::laneOffset(), PositionVector::move2side(), and Line::move2side().
| std::pair< SUMOReal, SUMOReal > GeomHelper::getNormal90D_CW | ( | const Position & | beg, |
| const Position & | end, | ||
| SUMOReal | wanted_offset | ||
| ) | [static] |
Definition at line 326 of file GeomHelper.cpp.
References getNormal90D_CW(), SUMOReal, Position::x(), and Position::y().
| Position GeomHelper::interpolate | ( | const Position & | p1, |
| const Position & | p2, | ||
| SUMOReal | length | ||
| ) | [static] |
Definition at line 186 of file GeomHelper.cpp.
References Position::distanceTo(), SUMOReal, Position::x(), and Position::y().
| Position GeomHelper::intersection_position | ( | const Position & | p11, |
| const Position & | p12, | ||
| const Position & | p21, | ||
| const Position & | p22 | ||
| ) | [static] |
Definition at line 111 of file GeomHelper.cpp.
References SUMOReal, Position::x(), and Position::y().
Referenced by NIVissimAbstractEdge::crossesAtPoint(), Line::intersectsAt(), Line::intersectsAtLength(), PositionVector::intersectsAtLengths(), PositionVector::intersectsAtPoint(), and PositionVector::intersectsAtPoints().
| bool GeomHelper::intersects | ( | const Position & | p11, |
| const Position & | p12, | ||
| const Position & | p21, | ||
| const Position & | p22 | ||
| ) | [static] |
Definition at line 103 of file GeomHelper.cpp.
References intersects(), Position::x(), and Position::y().
| bool GeomHelper::intersects | ( | SUMOReal | x1b, |
| SUMOReal | y1b, | ||
| SUMOReal | x1e, | ||
| SUMOReal | y1e, | ||
| SUMOReal | x2b, | ||
| SUMOReal | y2b, | ||
| SUMOReal | x2e, | ||
| SUMOReal | y2e | ||
| ) | [static] |
Definition at line 46 of file GeomHelper.cpp.
References SUMOReal.
Referenced by NGRandomNetBuilder::canConnect(), Boundary::crosses(), PositionVector::intersects(), intersects(), PositionVector::intersectsAtLengths(), PositionVector::intersectsAtPoint(), and PositionVector::intersectsAtPoints().
| SUMOReal GeomHelper::nearest_position_on_line_to_point | ( | const Position & | l1, |
| const Position & | l2, | ||
| const Position & | p, | ||
| bool | perpendicular = true |
||
| ) | [static] |
Definition at line 216 of file GeomHelper.cpp.
References Position::distanceSquaredTo(), Position::distanceTo(), SUMOReal, Position::x(), and Position::y().
Referenced by NIVissimAbstractEdge::crossesAtPoint(), NIVissimConnectionCluster::getPositionForEdge(), Line::intersectsAtLength(), NIVissimConnectionCluster::liesOnSameEdgesEnd(), and NBEdgeCont::splitAt().
| Position GeomHelper::transfer_to_side | ( | Position & | p, |
| const Position & | lineBeg, | ||
| const Position & | lineEnd, | ||
| SUMOReal | amount | ||
| ) | [static] |
Definition at line 285 of file GeomHelper.cpp.
References Position::add(), SUMOReal, Position::x(), and Position::y().
Referenced by NBEdge::getMaxLaneOffsetPositionAt(), and NBEdge::getMinLaneOffsetPositionAt().