SUMO - Simulation of Urban MObility
|
#include <Line.h>
Private Attributes | |
Position | myP1 |
Position | myP2 |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Line &geom) |
Output operator. More... | |
Definition at line 198 of file Line.cpp.
References Position::add(), myP1, and myP2.
Referenced by NBNodeShapeComputer::computeNodeShapeSmall().
void Line::add | ( | const Position & | p | ) |
Definition at line 205 of file Line.cpp.
References Position::add(), myP1, myP2, Position::x(), Position::y(), and Position::z().
SUMOReal Line::atan2Angle | ( | ) | const |
Definition at line 146 of file Line.cpp.
References myP1, myP2, Position::x(), and Position::y().
Referenced by atan2PositiveAngle(), PositionVector::beginEndAngle(), and NBNode::computeSmoothShape().
SUMOReal Line::atan2DegreeAngle | ( | ) | const |
Definition at line 152 of file Line.cpp.
References myP1, myP2, RAD2DEG, Position::x(), and Position::y().
Referenced by NBEdge::checkGeometry(), NBEdge::computeEdgeShape(), NBEdge::computeLaneShape(), NIVissimEdge::dict_checkEdges2Join(), GLHelper::drawTriangleAtEnd(), NBEdge::getAngleAtNode(), NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt(), NBNodeShapeComputer::joinSameDirectionEdges(), and PositionVector::rotationDegreeAtOffset().
SUMOReal Line::atan2DegreeSlope | ( | ) | const |
Definition at line 168 of file Line.cpp.
References Position::distanceTo2D(), myP1, myP2, RAD2DEG, and Position::z().
Referenced by PositionVector::slopeDegreeAtOffset().
SUMOReal Line::atan2PositiveAngle | ( | ) | const |
Definition at line 158 of file Line.cpp.
References atan2Angle(), M_PI, and SUMOReal.
void Line::extrapolateBy | ( | SUMOReal | length | ) |
Definition at line 60 of file Line.cpp.
References Position::add(), Position::distanceTo(), myP1, myP2, Position::sub(), and SUMOReal.
Referenced by PositionVector::appendWithCrossingPoint(), NBEdge::computeLaneShape(), NIImporter_SUMO::reconstructEdgeShape(), and NBEdge::startShapeAt().
void Line::extrapolateBy2D | ( | SUMOReal | length | ) |
Definition at line 69 of file Line.cpp.
References Position::add(), Position::distanceTo2D(), myP1, myP2, Position::sub(), and SUMOReal.
Referenced by NBNodeShapeComputer::computeNodeShapeSmall(), computeSameEnd(), NBNodeShapeComputer::joinSameDirectionEdges(), and PositionVector::move2side().
void Line::extrapolateFirstBy | ( | SUMOReal | length | ) |
Definition at line 78 of file Line.cpp.
References GeomHelper::extrapolate_first(), myP1, and myP2.
Referenced by NBNode::computeSmoothShape().
void Line::extrapolateSecondBy | ( | SUMOReal | length | ) |
Definition at line 84 of file Line.cpp.
References GeomHelper::extrapolate_second(), myP1, and myP2.
Referenced by NBNode::computeSmoothShape().
Definition at line 101 of file Line.cpp.
References Position::distanceTo(), length(), myP1, myP2, SUMOReal, and toString().
Referenced by NBNode::computeSmoothShape(), GLHelper::drawTriangleAtEnd(), MSVehicle::getPosition(), and PositionVector::positionAtOffset().
Definition at line 114 of file Line.cpp.
References Position::distanceTo2D(), length(), myP1, myP2, SUMOReal, and toString().
Referenced by computeSameEnd(), GUIVehicle::computeSeats(), PositionVector::positionAtOffset2D(), and NBEdge::startShapeAt().
Definition at line 180 of file Line.cpp.
References GeomHelper::intersects(), myP1, and myP2.
Referenced by PositionVector::appendWithCrossingPoint(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeSmall(), NBNode::computeSmoothShape(), PositionVector::move2side(), and NIImporter_SUMO::reconstructEdgeShape().
Definition at line 174 of file Line.cpp.
References GeomHelper::intersection_position2D(), myP1, and myP2.
Referenced by PositionVector::appendWithCrossingPoint(), NBEdge::computeLaneShape(), NBNodeShapeComputer::computeNodeShapeSmall(), NBNode::computeSmoothShape(), PositionVector::move2side(), and NIImporter_SUMO::reconstructEdgeShape().
returns distance between myP1 and intersection or -1 if line segments do not intersect
Definition at line 229 of file Line.cpp.
References GeomHelper::intersection_position2D(), myP1, myP2, and GeomHelper::nearest_offset_on_line_to_point2D().
Referenced by PositionVector::appendWithCrossingPoint().
std::vector< SUMOReal > Line::intersectsAtLengths2D | ( | const PositionVector & | v | ) |
Definition at line 135 of file Line.cpp.
References Position::distanceTo2D(), PositionVector::intersectionPoints2D(), myP1, and PositionVector::push_back().
Referenced by NBEdge::startShapeAt().
SUMOReal Line::length | ( | ) | const |
Definition at line 192 of file Line.cpp.
References Position::distanceTo(), myP1, and myP2.
Referenced by NBNode::computeSmoothShape(), GLHelper::drawTriangleAtEnd(), MSVehicle::getPosition(), getPositionAtDistance(), getPositionAtDistance2D(), and NWWriter_OpenDrive::writePlanView().
SUMOReal Line::length2D | ( | ) | const |
Definition at line 186 of file Line.cpp.
References Position::distanceTo2D(), myP1, and myP2.
Referenced by PositionVector::appendWithCrossingPoint(), NBEdge::checkGeometry(), GUIVehicle::computeSeats(), PositionVector::intersectsAtLengths2D(), and NBNodeShapeComputer::joinSameDirectionEdges().
void Line::move2side | ( | SUMOReal | amount | ) |
Definition at line 127 of file Line.cpp.
References Position::add(), GeomHelper::getNormal90D_CW(), myP1, and myP2.
Referenced by PositionVector::positionAtOffset(), and PositionVector::positionAtOffset2D().
const Position & Line::p1 | ( | ) | const |
Definition at line 89 of file Line.cpp.
References myP1.
Referenced by NBNodeShapeComputer::computeNodeShapeSmall(), computeSameEnd(), NBNode::computeSmoothShape(), PositionVector::intersectionPoints2D(), PositionVector::intersectsAtLengths2D(), NBNodeShapeComputer::joinSameDirectionEdges(), NBEdge::startShapeAt(), and NWWriter_OpenDrive::writePlanView().
const Position & Line::p2 | ( | ) | const |
Definition at line 95 of file Line.cpp.
References myP2.
Referenced by NBNode::computeSmoothShape(), NIVissimEdge::dict_checkEdges2Join(), GLHelper::drawTriangleAtEnd(), PositionVector::intersectionPoints2D(), PositionVector::intersectsAtLengths2D(), PositionVector::move2side(), NBEdge::startShapeAt(), and NWWriter_OpenDrive::writePlanView().
Line & Line::reverse | ( | ) |
Definition at line 220 of file Line.cpp.
Referenced by NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt().
void Line::rotateAtP1 | ( | SUMOReal | rot | ) |
Definition at line 237 of file Line.cpp.
References Position::add(), myP1, myP2, Position::reshiftRotate(), and Position::sub().
Referenced by NBNodeShapeComputer::computeNodeShapeSmall(), and NBNode::computeSmoothShape().
Definition at line 212 of file Line.cpp.
References myP1, myP2, and Position::sub().
Referenced by NBNode::computeSmoothShape().
|
friend |
|
private |
Definition at line 88 of file Line.h.
Referenced by add(), atan2Angle(), atan2DegreeAngle(), atan2DegreeSlope(), extrapolateBy(), extrapolateBy2D(), extrapolateFirstBy(), extrapolateSecondBy(), getPositionAtDistance(), getPositionAtDistance2D(), intersects(), intersectsAt(), intersectsAtLength2D(), intersectsAtLengths2D(), length(), length2D(), move2side(), operator<<(), p1(), reverse(), rotateAtP1(), and sub().
|
private |
Definition at line 88 of file Line.h.
Referenced by add(), atan2Angle(), atan2DegreeAngle(), atan2DegreeSlope(), extrapolateBy(), extrapolateBy2D(), extrapolateFirstBy(), extrapolateSecondBy(), getPositionAtDistance(), getPositionAtDistance2D(), intersects(), intersectsAt(), intersectsAtLength2D(), length(), length2D(), move2side(), operator<<(), p2(), reverse(), rotateAtP1(), and sub().