|
SUMO - Simulation of Urban MObility
|
A list of 2D-positions. More...
#include <PositionVector.h>
Data Structures | |
| class | as_poly_cw_sorter |
| class | increasing_x_y_sorter |
Public Types | |
| typedef std::deque< Position > | ContType |
| Definition of the list of points. | |
Public Member Functions | |
| int | appendWithCrossingPoint (const PositionVector &v) |
| SUMOReal | area () const |
| Returns the area (0 for non-closed) | |
| 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. | |
| SUMOReal | beginEndAngle () const |
| void | clear () |
| Removes all information from this list. | |
| void | closePolygon () |
| PositionVector | convexHull () const |
| bool | crosses (const Position &p1, const Position &p2) const |
| SUMOReal | distance (const Position &p) const |
| DoubleVector | distances (const PositionVector &s) const |
| void | eraseAt (int i) |
| void | extrapolate (SUMOReal val) |
| const Position & | getBegin () const |
| Returns the first position. | |
| Line | getBegLine () const |
| Boundary | getBoxBoundary () const |
| Returns a boundary enclosing this list of lines. | |
| Position | getCentroid () const |
| Returns the centroid (closes the polygon if unclosed) | |
| const ContType & | getCont () const |
| const Position & | getEnd () const |
| Returns the last position. | |
| Line | getEndLine () const |
| Position | getLineCenter () const |
| Position | getPolygonCenter () const |
| Returns the arithmetic of all corner points. | |
| PositionVector | getSubpart (SUMOReal begin, SUMOReal end) const |
| int | indexOfClosest (const Position &p) const |
| void | insertAt (int index, const Position &p) |
| void | insertAtClosest (const Position &p) |
| bool | intersects (const PositionVector &v1) const |
| bool | intersects (const Position &p1, const Position &p2) const |
| DoubleVector | intersectsAtLengths (const PositionVector &s) const |
| DoubleVector | intersectsAtLengths (const Line &s) const |
| Position | intersectsAtPoint (const Position &p1, const Position &p2) const |
| Position | intersectsAtPoint (const PositionVector &v1) const |
| PositionVector | intersectsAtPoints (const Position &p1, const Position &p2) const |
| bool | isClosed () const |
| SUMOReal | isLeft (const Position &P0, const Position &P1, const Position &P2) const |
| SUMOReal | length () const |
| Returns the length. | |
| Line | lineAt (size_t pos) const |
| void | move2side (SUMOReal amount) |
| void | move2side (SUMOReal amount, int index) |
| SUMOReal | nearest_position_on_line_to_point (const Position &p, bool perpendicular=true) const |
| bool | operator== (const PositionVector &v2) const |
| comparing operation | |
| const Position & | operator[] (int index) const |
| returns the position at the given index !!! exceptions? | |
| 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. | |
| bool | partialWithin (const AbstractPoly &poly, SUMOReal offset=0) const |
| Returns the information whether this polygon lies partially within the given polygon. | |
| Position | pop_back () |
| Position | pop_front () |
| Position | positionAtLengthPosition (SUMOReal pos) const |
| Returns the position at the given length. | |
| PositionVector () throw () | |
| Constructor. | |
| PositionVector (const std::vector< Position > &v) throw () | |
| Constructor. | |
| 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 begin of the list. | |
| void | push_front_noDoublePos (const Position &p) |
| void | removeColinearPoints () |
| void | removeDoublePoints () |
| void | replaceAt (size_t index, const Position &by) |
| void | reshiftRotate (SUMOReal xoff, SUMOReal yoff, SUMOReal rot) |
| PositionVector | reverse () const |
| SUMOReal | rotationDegreeAtLengthPosition (SUMOReal pos) const |
| Returns the position at the given length. | |
| void | scaleSize (SUMOReal factor) |
| enlarges/shrinks the polygon based at the centroid | |
| void | set (size_t pos, const Position &p) |
| size_t | size () const |
| returns the number of points making up the line vector | |
| 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. | |
| ~PositionVector () throw () | |
| Destructor. | |
Adding items to the container | |
| void | push_back (const Position &p) throw () |
| Appends the given position to the list. | |
| void | push_back (const PositionVector &p) throw () |
| Appends all positions from the given vector. | |
Static Public Member Functions | |
| static Position | positionAtLengthPosition (const Position &p1, const Position &p2, SUMOReal pos) |
| Returns the position between the two given point at the specified position */. | |
Private Attributes | |
| ContType | myCont |
| The list of points. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const PositionVector &geom) |
| Output operator. | |
A list of 2D-positions.
Definition at line 49 of file PositionVector.h.
| typedef std::deque<Position> PositionVector::ContType |
Definition of the list of points.
Definition at line 53 of file PositionVector.h.
| PositionVector::PositionVector | ( | ) | throw () |
| PositionVector::PositionVector | ( | const std::vector< Position > & | v | ) | throw () |
| PositionVector::~PositionVector | ( | ) | throw () |
Destructor.
Definition at line 63 of file PositionVector.cpp.
| int PositionVector::appendWithCrossingPoint | ( | const PositionVector & | v | ) |
Definition at line 528 of file PositionVector.cpp.
References Line::extrapolateBy(), and myCont.
Referenced by NBEdge::append(), NBNode::computeInternalLaneShape(), and NWWriter_OpenDrive::writeNetwork().
| SUMOReal PositionVector::area | ( | ) | const |
Returns the area (0 for non-closed)
Definition at line 345 of file PositionVector.cpp.
References isClosed(), push_back(), size(), 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 86 of file PositionVector.cpp.
References GeomHelper::Angle2D(), myCont, PI, SUMOReal, Position::x(), and Position::y().
Referenced by NIImporter_SUMO::addJunction(), and NIVissimTL::NIVissimTLSignal::isWithin().
| SUMOReal PositionVector::beginEndAngle | ( | ) | const |
Definition at line 683 of file PositionVector.cpp.
References Line::atan2Angle(), getBegin(), and getEnd().
Referenced by NIVissimConnectionCluster::getIncomingContinuation(), NIVissimConnectionCluster::getIncomingContinuationGeometry(), NIVissimConnectionCluster::getOutgoingContinuation(), NIVissimConnectionCluster::getOutgoingContinuationGeometry(), and NIVissimConnectionCluster::same_direction_sorter::operator()().
| void PositionVector::clear | ( | ) |
Removes all information from this list.
Definition at line 181 of file PositionVector.cpp.
References myCont.
Referenced by PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), and NBEdge::splitGeometry().
| void PositionVector::closePolygon | ( | ) |
Definition at line 972 of file PositionVector.cpp.
References myCont, and push_back().
| PositionVector PositionVector::convexHull | ( | ) | const |
Definition at line 500 of file PositionVector.cpp.
References simpleHull_2D(), and sortAsPolyCWByAngle().
Implements AbstractPoly.
Definition at line 376 of file PositionVector.cpp.
References intersects().
| SUMOReal PositionVector::distance | ( | const Position & | p | ) | const |
Definition at line 756 of file PositionVector.cpp.
References GeomHelper::closestDistancePointLine(), max, MIN2(), myCont, and SUMOReal.
Referenced by NIImporter_SUMO::addJunction(), and distances().
| DoubleVector PositionVector::distances | ( | const PositionVector & | s | ) | const |
Definition at line 981 of file PositionVector.cpp.
References distance(), and myCont.
Referenced by NBEdge::isNearEnough2BeJoined2().
| void PositionVector::eraseAt | ( | int | i | ) |
Definition at line 690 of file PositionVector.cpp.
References myCont.
Referenced by NBEdge::computeEdgeShape().
| void PositionVector::extrapolate | ( | SUMOReal | val | ) |
Definition at line 801 of file PositionVector.cpp.
References GeomHelper::extrapolate_first(), GeomHelper::extrapolate_second(), myCont, push_back(), and push_front().
Referenced by NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
| const Position & PositionVector::getBegin | ( | ) | const |
Returns the first position.
Definition at line 383 of file PositionVector.cpp.
References myCont.
Referenced by beginEndAngle(), GUIE3Collector::MyWrapper::buildDefinition(), NBNode::computeInternalLaneShape(), NIVissimAbstractEdge::crossesAtPoint(), NIVissimEdge::dict_checkEdges2Join(), NIVissimEdge::getFromNode(), NIVissimConnectionCluster::getPositionForEdge(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouter(), NBEdge::hasDefaultGeometryEndpoints(), NIVissimConnectionCluster::isWeakDistrictConnRealisation(), PCLoaderOSM::loadIfSet(), PCLoaderDlrNavteq::loadPolyFile(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), NIVissimEdge::resolveSameNode(), and splitAt().
| Line PositionVector::getBegLine | ( | ) | const |
Definition at line 960 of file PositionVector.cpp.
References lineAt().
Referenced by NBNode::computeInternalLaneShape(), and NBEdge::getAngle().
| Boundary PositionVector::getBoxBoundary | ( | ) | const |
Returns a boundary enclosing this list of lines.
Definition at line 260 of file PositionVector.cpp.
References Boundary::add(), and myCont.
Referenced by GUIPolygon::getCenteringBoundary(), GUIBusStop::getCenteringBoundary(), NIImporter_OpenDrive::loadNetwork(), NIVissimConnectionCluster::recomputeBoundary(), and NIVissimNodeDef_Poly::searchAndSetConnections().
| Position PositionVector::getCentroid | ( | ) | const |
Returns the centroid (closes the polygon if unclosed)
Definition at line 282 of file PositionVector.cpp.
References area(), isClosed(), length(), push_back(), size(), and SUMOReal.
Referenced by scaleSize().
| const ContType& PositionVector::getCont | ( | ) | const [inline] |
Definition at line 194 of file PositionVector.h.
References myCont.
Referenced by PCLoaderXML::myCharacters(), and NIVissimAbstractEdge::NIVissimAbstractEdge().
| const Position & PositionVector::getEnd | ( | ) | const |
Returns the last position.
Definition at line 389 of file PositionVector.cpp.
References myCont.
Referenced by beginEndAngle(), GUIE3Collector::MyWrapper::buildDefinition(), NBEdge::buildInnerEdges(), NBNode::computeInternalLaneShape(), NIVissimAbstractEdge::crossesAtPoint(), NIVissimEdge::dict_checkEdges2Join(), NIVissimConnectionCluster::getPositionForEdge(), NIVissimEdge::getToNode(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouter(), NBEdge::hasDefaultGeometryEndpoints(), NIVissimConnectionCluster::isWeakDistrictConnRealisation(), PCLoaderOSM::loadIfSet(), PCLoaderDlrNavteq::loadPolyFile(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), NIVissimEdge::resolveSameNode(), GUILaneWrapper::ROWdrawAction_drawArrows(), GUILaneWrapper::ROWdrawAction_drawLinkNo(), GUILaneWrapper::ROWdrawAction_drawLinkRules(), GUILaneWrapper::ROWdrawAction_drawTLSLinkNo(), and splitAt().
| Line PositionVector::getEndLine | ( | ) | const |
Definition at line 966 of file PositionVector.cpp.
References lineAt(), and myCont.
Referenced by NBNode::computeInternalLaneShape(), and NBEdge::getAngle().
| Position PositionVector::getLineCenter | ( | ) | const |
Definition at line 326 of file PositionVector.cpp.
References length(), myCont, positionAtLengthPosition(), and SUMOReal.
Referenced by GUIBusStop::GUIBusStop().
| Position PositionVector::getPolygonCenter | ( | ) | const |
Returns the arithmetic of all corner points.
Definition at line 270 of file PositionVector.cpp.
References myCont, and SUMOReal.
Referenced by NIVissimNodeCluster::buildNBNode(), and NIVissimDistrictConnection::dict_BuildDistrictNodes().
| PositionVector PositionVector::getSubpart | ( | SUMOReal | begin, |
| SUMOReal | end | ||
| ) | const |
Definition at line 551 of file PositionVector.cpp.
References length(), myCont, POSITION_EPS, positionAtLengthPosition(), push_back(), push_back_noDoublePos(), and SUMOReal.
Referenced by NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), and NWWriter_SUMO::writeLane().
| int PositionVector::indexOfClosest | ( | const Position & | p | ) | const |
Definition at line 722 of file PositionVector.cpp.
References Position::distanceTo(), max, myCont, size(), and SUMOReal.
| void PositionVector::insertAt | ( | int | index, |
| const Position & | p | ||
| ) |
Definition at line 1011 of file PositionVector.cpp.
References myCont.
Referenced by insertAtClosest(), and NILoader::transformCoordinates().
| void PositionVector::insertAtClosest | ( | const Position & | p | ) |
Definition at line 739 of file PositionVector.cpp.
References GeomHelper::closestDistancePointLine(), insertAt(), max, myCont, size(), and SUMOReal.
Returns the information whether this list of points interesects the given line
Definition at line 123 of file PositionVector.cpp.
References GeomHelper::intersects(), myCont, and size().
Referenced by NBEdge::buildInnerEdges(), NBEdge::computeEdgeShape(), computeSameEnd(), crosses(), NIVissimAbstractEdge::crossesEdge(), GeomHelper::crossPoint(), intersects(), intersectsAtPoint(), and NIVissimConnectionCluster::isWeakDistrictConnRealisation().
| bool PositionVector::intersects | ( | const PositionVector & | v1 | ) | const |
Returns the information whether this list of points interesects one the given lines
Definition at line 138 of file PositionVector.cpp.
References intersects(), myCont, and size().
| DoubleVector PositionVector::intersectsAtLengths | ( | const Line & | s | ) | const |
Definition at line 783 of file PositionVector.cpp.
References Position::distanceTo(), GeomHelper::intersection_position(), GeomHelper::intersects(), Line::length(), myCont, Line::p1(), Line::p2(), and SUMOReal.
| DoubleVector PositionVector::intersectsAtLengths | ( | const PositionVector & | s | ) | const |
Definition at line 768 of file PositionVector.cpp.
References Line::intersectsAtLengths(), Line::length(), myCont, and SUMOReal.
Referenced by NBEdge::buildInnerEdges(), NBEdge::computeEdgeShape(), and computeSameEnd().
Returns the position of the intersection
Definition at line 153 of file PositionVector.cpp.
References GeomHelper::intersection_position(), GeomHelper::intersects(), and myCont.
Referenced by NIVissimAbstractEdge::crossesEdgeAtPoint(), GeomHelper::crossPoint(), and intersectsAtPoint().
| Position PositionVector::intersectsAtPoint | ( | const PositionVector & | v1 | ) | const |
Returns the position of the intersection
Definition at line 165 of file PositionVector.cpp.
References intersects(), intersectsAtPoint(), and myCont.
| PositionVector PositionVector::intersectsAtPoints | ( | const Position & | p1, |
| const Position & | p2 | ||
| ) | const |
Definition at line 515 of file PositionVector.cpp.
References GeomHelper::intersection_position(), GeomHelper::intersects(), myCont, and push_back_noDoublePos().
Referenced by Line::intersectsAtLengths().
| bool PositionVector::isClosed | ( | ) | const |
Definition at line 1044 of file PositionVector.cpp.
References myCont.
Referenced by area(), and getCentroid().
| SUMOReal PositionVector::isLeft | ( | const Position & | P0, |
| const Position & | P1, | ||
| const Position & | P2 | ||
| ) | const |
Definition at line 493 of file PositionVector.cpp.
References Position::x(), and Position::y().
| SUMOReal PositionVector::length | ( | ) | const |
Returns the length.
Definition at line 335 of file PositionVector.cpp.
References myCont, and SUMOReal.
Referenced by NIXMLEdgesHandler::addSplit(), NBEdge::buildInnerEdges(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), NBNodeShapeComputer::computeContinuationNodeShape(), NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NIVissimEdge::dict_checkEdges2Join(), GUIEdge::drawGL(), getCentroid(), NIVissimAbstractEdge::getGeomPosition(), NIVissimEdge::getLength(), getLineCenter(), NBEdge::getMaxLaneOffsetPositionAt(), NBEdge::getMinLaneOffsetPositionAt(), getSubpart(), NIVissimEdge::getToNode(), GUIBusStop::GUIBusStop(), GUITriggeredRerouter::GUITriggeredRerouter(), NIXMLEdgesHandler::myEndElement(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), pruneFromEndAt(), NIVissimEdge::resolveSameNode(), splitAt(), NWWriter_SUMO::writeInternalEdge(), NWWriter_SUMO::writeLane(), and NWWriter_OpenDrive::writeNetwork().
| Line PositionVector::lineAt | ( | size_t | pos | ) | const |
Definition at line 953 of file PositionVector.cpp.
References myCont.
Referenced by computeSameEnd(), getBegLine(), getEndLine(), NBNodeShapeComputer::joinSameDirectionEdges(), and NWWriter_OpenDrive::writePlanView().
| void PositionVector::move2side | ( | SUMOReal | amount | ) |
Definition at line 864 of file PositionVector.cpp.
References GeomHelper::Angle2D(), Position::distanceTo(), Line::extrapolateBy(), GeomHelper::getNormal90D_CW(), Line::intersects(), Line::intersectsAt(), myCont, POSITION_EPS, push_back(), Position::x(), and Position::y().
Referenced by NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), GUIVehicle::drawBestLanes(), NBEdge::getCCWBoundaryLine(), NBEdge::getCWBoundaryLine(), GUIBusStop::GUIBusStop(), and NIXMLEdgesHandler::myEndElement().
| void PositionVector::move2side | ( | SUMOReal | amount, |
| int | index | ||
| ) |
Definition at line 826 of file PositionVector.cpp.
References Line::extrapolateBy(), GeomHelper::getNormal90D_CW(), Line::intersects(), Line::intersectsAt(), myCont, Position::x(), and Position::y().
| SUMOReal PositionVector::nearest_position_on_line_to_point | ( | const Position & | p, |
| bool | perpendicular = true |
||
| ) | const |
Definition at line 700 of file PositionVector.cpp.
References Position::distanceTo(), myCont, positionAtLengthPosition(), and SUMOReal.
Referenced by pruneFromBeginAt(), pruneFromEndAt(), NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
| bool PositionVector::operator== | ( | const PositionVector & | v2 | ) | const |
| Position & PositionVector::operator[] | ( | int | index | ) |
Definition at line 197 of file PositionVector.cpp.
References myCont.
| const Position & PositionVector::operator[] | ( | int | index | ) | const |
returns the position at the given index !!! exceptions?
Definition at line 187 of file PositionVector.cpp.
References myCont.
| bool PositionVector::overlapsWith | ( | const AbstractPoly & | poly, |
| SUMOReal | offset = 0 |
||
| ) | const [virtual] |
Returns the information whether the given polygon overlaps with this Again a boundary may be specified.
Implements AbstractPoly.
Definition at line 112 of file PositionVector.cpp.
References AbstractPoly::around(), and myCont.
Referenced by NIVissimAbstractEdge::overlapsWith().
| bool PositionVector::partialWithin | ( | const AbstractPoly & | poly, |
| SUMOReal | offset = 0 |
||
| ) | const [virtual] |
Returns the information whether this polygon lies partially within the given polygon.
Implements AbstractPoly.
Definition at line 364 of file PositionVector.cpp.
References AbstractPoly::around(), and myCont.
| Position PositionVector::pop_back | ( | ) |
Definition at line 995 of file PositionVector.cpp.
References myCont.
Referenced by NBNodeCont::buildOnRamp(), NIVissimAbstractEdge::getGeomPosition(), and NBEdge::getInnerGeometry().
| Position PositionVector::pop_front | ( | ) |
Definition at line 1003 of file PositionVector.cpp.
References myCont.
Referenced by NBNodeCont::buildOffRamp(), and NBEdge::getInnerGeometry().
| Position PositionVector::positionAtLengthPosition | ( | const Position & | p1, |
| const Position & | p2, | ||
| SUMOReal | pos | ||
| ) | [static] |
Returns the position between the two given point at the specified position */.
Definition at line 246 of file PositionVector.cpp.
References Position::distanceTo(), SUMOReal, Position::x(), and Position::y().
| Position PositionVector::positionAtLengthPosition | ( | SUMOReal | pos | ) | const |
Returns the position at the given length.
Definition at line 214 of file PositionVector.cpp.
References myCont, and SUMOReal.
Referenced by NLHandler::addPOI(), GUIE3Collector::MyWrapper::buildDefinition(), NBNodeCont::buildOffRamp(), NBNodeCont::buildOnRamp(), NBNodeShapeComputer::computeContinuationNodeShape(), GUIVehicle::drawGL(), GUITriggeredRerouter::drawGL(), GUIEdge::drawGL(), MSVTypeProbe::execute(), NIVissimAbstractEdge::getGeomPosition(), getLineCenter(), NBEdge::getMaxLaneOffsetPositionAt(), NBEdge::getMinLaneOffsetPositionAt(), getSubpart(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouter(), NIXMLEdgesHandler::myEndElement(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), nearest_position_on_line_to_point(), NIImporter_VISUM::parse_Lanes(), pruneFromBeginAt(), pruneFromEndAt(), NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
| void PositionVector::pruneFromBeginAt | ( | const Position & | p | ) |
Definition at line 593 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), GeomHelper::extrapolate_first(), myCont, nearest_position_on_line_to_point(), positionAtLengthPosition(), and SUMOReal.
| void PositionVector::pruneFromEndAt | ( | const Position & | p | ) |
Definition at line 637 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), GeomHelper::extrapolate_second(), length(), myCont, nearest_position_on_line_to_point(), positionAtLengthPosition(), and SUMOReal.
| void PositionVector::push_back | ( | const Position & | p | ) | throw () |
Appends the given position to the list.
| [in] | p | The position to append |
Definition at line 68 of file PositionVector.cpp.
Referenced by NIImporter_SUMO::addJunction(), NBEdgeCont::applyOptions(), area(), NIVissimConnection::buildGeom(), NBNodeCont::buildOnRamp(), closePolygon(), NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), extrapolate(), getCentroid(), NIVissimAbstractEdge::getGeomPosition(), getSubpart(), Line::intersectsAtLengths(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), move2side(), PCLoaderXML::myCharacters(), NIVissimSingleTypeParser_Zeitenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Laengenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition::parse(), NIImporter_VISUM::parse_AreaSubPartElement(), GeomConvHelper::parseShapeReporting(), parseTimeLine(), TraCIServerAPI_Polygon::processSet(), NIImporter_SUMO::reconstructEdgeShape(), NIImporter_DlrNavteq::EdgesHandler::report(), NIImporter_DlrNavteq::NodesHandler::report(), reverse(), splitAt(), and NBEdge::splitGeometry().
| void PositionVector::push_back | ( | const PositionVector & | p | ) | throw () |
Appends all positions from the given vector.
| [in] | p | The vector from which values shall be appended |
Definition at line 74 of file PositionVector.cpp.
| void PositionVector::push_back_noDoublePos | ( | const Position & | p | ) |
Definition at line 1021 of file PositionVector.cpp.
References Position::almostSame(), myCont, and size().
Referenced by NIVissimNodeCluster::buildNBNode(), NBNodeShapeComputer::computeContinuationNodeShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), NIImporter_OpenDrive::computeShapes(), getSubpart(), NIImporter_OpenStreetMap::insertEdge(), intersectsAtPoints(), PCLoaderArcView::load(), NIImporter_ArcView::load(), PCLoaderOSM::loadIfSet(), NIVissimAbstractEdge::NIVissimAbstractEdge(), NIVissimSingleTypeParser_Verbindungsdefinition::parse(), NIVissimSingleTypeParser_Streckendefinition::parse(), NBNodeShapeComputer::replaceLastChecking(), and simpleHull_2D().
| void PositionVector::push_front | ( | const Position & | p | ) |
Puts the given position at the begin of the list.
Definition at line 80 of file PositionVector.cpp.
References myCont.
Referenced by NBNodeCont::buildOffRamp(), extrapolate(), and NIImporter_DlrNavteq::EdgesHandler::report().
| void PositionVector::push_front_noDoublePos | ( | const Position & | p | ) |
Definition at line 1029 of file PositionVector.cpp.
References Position::almostSame(), myCont, and size().
Referenced by NBNodeShapeComputer::computeContinuationNodeShape(), NBEdge::computeEdgeShape(), and NBNodeShapeComputer::replaceFirstChecking().
| void PositionVector::removeColinearPoints | ( | ) |
Definition at line 1066 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), and myCont.
| void PositionVector::removeDoublePoints | ( | ) |
Definition at line 1050 of file PositionVector.cpp.
References myCont.
| void PositionVector::replaceAt | ( | size_t | index, |
| const Position & | by | ||
| ) |
Definition at line 1037 of file PositionVector.cpp.
References myCont, and size().
Referenced by computeSameEnd(), NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
| void PositionVector::reshiftRotate | ( | SUMOReal | xoff, |
| SUMOReal | yoff, | ||
| SUMOReal | rot | ||
| ) |
Definition at line 455 of file PositionVector.cpp.
References myCont, and size().
Referenced by NBNode::reshiftPosition(), and NBDistrict::reshiftPosition().
| PositionVector PositionVector::reverse | ( | ) | const |
Definition at line 816 of file PositionVector.cpp.
References myCont, and 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().
| SUMOReal PositionVector::rotationDegreeAtLengthPosition | ( | SUMOReal | pos | ) | const |
Returns the position at the given length.
Definition at line 229 of file PositionVector.cpp.
References Line::atan2DegreeAngle(), myCont, and SUMOReal.
Referenced by GUIE3Collector::MyWrapper::buildDefinition(), GUITriggeredRerouter::drawGL(), GUIEdge::drawGL(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouter(), GUIInstantInductLoop::MyWrapper::MyWrapper(), and GUIInductLoop::MyWrapper::MyWrapper().
| void PositionVector::scaleSize | ( | SUMOReal | factor | ) |
enlarges/shrinks the polygon based at the centroid
Definition at line 317 of file PositionVector.cpp.
References getCentroid(), myCont, and size().
| void PositionVector::set | ( | size_t | pos, |
| const Position & | p | ||
| ) |
Definition at line 508 of file PositionVector.cpp.
References myCont.
| size_t PositionVector::size | ( | ) | const |
returns the number of points making up the line vector
Definition at line 207 of file PositionVector.cpp.
References myCont.
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLEdgesHandler::addEdge(), NLHandler::addLane(), area(), NIVissimConnection::buildGeom(), NBEdge::buildInnerEdges(), NIVissimNodeCluster::buildNBNode(), NBNodeShapeComputer::compute(), NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NIImporter_OpenDrive::computeShapes(), GUILaneWrapper::drawMarkings(), Distribution_Points::getAreaNo(), Distribution_Points::getAreaPerc(), GUIEdge::getBoundary(), getCentroid(), Distribution_Points::getMax(), NBEdge::hasDefaultGeometry(), indexOfClosest(), insertAtClosest(), intersects(), Line::intersectsAtLengths(), NIImporter_OpenDrive::loadNetwork(), PCLoaderDlrNavteq::loadPolyFile(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), operator==(), TraCIServerAPI_Polygon::processGet(), TraCIServerAPI_Lane::processGet(), push_back_noDoublePos(), push_front_noDoublePos(), NIVissimConnectionCluster::recomputeBoundary(), NIImporter_SUMO::reconstructEdgeShape(), replaceAt(), NBNodeShapeComputer::replaceLastChecking(), reshiftRotate(), scaleSize(), simpleHull_2D(), splitAt(), NBEdge::splitGeometry(), NILoader::transformCoordinates(), NWWriter_SUMO::writeDistrict(), and NWWriter_OpenDrive::writePlanView().
| void PositionVector::sortAsPolyCWByAngle | ( | ) |
| void PositionVector::sortByIncreasingXY | ( | ) |
Definition at line 471 of file PositionVector.cpp.
References myCont.
| 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 395 of file PositionVector.cpp.
References Position::distanceTo(), getBegin(), getEnd(), length(), myCont, POSITION_EPS, push_back(), size(), SUMOReal, toString(), and WRITE_WARNING.
Referenced by NBEdge::buildInnerEdges().
| std::ostream& operator<< | ( | std::ostream & | os, |
| const PositionVector & | geom | ||
| ) | [friend] |
Output operator.
Definition at line 437 of file PositionVector.cpp.
ContType PositionVector::myCont [private] |
The list of points.
Definition at line 285 of file PositionVector.h.
Referenced by appendWithCrossingPoint(), around(), clear(), closePolygon(), distance(), distances(), eraseAt(), extrapolate(), getBegin(), getBoxBoundary(), getCont(), getEnd(), getEndLine(), getLineCenter(), getPolygonCenter(), getSubpart(), indexOfClosest(), insertAt(), insertAtClosest(), intersects(), intersectsAtLengths(), intersectsAtPoint(), intersectsAtPoints(), isClosed(), length(), lineAt(), move2side(), nearest_position_on_line_to_point(), operator<<(), operator[](), overlapsWith(), partialWithin(), pop_back(), pop_front(), positionAtLengthPosition(), pruneFromBeginAt(), pruneFromEndAt(), push_back_noDoublePos(), push_front(), push_front_noDoublePos(), removeColinearPoints(), removeDoublePoints(), replaceAt(), reshiftRotate(), reverse(), rotationDegreeAtLengthPosition(), scaleSize(), set(), size(), sortAsPolyCWByAngle(), sortByIncreasingXY(), and splitAt().