|
SUMO - Simulation of Urban MObility
|
#include <Line.h>
Public Member Functions | |
| void | add (SUMOReal x, SUMOReal y) |
| void | add (const Position &p) |
| SUMOReal | atan2Angle () const |
| SUMOReal | atan2DegreeAngle () const |
| SUMOReal | atan2PositiveAngle () const |
| void | extrapolateBy (SUMOReal length) |
| void | extrapolateFirstBy (SUMOReal length) |
| void | extrapolateSecondBy (SUMOReal length) |
| Position | getPositionAtDistance (SUMOReal offset) const |
| Position | getPositionAtDistance2D (SUMOReal offset) const |
| bool | intersects (const Line &l) const |
| Position | intersectsAt (const Line &l) const |
| SUMOReal | intersectsAtLength2D (const Line &v) |
| returns distance between myP1 and intersection or -1 if line segments do not intersect | |
| std::vector< SUMOReal > | intersectsAtLengths2D (const PositionVector &v) |
| SUMOReal | length () const |
| SUMOReal | length2D () const |
| Line () | |
| Line (const Position &p1, const Position &p2) | |
| void | move2side (SUMOReal amount) |
| const Position & | p1 () const |
| const Position & | p2 () const |
| Line & | reverse () |
| void | rotateAtP1 (SUMOReal rot) |
| void | sub (SUMOReal x, SUMOReal y) |
| ~Line () | |
Private Attributes | |
| Position | myP1 |
| Position | myP2 |
Definition at line 183 of file Line.cpp.
References Position::add(), myP1, and myP2.
Referenced by NBNodeShapeComputer::computeNodeShapeByCrosses().
| void Line::add | ( | const Position & | p | ) |
Definition at line 190 of file Line.cpp.
References Position::add(), myP1, myP2, Position::x(), Position::y(), and Position::z().
| SUMOReal Line::atan2Angle | ( | ) | const |
Definition at line 138 of file Line.cpp.
References myP1, myP2, Position::x(), and Position::y().
Referenced by atan2PositiveAngle(), PositionVector::beginEndAngle(), and NBNode::computeInternalLaneShape().
| SUMOReal Line::atan2DegreeAngle | ( | ) | const |
Definition at line 144 of file Line.cpp.
References myP1, myP2, PI, SUMOReal, Position::x(), and Position::y().
Referenced by NBEdge::computeEdgeShape(), NBEdge::computeLaneShape(), NIVissimEdge::dict_checkEdges2Join(), GLHelper::drawTriangleAtEnd(), NBEdge::getAngleAtNode(), NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt(), NBNodeShapeComputer::joinSameDirectionEdges(), and PositionVector::rotationDegreeAtLengthPosition().
| SUMOReal Line::atan2PositiveAngle | ( | ) | const |
Definition at line 150 of file Line.cpp.
References atan2Angle(), PI, and SUMOReal.
| void Line::extrapolateBy | ( | SUMOReal | length | ) |
Definition at line 61 of file Line.cpp.
References Position::add(), Position::distanceTo(), myP1, myP2, Position::sub(), and SUMOReal.
Referenced by PositionVector::appendWithCrossingPoint(), NBNodeShapeComputer::computeContinuationNodeShape(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), computeSameEnd(), NBNodeShapeComputer::joinSameDirectionEdges(), PositionVector::move2side(), NIImporter_SUMO::reconstructEdgeShape(), and NBEdge::startShapeAt().
| void Line::extrapolateFirstBy | ( | SUMOReal | length | ) |
Definition at line 70 of file Line.cpp.
References GeomHelper::extrapolate_first(), myP1, and myP2.
Referenced by NBNode::computeInternalLaneShape().
| void Line::extrapolateSecondBy | ( | SUMOReal | length | ) |
Definition at line 76 of file Line.cpp.
References GeomHelper::extrapolate_second(), myP1, and myP2.
Referenced by NBNode::computeInternalLaneShape().
Definition at line 93 of file Line.cpp.
References Position::distanceTo(), length(), myP1, myP2, SUMOReal, and toString().
Referenced by NBNode::computeInternalLaneShape(), computeSameEnd(), and GLHelper::drawTriangleAtEnd().
Definition at line 106 of file Line.cpp.
References Position::distanceTo2D(), length(), myP1, myP2, SUMOReal, and toString().
Referenced by NBEdge::startShapeAt().
Definition at line 165 of file Line.cpp.
Referenced by NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), PositionVector::move2side(), and NIImporter_SUMO::reconstructEdgeShape().
Definition at line 159 of file Line.cpp.
References GeomHelper::intersection_position2D(), myP1, and myP2.
Referenced by NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), PositionVector::move2side(), and NIImporter_SUMO::reconstructEdgeShape().
returns distance between myP1 and intersection or -1 if line segments do not intersect
Definition at line 214 of file Line.cpp.
References GeomHelper::intersection_position2D(), myP1, myP2, and GeomHelper::nearest_position_on_line_to_point2D().
| std::vector< SUMOReal > Line::intersectsAtLengths2D | ( | const PositionVector & | v | ) |
Definition at line 127 of file Line.cpp.
References Position::distanceTo2D(), PositionVector::intersectionPoints2D(), myP1, PositionVector::push_back(), and PositionVector::size().
Referenced by NBEdge::startShapeAt().
| SUMOReal Line::length | ( | ) | const |
Definition at line 177 of file Line.cpp.
References Position::distanceTo(), myP1, and myP2.
Referenced by NBNode::computeInternalLaneShape(), GLHelper::drawTriangleAtEnd(), getPositionAtDistance(), getPositionAtDistance2D(), and NWWriter_OpenDrive::writePlanView().
| SUMOReal Line::length2D | ( | ) | const |
Definition at line 171 of file Line.cpp.
References Position::distanceTo2D(), myP1, and myP2.
Referenced by PositionVector::intersectsAtLengths2D().
| void Line::move2side | ( | SUMOReal | amount | ) |
Definition at line 119 of file Line.cpp.
References Position::add(), GeomHelper::getNormal90D_CW(), myP1, and myP2.
Referenced by NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
| const Position & Line::p1 | ( | ) | const |
Definition at line 81 of file Line.cpp.
References myP1.
Referenced by NBNode::computeInternalLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), computeSameEnd(), PositionVector::intersectionPoints2D(), PositionVector::intersectsAtLengths2D(), NBNodeShapeComputer::joinSameDirectionEdges(), NBNodeShapeComputer::replaceFirstChecking(), NBEdge::startShapeAt(), and NWWriter_OpenDrive::writePlanView().
| const Position & Line::p2 | ( | ) | const |
Definition at line 87 of file Line.cpp.
References myP2.
Referenced by NBNode::computeInternalLaneShape(), NIVissimEdge::dict_checkEdges2Join(), GLHelper::drawTriangleAtEnd(), PositionVector::intersectionPoints2D(), PositionVector::intersectsAtLengths2D(), NBNodeShapeComputer::replaceLastChecking(), NBEdge::startShapeAt(), and NWWriter_OpenDrive::writePlanView().
| Line & Line::reverse | ( | ) |
Definition at line 205 of file Line.cpp.
Referenced by NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt().
| void Line::rotateAtP1 | ( | SUMOReal | rot | ) |
Definition at line 222 of file Line.cpp.
References Position::add(), myP1, myP2, Position::reshiftRotate(), and Position::sub().
Referenced by NBNode::computeInternalLaneShape(), and NBNodeShapeComputer::computeNodeShapeByCrosses().
Definition at line 197 of file Line.cpp.
References myP1, myP2, and Position::sub().
Referenced by NBNode::computeInternalLaneShape().
|
private |
Definition at line 83 of file Line.h.
Referenced by add(), atan2Angle(), atan2DegreeAngle(), extrapolateBy(), extrapolateFirstBy(), extrapolateSecondBy(), getPositionAtDistance(), getPositionAtDistance2D(), intersects(), intersectsAt(), intersectsAtLength2D(), intersectsAtLengths2D(), length(), length2D(), move2side(), p1(), reverse(), rotateAtP1(), and sub().
|
private |
Definition at line 83 of file Line.h.
Referenced by add(), atan2Angle(), atan2DegreeAngle(), extrapolateBy(), extrapolateFirstBy(), extrapolateSecondBy(), getPositionAtDistance(), getPositionAtDistance2D(), intersects(), intersectsAt(), intersectsAtLength2D(), length(), length2D(), move2side(), p2(), reverse(), rotateAtP1(), and sub().