SUMO - Simulation of Urban MObility
|
A list of positions. More...
#include <PositionVector.h>
Data Structures | |
class | as_poly_cw_sorter |
class | increasing_x_y_sorter |
Public Member Functions | |
void | add (SUMOReal xoff, SUMOReal yoff, SUMOReal zoff) |
void | append (const PositionVector &v) |
int | appendWithCrossingPoint (const PositionVector &v) |
SUMOReal | area () const |
Returns the area (0 for non-closed) More... | |
bool | around (const Position &p, SUMOReal offset=0) const |
Returns the information whether the position vector describes a polygon lying around the given point The optional offset is added to the polygon's bounderies. More... | |
SUMOReal | beginEndAngle () const |
void | closePolygon () |
ensures that the last position equals the first More... | |
PositionVector | convexHull () const |
bool | crosses (const Position &p1, const Position &p2) const |
SUMOReal | distance (const Position &p) const |
std::vector< SUMOReal > | distances (const PositionVector &s) const |
void | eraseAt (int i) |
void | extrapolate (SUMOReal val) |
Line | getBegLine () const |
Boundary | getBoxBoundary () const |
Returns a boundary enclosing this list of lines. More... | |
Position | getCentroid () const |
Returns the centroid (closes the polygon if unclosed) More... | |
Line | getEndLine () const |
Position | getLineCenter () const |
Position | getPolygonCenter () const |
Returns the arithmetic of all corner points. More... | |
PositionVector | getSubpart (SUMOReal beginOffset, SUMOReal endOffset) const |
PositionVector | getSubpart2D (SUMOReal beginOffset, SUMOReal endOffset) const |
int | indexOfClosest (const Position &p) const |
void | insertAt (int index, const Position &p) |
int | insertAtClosest (const Position &p) |
PositionVector | intersectionPoints2D (const Line &line) const |
bool | intersects (const Position &p1, const Position &p2) const |
bool | intersects (const PositionVector &v1) const |
std::vector< SUMOReal > | intersectsAtLengths2D (const PositionVector &other) const |
For all intersections between this vector and other, return the 2D-length of the subvector from this vectors start to the intersection. More... | |
std::vector< SUMOReal > | intersectsAtLengths2D (const Line &line) const |
For all intersections between this vector and line, return the 2D-length of the subvector from this vectors start to the intersection. More... | |
Position | intersectsAtPoint (const Position &p1, const Position &p2) const |
Position | intersectsAtPoint (const PositionVector &v1) const |
bool | isClosed () const |
SUMOReal | isLeft (const Position &P0, const Position &P1, const Position &P2) const |
SUMOReal | length () const |
Returns the length. More... | |
SUMOReal | length2D () const |
Returns the length. More... | |
Line | lineAt (int pos) const |
void | move2side (SUMOReal amount) |
SUMOReal | nearest_offset_to_point2D (const Position &p, bool perpendicular=true) const |
bool | operator== (const PositionVector &v2) const |
comparing operation More... | |
const Position & | operator[] (int index) const |
returns the position at the given index !!! exceptions? More... | |
Position & | operator[] (int index) |
bool | overlapsWith (const AbstractPoly &poly, SUMOReal offset=0) const |
Returns the information whether the given polygon overlaps with this Again a boundary may be specified. More... | |
bool | partialWithin (const AbstractPoly &poly, SUMOReal offset=0) const |
Returns the information whether this polygon lies partially within the given polygon. More... | |
Position | pop_front () |
Removes and returns the position at the fron of the list. More... | |
Position | positionAtOffset (SUMOReal pos) const |
Returns the position at the given length. More... | |
Position | positionAtOffset2D (SUMOReal pos) const |
Returns the position at the given length. More... | |
PositionVector () | |
Constructor. More... | |
PositionVector (const std::vector< Position > &v) | |
Constructor. More... | |
void | pruneFromBeginAt (const Position &p) |
void | pruneFromEndAt (const Position &p) |
void | push_back_noDoublePos (const Position &p) |
void | push_front (const Position &p) |
Puts the given position at the front of the list. More... | |
void | push_front_noDoublePos (const Position &p) |
void | removeColinearPoints () |
void | removeDoublePoints (SUMOReal minDist=POSITION_EPS, bool assertLength=false) |
Removes positions if too near. More... | |
void | replaceAt (int index, const Position &by) |
void | reshiftRotate (SUMOReal xoff, SUMOReal yoff, SUMOReal rot) |
PositionVector | reverse () const |
SUMOReal | rotationDegreeAtOffset (SUMOReal pos) const |
Returns the rotation at the given length. More... | |
void | scaleAbsolute (SUMOReal offset) |
enlarges/shrinks the polygon by an absolute offset based at the centroid More... | |
void | scaleRelative (SUMOReal factor) |
enlarges/shrinks the polygon by a factor based at the centroid More... | |
SUMOReal | slopeDegreeAtOffset (SUMOReal pos) const |
Returns the slope at the given length. More... | |
void | sortAsPolyCWByAngle () |
void | sortByIncreasingXY () |
std::pair< PositionVector, PositionVector > | splitAt (SUMOReal where) const |
Returns the two lists made when this list vector is splitted at the given point. More... | |
~PositionVector () | |
Destructor. More... | |
Adding items to the container | |
void | push_back (const PositionVector &p) |
Appends all positions from the given vector. More... | |
Static Public Member Functions | |
static Position | positionAtOffset (const Position &p1, const Position &p2, SUMOReal pos) |
Returns the position between the two given point at the specified position */. More... | |
static Position | positionAtOffset2D (const Position &p1, const Position &p2, SUMOReal pos) |
Returns the position between the two given point at the specified position */. More... | |
Private Types | |
typedef std::vector< Position > | vp |
Friends | |
std::ostream & | operator<< (std::ostream &os, const PositionVector &geom) |
Output operator. More... | |
A list of positions.
Definition at line 53 of file PositionVector.h.
|
private |
Definition at line 56 of file PositionVector.h.
PositionVector::PositionVector | ( | ) |
PositionVector::PositionVector | ( | const std::vector< Position > & | v | ) |
PositionVector::~PositionVector | ( | ) |
Destructor.
Definition at line 68 of file PositionVector.cpp.
Definition at line 495 of file PositionVector.cpp.
Referenced by NBEdge::init(), and NBNode::reshiftPosition().
void PositionVector::append | ( | const PositionVector & | v | ) |
Definition at line 592 of file PositionVector.cpp.
Referenced by NBEdge::append(), NBNode::computeInternalLaneShape(), and NWWriter_OpenDrive::writeNetwork().
int PositionVector::appendWithCrossingPoint | ( | const PositionVector & | v | ) |
Definition at line 569 of file PositionVector.cpp.
References Line::extrapolateBy(), Line::intersects(), Line::intersectsAt(), Line::intersectsAtLength2D(), and Line::length2D().
SUMOReal PositionVector::area | ( | ) | const |
Returns the area (0 for non-closed)
Definition at line 399 of file PositionVector.cpp.
References isClosed(), push_back(), and SUMOReal.
Referenced by getCentroid().
Returns the information whether the position vector describes a polygon lying around the given point The optional offset is added to the polygon's bounderies.
Implements AbstractPoly.
Definition at line 93 of file PositionVector.cpp.
References GeomHelper::Angle2D(), around(), M_PI, scaleAbsolute(), SUMOReal, Position::x(), and Position::y().
Referenced by NIImporter_SUMO::addJunction(), around(), NBEdge::computeAngle(), NBNode::computeNodeShape(), NBNode::getCenter(), and NIVissimTL::NIVissimTLSignal::isWithin().
SUMOReal PositionVector::beginEndAngle | ( | ) | const |
Definition at line 776 of file PositionVector.cpp.
References Line::atan2Angle().
Referenced by NIVissimConnectionCluster::getIncomingContinuation(), NIVissimConnectionCluster::getIncomingContinuationGeometry(), NIVissimConnectionCluster::getOutgoingContinuation(), NIVissimConnectionCluster::getOutgoingContinuationGeometry(), and NIVissimConnectionCluster::same_direction_sorter::operator()().
void PositionVector::closePolygon | ( | ) |
ensures that the last position equals the first
Definition at line 1028 of file PositionVector.cpp.
References push_back().
Referenced by NBNode::getCenter(), and NLHandler::openJunction().
PositionVector PositionVector::convexHull | ( | ) | const |
Definition at line 548 of file PositionVector.cpp.
References simpleHull_2D(), and sortAsPolyCWByAngle().
Implements AbstractPoly.
Definition at line 429 of file PositionVector.cpp.
References intersects().
Definition at line 855 of file PositionVector.cpp.
References GeomHelper::closestDistancePointLine(), max, MIN2(), and SUMOReal.
Referenced by TraCIServerAPI_Lane::StoringVisitor::add(), NIImporter_SUMO::addJunction(), NBEdge::computeAngle(), NBNode::computeNodeShape(), distances(), NBNode::getCenter(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingNearest(), and TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition().
std::vector< SUMOReal > PositionVector::distances | ( | const PositionVector & | s | ) | const |
Definition at line 1037 of file PositionVector.cpp.
References distance().
Referenced by NBEdge::isNearEnough2BeJoined2().
void PositionVector::eraseAt | ( | int | i | ) |
Definition at line 783 of file PositionVector.cpp.
Referenced by NBEdge::checkGeometry(), and NBEdge::startShapeAt().
void PositionVector::extrapolate | ( | SUMOReal | val | ) |
Definition at line 899 of file PositionVector.cpp.
References GeomHelper::extrapolate_first(), GeomHelper::extrapolate_second(), push_back(), and push_front().
Referenced by NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
Line PositionVector::getBegLine | ( | ) | const |
Definition at line 1016 of file PositionVector.cpp.
References lineAt().
Referenced by NBEdge::checkGeometry(), NBNode::computeInternalLaneShape(), NBEdge::getAngleAtNode(), NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt(), and NBEdge::startShapeAt().
Boundary PositionVector::getBoxBoundary | ( | ) | const |
Returns a boundary enclosing this list of lines.
Definition at line 296 of file PositionVector.cpp.
References Boundary::add().
Referenced by TraCIServer::collectObjectsInRange(), GUIPolygon::drawGL(), MSLane::fill(), GUIPolygon::getCenteringBoundary(), GUIBusStop::getCenteringBoundary(), GUIJunctionWrapper::GUIJunctionWrapper(), NBEdgeCont::ignoreFilterMatch(), PCPolyContainer::insert(), NIImporter_OpenDrive::loadNetwork(), NIVissimConnectionCluster::recomputeBoundary(), and NIVissimNodeDef_Poly::searchAndSetConnections().
Position PositionVector::getCentroid | ( | ) | const |
Returns the centroid (closes the polygon if unclosed)
Definition at line 318 of file PositionVector.cpp.
References area(), isClosed(), length(), push_back(), and SUMOReal.
Referenced by NBEdge::computeAngle(), scaleAbsolute(), and scaleRelative().
Line PositionVector::getEndLine | ( | ) | const |
Definition at line 1022 of file PositionVector.cpp.
References lineAt().
Referenced by NBEdge::checkGeometry(), NBNode::computeInternalLaneShape(), NBEdge::getAngleAtNode(), and NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt().
Position PositionVector::getLineCenter | ( | ) | const |
Definition at line 371 of file PositionVector.cpp.
References length(), positionAtOffset(), and SUMOReal.
Referenced by GUIBusStop::GUIBusStop().
Position PositionVector::getPolygonCenter | ( | ) | const |
Returns the arithmetic of all corner points.
Definition at line 306 of file PositionVector.cpp.
References SUMOReal.
Referenced by NIVissimNodeCluster::buildNBNode(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), GUIPolygon::drawGL(), and NBNode::getCenter().
PositionVector PositionVector::getSubpart | ( | SUMOReal | beginOffset, |
SUMOReal | endOffset | ||
) | const |
Definition at line 602 of file PositionVector.cpp.
References length(), POSITION_EPS, positionAtOffset(), push_back(), push_back_noDoublePos(), and SUMOReal.
Referenced by NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), GUIBusStop::GUIBusStop(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), and NWWriter_SUMO::writeLane().
PositionVector PositionVector::getSubpart2D | ( | SUMOReal | beginOffset, |
SUMOReal | endOffset | ||
) | const |
Definition at line 644 of file PositionVector.cpp.
References length(), POSITION_EPS, positionAtOffset2D(), push_back(), push_back_noDoublePos(), and SUMOReal.
Referenced by NIImporter_OpenDrive::loadNetwork(), and NBEdge::startShapeAt().
Definition at line 820 of file PositionVector.cpp.
References Position::distanceTo(), max, and SUMOReal.
Definition at line 1051 of file PositionVector.cpp.
Referenced by NBEdge::addGeometryPoint(), insertAtClosest(), and NBNetBuilder::transformCoordinates().
Definition at line 837 of file PositionVector.cpp.
References GeomHelper::closestDistancePointLine(), insertAt(), max, and SUMOReal.
PositionVector PositionVector::intersectionPoints2D | ( | const Line & | line | ) | const |
Returns any intersection Points with the given line (ignoring z-coordinates)
Definition at line 556 of file PositionVector.cpp.
References GeomHelper::intersection_position2D(), GeomHelper::intersects(), Line::p1(), Line::p2(), and push_back_noDoublePos().
Referenced by Line::intersectsAtLengths2D().
Returns the information whether this list of points interesects the given line
Definition at line 132 of file PositionVector.cpp.
References GeomHelper::intersects().
Referenced by computeSameEnd(), crosses(), NIVissimAbstractEdge::crossesEdge(), GeomHelper::crossPoint(), intersects(), intersectsAtPoint(), NIVissimConnectionCluster::isWeakDistrictConnRealisation(), and NBEdge::startShapeAt().
bool PositionVector::intersects | ( | const PositionVector & | v1 | ) | const |
Returns the information whether this list of points interesects one the given lines
Definition at line 147 of file PositionVector.cpp.
References intersects().
std::vector< SUMOReal > PositionVector::intersectsAtLengths2D | ( | const PositionVector & | other | ) | const |
For all intersections between this vector and other, return the 2D-length of the subvector from this vectors start to the intersection.
Definition at line 870 of file PositionVector.cpp.
Referenced by NBEdge::buildInnerEdges(), computeSameEnd(), MSLink::setRequestInformation(), and NBEdge::startShapeAt().
For all intersections between this vector and line, return the 2D-length of the subvector from this vectors start to the intersection.
Definition at line 881 of file PositionVector.cpp.
References Position::distanceTo2D(), GeomHelper::intersection_position2D(), GeomHelper::intersects(), Line::length2D(), Line::p1(), Line::p2(), and SUMOReal.
Returns the position of the intersection
Definition at line 162 of file PositionVector.cpp.
References GeomHelper::intersection_position2D(), and GeomHelper::intersects().
Referenced by NIVissimAbstractEdge::crossesEdgeAtPoint(), GeomHelper::crossPoint(), and intersectsAtPoint().
Position PositionVector::intersectsAtPoint | ( | const PositionVector & | v1 | ) | const |
Returns the position of the intersection
Definition at line 174 of file PositionVector.cpp.
References intersects(), and intersectsAtPoint().
bool PositionVector::isClosed | ( | ) | const |
Definition at line 1089 of file PositionVector.cpp.
Referenced by area(), and getCentroid().
SUMOReal PositionVector::isLeft | ( | const Position & | P0, |
const Position & | P1, | ||
const Position & | P2 | ||
) | const |
Definition at line 541 of file PositionVector.cpp.
References Position::x(), and Position::y().
SUMOReal PositionVector::length | ( | ) | const |
Returns the length.
Definition at line 380 of file PositionVector.cpp.
References SUMOReal.
Referenced by NIXMLEdgesHandler::addSplit(), NBEdge::buildInnerEdges(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBEdge::computeAngle(), NBNodeShapeComputer::computeContinuationNodeShape(), NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NIVissimEdge::dict_checkEdges2Join(), GUIEdge::drawGL(), getCentroid(), NIVissimAbstractEdge::getGeomPosition(), NWWriter_DlrNavteq::getGraphLength(), NIVissimEdge::getLength(), getLineCenter(), getSubpart(), getSubpart2D(), NIVissimEdge::getToNode(), GUIBusStop::GUIBusStop(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), NIXMLEdgesHandler::myEndElement(), NBContHelper::relative_incoming_edge_sorter::operator()(), pruneFromEndAt(), NIVissimEdge::resolveSameNode(), splitAt(), NBEdgeCont::splitAt(), NBEdge::startShapeAt(), NWWriter_SUMO::writeEdge(), NWWriter_SUMO::writeLane(), and NWWriter_OpenDrive::writeNetwork().
SUMOReal PositionVector::length2D | ( | ) | const |
Returns the length.
Definition at line 389 of file PositionVector.cpp.
References SUMOReal.
Referenced by NBEdge::computeAngle(), and NIImporter_OpenDrive::loadNetwork().
Definition at line 1009 of file PositionVector.cpp.
Referenced by NBEdge::checkGeometry(), computeSameEnd(), getBegLine(), getEndLine(), NBNodeShapeComputer::joinSameDirectionEdges(), and NWWriter_OpenDrive::writePlanView().
void PositionVector::move2side | ( | SUMOReal | amount | ) |
Definition at line 924 of file PositionVector.cpp.
References GeomHelper::Angle2D(), Position::distanceTo2D(), Line::extrapolateBy(), GeomHelper::getNormal90D_CW(), Line::intersects(), Line::intersectsAt(), POSITION_EPS, push_back(), Position::x(), Position::y(), and Position::z().
Referenced by GUIVehicle::drawBestLanes(), NBEdge::getCCWBoundaryLine(), NBEdge::getCWBoundaryLine(), MSPerson::MSPersonStage::getEdgePosition(), MSVehicle::getPosition(), GUIBusStop::GUIBusStop(), NBRampsComputer::moveRampRight(), NIXMLEdgesHandler::myEndElement(), NBSign::writeAsPOI(), and NWWriter_OpenDrive::writeNetwork().
SUMOReal PositionVector::nearest_offset_to_point2D | ( | const Position & | p, |
bool | perpendicular = true |
||
) | const |
Definition at line 793 of file PositionVector.cpp.
References Position::distanceTo2D(), max, GeomHelper::nearest_offset_on_line_to_point2D(), and SUMOReal.
Referenced by GUILane::getPopUpMenu(), NBNodeShapeComputer::replaceFirstChecking(), NBNodeShapeComputer::replaceLastChecking(), NBEdgeCont::splitAt(), and TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition().
bool PositionVector::operator== | ( | const PositionVector & | v2 | ) | const |
comparing operation
Definition at line 1127 of file PositionVector.cpp.
returns the position at the given index !!! exceptions?
Definition at line 190 of file PositionVector.cpp.
Definition at line 200 of file PositionVector.cpp.
|
virtual |
Returns the information whether the given polygon overlaps with this Again a boundary may be specified.
Implements AbstractPoly.
Definition at line 121 of file PositionVector.cpp.
References AbstractPoly::around().
Referenced by NIVissimAbstractEdge::overlapsWith().
|
virtual |
Returns the information whether this polygon lies partially within the given polygon.
Implements AbstractPoly.
Definition at line 418 of file PositionVector.cpp.
References AbstractPoly::around().
Position PositionVector::pop_front | ( | ) |
Removes and returns the position at the fron of the list.
Definition at line 85 of file PositionVector.cpp.
Referenced by NBRampsComputer::buildOffRamp(), and NBEdge::getInnerGeometry().
Returns the position at the given length.
Definition at line 210 of file PositionVector.cpp.
References SUMOReal.
Referenced by NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), TraCIServerAPI_Simulation::commandPositionConversion(), GUIEdge::drawGL(), MSVTypeProbe::execute(), MSLane::geometryPositionAtOffset(), MSVehicle::getAngle(), MSPerson::MSPersonStage::getEdgePosition(), NIVissimAbstractEdge::getGeomPosition(), getLineCenter(), TraCIServerAPI_InductionLoop::getPosition(), MSVehicle::getPosition(), MSVTKExport::getSpeed(), getSubpart(), TraCIServerAPI_InductionLoop::getTree(), GUICalibrator::GUICalibrator(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), NIImporter_OpenDrive::loadNetwork(), NIXMLEdgesHandler::myEndElement(), NIImporter_VISUM::parse_Lanes(), pruneFromBeginAt(), pruneFromEndAt(), MSEmissionExport::write(), NBSign::writeAsPOI(), and MSFullExport::writeVehicles().
|
static |
Returns the position between the two given point at the specified position */.
Definition at line 272 of file PositionVector.cpp.
References Position::distanceTo(), and SUMOReal.
Returns the position at the given length.
Definition at line 225 of file PositionVector.cpp.
References SUMOReal.
Referenced by NBEdge::computeAngle(), NBNodeShapeComputer::computeContinuationNodeShape(), GUIVehicle::drawAction_drawRailCarriages(), getSubpart2D(), NBContHelper::relative_outgoing_edge_sorter::operator()(), NBContHelper::relative_incoming_edge_sorter::operator()(), NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
|
static |
Returns the position between the two given point at the specified position */.
Definition at line 284 of file PositionVector.cpp.
References Position::distanceTo2D(), and SUMOReal.
void PositionVector::pruneFromBeginAt | ( | const Position & | p | ) |
Definition at line 686 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), GeomHelper::extrapolate_first(), GeomHelper::nearest_offset_on_line_to_point2D(), positionAtOffset(), and SUMOReal.
void PositionVector::pruneFromEndAt | ( | const Position & | p | ) |
Definition at line 730 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), GeomHelper::extrapolate_second(), length(), GeomHelper::nearest_offset_on_line_to_point2D(), positionAtOffset(), push_back(), and SUMOReal.
void PositionVector::push_back | ( | const PositionVector & | p | ) |
Appends all positions from the given vector.
[in] | p | The vector from which values shall be appended |
Definition at line 73 of file PositionVector.cpp.
Referenced by NBEdgeCont::applyOptions(), area(), NIVissimConnection::buildGeom(), NBRampsComputer::buildOnRamp(), closePolygon(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NBNode::computeNodeShape(), GUIVehicle::computeSeats(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), extrapolate(), TraCIServer::findObjectShape(), getCentroid(), NIVissimAbstractEdge::getGeomPosition(), TraCIServerAPI_Edge::getShape(), TraCIServerAPI_Polygon::getShape(), TraCIServerAPI_Lane::getShape(), SUMOSAXAttributesImpl_Xerces::getShape(), getSubpart(), getSubpart2D(), GUIVehicle::GUIVehicle(), NBEdge::init(), Line::intersectsAtLengths2D(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), move2side(), PCLoaderXML::myStartElement(), NIVissimSingleTypeParser_Laengenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Knotendefinition::parse(), NIVissimSingleTypeParser_Zeitenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition::parse(), NIImporter_VISUM::parse_AreaSubPartElement(), GeomConvHelper::parseShapeReporting(), ODMatrix::parseTimeLine(), pruneFromEndAt(), push_back_noDoublePos(), TraCIServer::readTypeCheckingPolygon(), NIImporter_SUMO::reconstructEdgeShape(), NIImporter_DlrNavteq::NodesHandler::report(), NIImporter_DlrNavteq::EdgesHandler::report(), reverse(), NBEdge::setGeometry(), splitAt(), NBEdge::splitGeometry(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().
void PositionVector::push_back_noDoublePos | ( | const Position & | p | ) |
Definition at line 1073 of file PositionVector.cpp.
References Position::almostSame(), and push_back().
Referenced by NIImporter_SUMO::addJunction(), NIVissimNodeCluster::buildNBNode(), NBNodeShapeComputer::computeContinuationNodeShape(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), NIImporter_OpenDrive::computeShapes(), NWWriter_DlrNavteq::getGraphLength(), getSubpart(), getSubpart2D(), NBEdge::init(), NIImporter_OpenStreetMap::insertEdge(), intersectionPoints2D(), PCLoaderArcView::load(), NIImporter_ArcView::load(), PCLoaderOSM::loadIfSet(), NIVissimAbstractEdge::NIVissimAbstractEdge(), NIVissimSingleTypeParser_Streckendefinition::parse(), NIVissimSingleTypeParser_Verbindungsdefinition::parse(), NBNodeShapeComputer::replaceLastChecking(), simpleHull_2D(), and NWWriter_SUMO::writeEdge().
void PositionVector::push_front | ( | const Position & | p | ) |
Puts the given position at the front of the list.
Definition at line 79 of file PositionVector.cpp.
Referenced by NBRampsComputer::buildOffRamp(), extrapolate(), NBEdge::init(), NIImporter_DlrNavteq::EdgesHandler::report(), and NBEdge::setGeometry().
void PositionVector::push_front_noDoublePos | ( | const Position & | p | ) |
Definition at line 1081 of file PositionVector.cpp.
References Position::almostSame().
Referenced by NBNodeShapeComputer::computeContinuationNodeShape(), NWWriter_DlrNavteq::getGraphLength(), NBEdge::init(), NBNodeShapeComputer::replaceFirstChecking(), NBEdge::startShapeAt(), and NWWriter_SUMO::writeEdge().
void PositionVector::removeColinearPoints | ( | ) |
Definition at line 1111 of file PositionVector.cpp.
References GeomHelper::distancePointLine().
void PositionVector::removeDoublePoints | ( | SUMOReal | minDist = POSITION_EPS , |
bool | assertLength = false |
||
) |
Removes positions if too near.
[in] | minDist | The minimum accepted distance; default: POSITION_EPS |
[in] | assertLength | Whether the result must at least contain two points (be a line); default: false, to ensure original behaviour |
Definition at line 1095 of file PositionVector.cpp.
Referenced by NIImporter_OpenDrive::computeShapes(), NBEdge::init(), and NBEdge::reduceGeometry().
Definition at line 1061 of file PositionVector.cpp.
Referenced by computeSameEnd(), NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
Definition at line 503 of file PositionVector.cpp.
Referenced by NBDistrict::reshiftPosition(), and NBEdge::reshiftPosition().
PositionVector PositionVector::reverse | ( | ) | const |
Definition at line 914 of file PositionVector.cpp.
References push_back().
Referenced by NBNodeShapeComputer::computeContinuationNodeShape(), NBEdge::computeEdgeShape(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_ArcView::load(), NIImporter_OpenDrive::loadNetwork(), NIImporter_VISUM::parse_AreaSubPartElement(), and NIImporter_DlrNavteq::EdgesHandler::report().
Returns the rotation at the given length.
Definition at line 240 of file PositionVector.cpp.
References Line::atan2DegreeAngle(), and SUMOReal.
Referenced by GUIE3Collector::MyWrapper::buildDefinition(), GUIEdge::drawGL(), MSVehicle::getAngle(), MSPerson::MSPersonStage::getEdgeAngle(), GUIBusStop::GUIBusStop(), GUICalibrator::GUICalibrator(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), GUIInstantInductLoop::MyWrapper::MyWrapper(), and GUIInductLoop::MyWrapper::MyWrapper().
void PositionVector::scaleAbsolute | ( | SUMOReal | offset | ) |
enlarges/shrinks the polygon by an absolute offset based at the centroid
Definition at line 362 of file PositionVector.cpp.
References getCentroid().
Referenced by around().
void PositionVector::scaleRelative | ( | SUMOReal | factor | ) |
enlarges/shrinks the polygon by a factor based at the centroid
Definition at line 353 of file PositionVector.cpp.
References getCentroid().
Returns the slope at the given length.
Definition at line 256 of file PositionVector.cpp.
References Line::atan2DegreeSlope(), and SUMOReal.
Referenced by MSVehicle::getSlope(), MSCFModel_KraussPS::maxNextSpeed(), and MSFCDExport::write().
void PositionVector::sortAsPolyCWByAngle | ( | ) |
Definition at line 489 of file PositionVector.cpp.
Referenced by convexHull().
void PositionVector::sortByIncreasingXY | ( | ) |
Definition at line 519 of file PositionVector.cpp.
std::pair< PositionVector, PositionVector > PositionVector::splitAt | ( | SUMOReal | where | ) | const |
Returns the two lists made when this list vector is splitted at the given point.
Definition at line 435 of file PositionVector.cpp.
References length(), POSITION_EPS, push_back(), SUMOReal, toString(), and WRITE_WARNING.
Referenced by NBEdge::buildInnerEdges(), and NBEdgeCont::splitAt().
|
friend |
Output operator.
Definition at line 477 of file PositionVector.cpp.