|
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 |
| bool | intersects (const Line &l) const |
| Position | intersectsAt (const Line &l) const |
| SUMOReal | intersectsAtLength (const Line &v) |
| DoubleVector | intersectsAtLengths (const PositionVector &v) |
| SUMOReal | length () const |
| Line () | |
| Line (const Position &p1, const Position &p2) | |
| void | move2side (SUMOReal amount) |
| const Position & | p1 () const |
| const Position & | p2 () const |
| Line & | reverse () |
| void | rotateAround (const Position &at, SUMOReal rot) |
| void | rotateAtP1 (SUMOReal rot) |
| void | sub (SUMOReal x, SUMOReal y) |
| ~Line () | |
Private Attributes | |
| Position | myP1 |
| Position | myP2 |
| void Line::add | ( | SUMOReal | x, |
| SUMOReal | y | ||
| ) |
Definition at line 163 of file Line.cpp.
References Position::add(), myP1, and myP2.
Referenced by NBNodeShapeComputer::computeNodeShapeByCrosses().
| void Line::add | ( | const Position & | p | ) |
Definition at line 170 of file Line.cpp.
References Position::add(), myP1, myP2, Position::x(), and Position::y().
| SUMOReal Line::atan2Angle | ( | ) | const |
Definition at line 121 of file Line.cpp.
References myP1, myP2, Position::x(), and Position::y().
Referenced by atan2PositiveAngle(), PositionVector::beginEndAngle(), NBNode::computeInternalLaneShape(), and NWWriter_OpenDrive::writePlanView().
| SUMOReal Line::atan2DegreeAngle | ( | ) | const |
Definition at line 127 of file Line.cpp.
References myP1, myP2, PI, SUMOReal, Position::x(), and Position::y().
Referenced by NBEdge::computeEdgeShape(), NBEdge::computeLaneShape(), NIVissimEdge::dict_checkEdges2Join(), NBEdge::getAngle(), NBNodeShapeComputer::joinSameDirectionEdges(), and PositionVector::rotationDegreeAtLengthPosition().
| SUMOReal Line::atan2PositiveAngle | ( | ) | const |
Definition at line 133 of file Line.cpp.
References atan2Angle(), PI, and SUMOReal.
| void Line::extrapolateBy | ( | SUMOReal | length | ) |
Definition at line 57 of file Line.cpp.
References Position::add(), Position::distanceTo(), myP1, myP2, Position::sub(), and SUMOReal.
Referenced by PositionVector::appendWithCrossingPoint(), NBNodeShapeComputer::computeContinuationNodeShape(), NBEdge::computeEdgeShape(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), computeSameEnd(), NBNodeShapeComputer::joinSameDirectionEdges(), PositionVector::move2side(), and NIImporter_SUMO::reconstructEdgeShape().
| void Line::extrapolateFirstBy | ( | SUMOReal | length | ) |
Definition at line 66 of file Line.cpp.
References GeomHelper::extrapolate_first(), myP1, and myP2.
Referenced by NBNode::computeInternalLaneShape().
| void Line::extrapolateSecondBy | ( | SUMOReal | length | ) |
Definition at line 72 of file Line.cpp.
References GeomHelper::extrapolate_second(), myP1, and myP2.
Referenced by NBNode::computeInternalLaneShape().
| Position Line::getPositionAtDistance | ( | SUMOReal | offset | ) | const |
Definition at line 89 of file Line.cpp.
References Position::distanceTo(), length(), myP1, myP2, SUMOReal, and toString().
Referenced by NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), and computeSameEnd().
Definition at line 148 of file Line.cpp.
Referenced by NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), PositionVector::move2side(), and NIImporter_SUMO::reconstructEdgeShape().
Definition at line 142 of file Line.cpp.
References GeomHelper::intersection_position(), myP1, and myP2.
Referenced by NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), PositionVector::move2side(), and NIImporter_SUMO::reconstructEdgeShape().
| SUMOReal Line::intersectsAtLength | ( | const Line & | v | ) |
Definition at line 194 of file Line.cpp.
References GeomHelper::intersection_position(), myP1, myP2, and GeomHelper::nearest_position_on_line_to_point().
| DoubleVector Line::intersectsAtLengths | ( | const PositionVector & | v | ) |
Definition at line 110 of file Line.cpp.
References Position::distanceTo(), PositionVector::intersectsAtPoints(), myP1, myP2, PositionVector::push_back(), and PositionVector::size().
Referenced by NBEdge::computeEdgeShape(), and PositionVector::intersectsAtLengths().
| SUMOReal Line::length | ( | ) | const |
Definition at line 154 of file Line.cpp.
References myP1, myP2, Position::x(), and Position::y().
Referenced by NBNode::computeInternalLaneShape(), getPositionAtDistance(), PositionVector::intersectsAtLengths(), and NWWriter_OpenDrive::writePlanView().
| void Line::move2side | ( | SUMOReal | amount | ) |
Definition at line 102 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 77 of file Line.cpp.
References myP1.
Referenced by NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), computeSameEnd(), PositionVector::intersectsAtLengths(), NBNodeShapeComputer::joinSameDirectionEdges(), and NBNodeShapeComputer::replaceFirstChecking().
| const Position & Line::p2 | ( | ) | const |
Definition at line 83 of file Line.cpp.
References myP2.
Referenced by NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NIVissimEdge::dict_checkEdges2Join(), PositionVector::intersectsAtLengths(), and NBNodeShapeComputer::replaceLastChecking().
| void Line::rotateAround | ( | const Position & | at, |
| SUMOReal | rot | ||
| ) |
Definition at line 212 of file Line.cpp.
References Position::add(), myP1, myP2, SUMOReal, Position::x(), and Position::y().
Referenced by NBNodeShapeComputer::computeNodeShapeByCrosses().
| void Line::rotateAtP1 | ( | SUMOReal | rot | ) |
Definition at line 202 of file Line.cpp.
References Position::add(), myP1, myP2, Position::reshiftRotate(), and Position::sub().
Referenced by NBNode::computeInternalLaneShape().
| void Line::sub | ( | SUMOReal | x, |
| SUMOReal | y | ||
| ) |
Definition at line 177 of file Line.cpp.
References myP1, myP2, and Position::sub().
Referenced by NBNode::computeInternalLaneShape(), and NBNodeShapeComputer::computeNodeShapeByCrosses().
Position Line::myP1 [private] |
Definition at line 76 of file Line.h.
Referenced by add(), atan2Angle(), atan2DegreeAngle(), extrapolateBy(), extrapolateFirstBy(), extrapolateSecondBy(), getPositionAtDistance(), intersects(), intersectsAt(), intersectsAtLength(), intersectsAtLengths(), length(), move2side(), p1(), reverse(), rotateAround(), rotateAtP1(), and sub().
Position Line::myP2 [private] |
Definition at line 76 of file Line.h.
Referenced by add(), atan2Angle(), atan2DegreeAngle(), extrapolateBy(), extrapolateFirstBy(), extrapolateSecondBy(), getPositionAtDistance(), intersects(), intersectsAt(), intersectsAtLength(), intersectsAtLengths(), length(), move2side(), p2(), reverse(), rotateAround(), rotateAtP1(), and sub().