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 Types | |
typedef std::vector< Position > | ContType |
Definition of the list of points. More... | |
Public Member Functions | |
void | add (SUMOReal xoff, SUMOReal yoff, SUMOReal zoff) |
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... | |
ContType::const_iterator | begin () const |
SUMOReal | beginEndAngle () const |
void | clear () |
Removes all information from this list. More... | |
void | closePolygon () |
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 |
ContType::const_iterator | end () const |
void | eraseAt (int i) |
void | extrapolate (SUMOReal val) |
const Position & | getBegin () const |
Returns the first position. More... | |
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... | |
const Position & | getEnd () const |
Returns the last position. More... | |
Line | getEndLine () const |
Position | getLineCenter () const |
Position | getPolygonCenter () const |
Returns the arithmetic of all corner points. More... | |
PositionVector | getSubpart (SUMOReal begin, SUMOReal end) const |
PositionVector | getSubpart2D (SUMOReal begin, SUMOReal end) 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... | |
Line | lineAt (size_t pos) const |
void | move2side (SUMOReal amount) |
SUMOReal | nearest_position_on_line_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_back () |
Position | pop_front () |
Position | positionAtLengthPosition (SUMOReal pos) const |
Returns the position at the given length. More... | |
Position | positionAtLengthPosition2D (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 begin of the list. More... | |
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 rotation at the given length. More... | |
void | scaleSize (SUMOReal factor) |
enlarges/shrinks the polygon based at the centroid More... | |
void | set (size_t pos, const Position &p) |
size_t | size () const |
returns the number of points making up the line vector 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... | |
SUMOReal | tiltDegreeAtLengthPosition (SUMOReal pos) const |
Returns the tilt at the given length. More... | |
~PositionVector () | |
Destructor. More... | |
Adding items to the container | |
void | push_back (const Position &p) |
Appends the given position to the list. More... | |
void | push_back (const PositionVector &p) |
Appends all positions from the given vector. More... | |
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 */. More... | |
static Position | positionAtLengthPosition2D (const Position &p1, const Position &p2, SUMOReal pos) |
Returns the position between the two given point at the specified position */. More... | |
Private Attributes | |
ContType | myCont |
The list of points. More... | |
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.
typedef std::vector<Position> PositionVector::ContType |
Definition of the list of points.
Definition at line 56 of file PositionVector.h.
PositionVector::PositionVector | ( | ) |
PositionVector::PositionVector | ( | const std::vector< Position > & | v | ) |
Constructor.
[in] | v | The vector to copy |
Definition at line 63 of file PositionVector.cpp.
References myCont.
PositionVector::~PositionVector | ( | ) |
Destructor.
Definition at line 68 of file PositionVector.cpp.
Definition at line 501 of file PositionVector.cpp.
References myCont, and size().
Referenced by NBEdge::init(), and NBNode::reshiftPosition().
int PositionVector::appendWithCrossingPoint | ( | const PositionVector & | v | ) |
Definition at line 581 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 391 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 91 of file PositionVector.cpp.
References GeomHelper::Angle2D(), myCont, PI, SUMOReal, Position::x(), and Position::y().
Referenced by NIImporter_SUMO::addJunction(), and NIVissimTL::NIVissimTLSignal::isWithin().
|
inline |
Definition at line 211 of file PositionVector.h.
References myCont.
Referenced by GLHelper::drawFilledPoly(), getSubpart(), getSubpart2D(), PCLoaderXML::myStartElement(), NIVissimAbstractEdge::NIVissimAbstractEdge(), and BinaryFormatter::writeAttr().
SUMOReal PositionVector::beginEndAngle | ( | ) | const |
Definition at line 778 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 186 of file PositionVector.cpp.
References myCont.
Referenced by GUIVehicle::drawAction_drawRailCarriages(), NBEdge::init(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), and NBEdge::splitGeometry().
void PositionVector::closePolygon | ( | ) |
Definition at line 1022 of file PositionVector.cpp.
References myCont, and push_back().
PositionVector PositionVector::convexHull | ( | ) | const |
Definition at line 554 of file PositionVector.cpp.
References simpleHull_2D(), and sortAsPolyCWByAngle().
Implements AbstractPoly.
Definition at line 422 of file PositionVector.cpp.
References intersects().
Definition at line 849 of file PositionVector.cpp.
References GeomHelper::closestDistancePointLine(), max, MIN2(), myCont, size(), and SUMOReal.
Referenced by NIImporter_SUMO::addJunction(), traci::TraCIServer::collectObjectsInRange(), distances(), and TraCIServerAPI_Vehicle::processSet().
std::vector< SUMOReal > PositionVector::distances | ( | const PositionVector & | s | ) | const |
Definition at line 1031 of file PositionVector.cpp.
References distance(), and myCont.
Referenced by NBEdge::isNearEnough2BeJoined2().
|
inline |
Definition at line 215 of file PositionVector.h.
References myCont.
Referenced by GLHelper::drawFilledPoly(), getSubpart(), getSubpart2D(), PCLoaderXML::myStartElement(), NIVissimAbstractEdge::NIVissimAbstractEdge(), and BinaryFormatter::writeAttr().
void PositionVector::eraseAt | ( | int | i | ) |
Definition at line 785 of file PositionVector.cpp.
References myCont.
Referenced by NBEdge::startShapeAt().
void PositionVector::extrapolate | ( | SUMOReal | val | ) |
Definition at line 893 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 429 of file PositionVector.cpp.
References myCont.
Referenced by beginEndAngle(), GUIE3Collector::MyWrapper::buildDefinition(), NBEdge::buildInnerEdges(), NBNode::computeInternalLaneShape(), NIVissimAbstractEdge::crossesAtPoint(), NIVissimEdge::dict_checkEdges2Join(), NIVissimEdge::getFromNode(), NIVissimConnectionCluster::getPositionForEdge(), NBEdge::hasDefaultGeometryEndpoints(), NIVissimConnectionCluster::isWeakDistrictConnRealisation(), PCLoaderOSM::loadIfSet(), PCLoaderDlrNavteq::loadPolyFile(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), NIVissimEdge::resolveSameNode(), NBEdge::setGeometry(), and splitAt().
Line PositionVector::getBegLine | ( | ) | const |
Definition at line 1010 of file PositionVector.cpp.
References lineAt().
Referenced by 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 306 of file PositionVector.cpp.
References Boundary::add(), and myCont.
Referenced by traci::TraCIServer::collectObjectsInRange(), 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 328 of file PositionVector.cpp.
References area(), isClosed(), length(), push_back(), size(), and SUMOReal.
Referenced by scaleSize().
const Position & PositionVector::getEnd | ( | ) | const |
Returns the last position.
Definition at line 435 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(), NBEdge::hasDefaultGeometryEndpoints(), NIVissimConnectionCluster::isWeakDistrictConnRealisation(), PCLoaderOSM::loadIfSet(), PCLoaderDlrNavteq::loadPolyFile(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), NIVissimEdge::resolveSameNode(), GUILaneWrapper::ROWdrawAction_drawArrows(), GUILaneWrapper::ROWdrawAction_drawLinkNo(), GUILaneWrapper::ROWdrawAction_drawLinkRules(), GUILaneWrapper::ROWdrawAction_drawTLSLinkNo(), NBEdge::setGeometry(), and splitAt().
Line PositionVector::getEndLine | ( | ) | const |
Definition at line 1016 of file PositionVector.cpp.
References lineAt(), and myCont.
Referenced by NBNode::computeInternalLaneShape(), NBEdge::getAngleAtNode(), and NBContHelper::edge_opposite_direction_sorter::getEdgeAngleAt().
Position PositionVector::getLineCenter | ( | ) | const |
Definition at line 372 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 316 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 604 of file PositionVector.cpp.
References begin(), end(), length(), myCont, POSITION_EPS, positionAtLengthPosition(), push_back(), push_back_noDoublePos(), and SUMOReal.
Referenced by NBNode::computeInternalLaneShape(), GUIBusStop::GUIBusStop(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), and NWWriter_SUMO::writeLane().
PositionVector PositionVector::getSubpart2D | ( | SUMOReal | begin, |
SUMOReal | end | ||
) | const |
Definition at line 646 of file PositionVector.cpp.
References begin(), end(), length(), myCont, POSITION_EPS, positionAtLengthPosition2D(), push_back(), push_back_noDoublePos(), and SUMOReal.
Referenced by NBEdge::startShapeAt().
Definition at line 814 of file PositionVector.cpp.
References Position::distanceTo(), max, myCont, size(), and SUMOReal.
Definition at line 1061 of file PositionVector.cpp.
References myCont.
Referenced by NBEdge::addGeometryPoint(), insertAtClosest(), and NILoader::transformCoordinates().
Definition at line 831 of file PositionVector.cpp.
References GeomHelper::closestDistancePointLine(), insertAt(), max, myCont, size(), and SUMOReal.
PositionVector PositionVector::intersectionPoints2D | ( | const Line & | line | ) | const |
Returns any intersection Points with the given line (ignoring z-coordinates)
Definition at line 568 of file PositionVector.cpp.
References GeomHelper::intersection_position2D(), GeomHelper::intersects(), myCont, 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 128 of file PositionVector.cpp.
References GeomHelper::intersects(), myCont, and size().
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 143 of file PositionVector.cpp.
References intersects(), myCont, and size().
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 864 of file PositionVector.cpp.
References myCont.
Referenced by NBEdge::buildInnerEdges(), computeSameEnd(), 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 875 of file PositionVector.cpp.
References Position::distanceTo2D(), GeomHelper::intersection_position2D(), GeomHelper::intersects(), Line::length2D(), myCont, Line::p1(), Line::p2(), and SUMOReal.
Returns the position of the intersection
Definition at line 158 of file PositionVector.cpp.
References GeomHelper::intersection_position2D(), 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 170 of file PositionVector.cpp.
References intersects(), intersectsAtPoint(), and myCont.
bool PositionVector::isClosed | ( | ) | const |
Definition at line 1094 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 547 of file PositionVector.cpp.
References Position::x(), and Position::y().
SUMOReal PositionVector::length | ( | ) | const |
Returns the length.
Definition at line 381 of file PositionVector.cpp.
References myCont, and SUMOReal.
Referenced by NIXMLEdgesHandler::addSplit(), NBEdge::buildInnerEdges(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBNodeShapeComputer::computeContinuationNodeShape(), NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NIVissimEdge::dict_checkEdges2Join(), GUIEdge::drawGL(), getCentroid(), NIVissimAbstractEdge::getGeomPosition(), NWWriter_DlrNavteq::getGraphLength(), NIVissimEdge::getLength(), getLineCenter(), NBEdge::getMaxLaneOffsetPositionAt(), NBEdge::getMinLaneOffsetPositionAt(), getSubpart(), getSubpart2D(), NIVissimEdge::getToNode(), GUIBusStop::GUIBusStop(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), NIXMLEdgesHandler::myEndElement(), pruneFromEndAt(), NIVissimEdge::resolveSameNode(), splitAt(), NBEdgeCont::splitAt(), NBEdge::startShapeAt(), NWWriter_SUMO::writeInternalEdge(), NWWriter_SUMO::writeLane(), and NWWriter_OpenDrive::writeNetwork().
Line PositionVector::lineAt | ( | size_t | pos | ) | const |
Definition at line 1003 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 918 of file PositionVector.cpp.
References GeomHelper::Angle2D(), Position::distanceTo2D(), Line::extrapolateBy(), GeomHelper::getNormal90D_CW(), Line::intersects(), Line::intersectsAt(), myCont, POSITION_EPS, push_back(), Position::x(), Position::y(), and Position::z().
Referenced by GUIVehicle::drawBestLanes(), NBEdge::getCCWBoundaryLine(), NBEdge::getCWBoundaryLine(), MSPerson::MSPersonStage::getEdgePosition(), GUIBusStop::GUIBusStop(), NBRampsComputer::moveRampRight(), NIXMLEdgesHandler::myEndElement(), NBSign::writeAsPOI(), and NWWriter_OpenDrive::writeNetwork().
SUMOReal PositionVector::nearest_position_on_line_to_point2D | ( | const Position & | p, |
bool | perpendicular = true |
||
) | const |
Definition at line 795 of file PositionVector.cpp.
References Position::distanceTo2D(), max, myCont, GeomHelper::nearest_position_on_line_to_point2D(), and SUMOReal.
Referenced by GUILaneWrapper::getPopUpMenu(), TraCIServerAPI_Vehicle::processSet(), NBNodeShapeComputer::replaceFirstChecking(), NBNodeShapeComputer::replaceLastChecking(), and NBEdgeCont::splitAt().
bool PositionVector::operator== | ( | const PositionVector & | v2 | ) | const |
returns the position at the given index !!! exceptions?
Definition at line 192 of file PositionVector.cpp.
References myCont.
Definition at line 202 of file PositionVector.cpp.
References myCont.
|
virtual |
Returns the information whether the given polygon overlaps with this Again a boundary may be specified.
Implements AbstractPoly.
Definition at line 117 of file PositionVector.cpp.
References AbstractPoly::around(), and myCont.
Referenced by NIVissimAbstractEdge::overlapsWith().
|
virtual |
Returns the information whether this polygon lies partially within the given polygon.
Implements AbstractPoly.
Definition at line 410 of file PositionVector.cpp.
References AbstractPoly::around(), and myCont.
Position PositionVector::pop_back | ( | ) |
Definition at line 1045 of file PositionVector.cpp.
References myCont.
Referenced by NBRampsComputer::buildOnRamp(), NIVissimAbstractEdge::getGeomPosition(), and NBEdge::getInnerGeometry().
Position PositionVector::pop_front | ( | ) |
Definition at line 1053 of file PositionVector.cpp.
References myCont.
Referenced by NBRampsComputer::buildOffRamp(), and NBEdge::getInnerGeometry().
Returns the position at the given length.
Definition at line 218 of file PositionVector.cpp.
References myCont, and SUMOReal.
Referenced by NLHandler::addPOI(), GUIE3Collector::MyWrapper::buildDefinition(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), GUIVehicle::drawGL(), GUIEdge::drawGL(), MSVTypeProbe::execute(), MSVehicle::getAngle(), MSPerson::MSPersonStage::getEdgePosition(), NIVissimAbstractEdge::getGeomPosition(), getLineCenter(), NBEdge::getMaxLaneOffsetPositionAt(), NBEdge::getMinLaneOffsetPositionAt(), TraCIServerAPI_InductionLoop::getPosition(), MSVehicle::getPosition(), MSVTKExport::getSpeed(), getSubpart(), TraCIServerAPI_InductionLoop::getTree(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), NIXMLEdgesHandler::myEndElement(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), NIImporter_VISUM::parse_Lanes(), pruneFromBeginAt(), pruneFromEndAt(), MSFCDExport::write(), MSEmissionExport::write(), NBSign::writeAsPOI(), and MSFullExport::writeVehicles().
|
static |
Returns the position between the two given point at the specified position */.
Definition at line 282 of file PositionVector.cpp.
References Position::distanceTo(), and SUMOReal.
Returns the position at the given length.
Definition at line 233 of file PositionVector.cpp.
References myCont, and SUMOReal.
Referenced by NBNodeShapeComputer::computeContinuationNodeShape(), GUIVehicle::drawAction_drawRailCarriages(), getSubpart2D(), NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
|
static |
Returns the position between the two given point at the specified position */.
Definition at line 294 of file PositionVector.cpp.
References Position::distanceTo2D(), and SUMOReal.
void PositionVector::pruneFromBeginAt | ( | const Position & | p | ) |
Definition at line 688 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), GeomHelper::extrapolate_first(), myCont, GeomHelper::nearest_position_on_line_to_point2D(), positionAtLengthPosition(), and SUMOReal.
void PositionVector::pruneFromEndAt | ( | const Position & | p | ) |
Definition at line 732 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), GeomHelper::extrapolate_second(), length(), myCont, GeomHelper::nearest_position_on_line_to_point2D(), positionAtLengthPosition(), and SUMOReal.
void PositionVector::push_back | ( | const Position & | p | ) |
Appends the given position to the list.
[in] | p | The position to append |
Definition at line 73 of file PositionVector.cpp.
References myCont.
Referenced by NBEdgeCont::applyOptions(), area(), NIVissimConnection::buildGeom(), NBRampsComputer::buildOnRamp(), closePolygon(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShape(), GUIVehicle::computeSeats(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), extrapolate(), traci::TraCIServer::findObjectShape(), getCentroid(), NIVissimAbstractEdge::getGeomPosition(), TraCIServerAPI_Edge::getShape(), TraCIServerAPI_Polygon::getShape(), TraCIServerAPI_Lane::getShape(), SUMOSAXAttributesImpl_Xerces::getShapeReporting(), getSubpart(), getSubpart2D(), GUIVehicle::GUIVehicle(), NBEdge::init(), Line::intersectsAtLengths2D(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), move2side(), PCLoaderXML::myStartElement(), NIVissimSingleTypeParser_Knotendefinition::parse(), NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition::parse(), NIVissimSingleTypeParser_Zeitenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Laengenverteilungsdefinition::parse(), NIImporter_VISUM::parse_AreaSubPartElement(), GeomConvHelper::parseShapeReporting(), parseTimeLine(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_Vehicle::processSet(), NIImporter_SUMO::reconstructEdgeShape(), NIImporter_DlrNavteq::NodesHandler::report(), NIImporter_DlrNavteq::EdgesHandler::report(), reverse(), NBEdge::setGeometry(), splitAt(), and NBEdge::splitGeometry().
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 79 of file PositionVector.cpp.
References myCont.
void PositionVector::push_back_noDoublePos | ( | const Position & | p | ) |
Definition at line 1071 of file PositionVector.cpp.
References Position::almostSame(), myCont, and size().
Referenced by NIImporter_SUMO::addJunction(), NIVissimNodeCluster::buildNBNode(), NBNodeShapeComputer::computeContinuationNodeShape(), 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(), and simpleHull_2D().
void PositionVector::push_front | ( | const Position & | p | ) |
Puts the given position at the begin of the list.
Definition at line 85 of file PositionVector.cpp.
References myCont.
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 1079 of file PositionVector.cpp.
References Position::almostSame(), myCont, and size().
Referenced by NBNodeShapeComputer::computeContinuationNodeShape(), NWWriter_DlrNavteq::getGraphLength(), NBEdge::init(), NBNodeShapeComputer::replaceFirstChecking(), and NBEdge::startShapeAt().
void PositionVector::removeColinearPoints | ( | ) |
Definition at line 1116 of file PositionVector.cpp.
References GeomHelper::distancePointLine(), and myCont.
void PositionVector::removeDoublePoints | ( | ) |
Definition at line 1100 of file PositionVector.cpp.
References myCont.
Referenced by NBEdge::init().
void PositionVector::replaceAt | ( | size_t | index, |
const Position & | by | ||
) |
Definition at line 1087 of file PositionVector.cpp.
References myCont, and size().
Referenced by computeSameEnd(), NBNodeShapeComputer::replaceFirstChecking(), and NBNodeShapeComputer::replaceLastChecking().
Definition at line 509 of file PositionVector.cpp.
References myCont, and size().
Referenced by NBDistrict::reshiftPosition(), and NBEdge::reshiftPosition().
PositionVector PositionVector::reverse | ( | ) | const |
Definition at line 908 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().
Returns the rotation at the given length.
Definition at line 248 of file PositionVector.cpp.
References Line::atan2DegreeAngle(), myCont, and SUMOReal.
Referenced by GUIE3Collector::MyWrapper::buildDefinition(), GUIEdge::drawGL(), MSVehicle::getAngle(), MSPerson::MSPersonStage::getEdgeAngle(), GUIBusStop::GUIBusStop(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), GUIInstantInductLoop::MyWrapper::MyWrapper(), and GUIInductLoop::MyWrapper::MyWrapper().
void PositionVector::scaleSize | ( | SUMOReal | factor | ) |
enlarges/shrinks the polygon based at the centroid
Definition at line 363 of file PositionVector.cpp.
References getCentroid(), myCont, and size().
void PositionVector::set | ( | size_t | pos, |
const Position & | p | ||
) |
Definition at line 562 of file PositionVector.cpp.
References myCont.
size_t PositionVector::size | ( | ) | const |
returns the number of points making up the line vector
Definition at line 212 of file PositionVector.cpp.
References myCont.
Referenced by NIImporter_SUMO::_loadNetwork(), add(), NIXMLEdgesHandler::addEdge(), NIImporter_SUMO::addJunction(), NLHandler::addLane(), NLHandler::addPoly(), area(), NIVissimConnection::buildGeom(), NBEdge::buildInnerEdges(), NIVissimNodeCluster::buildNBNode(), traci::TraCIServer::collectObjectsInRange(), NBNodeShapeComputer::compute(), NBEdge::computeEdgeShape(), NBNode::computeInternalLaneShape(), NIImporter_OpenDrive::computeShapes(), distance(), GLHelper::drawBoxLines(), GUILaneWrapper::drawCrossties(), GLHelper::drawFilledPoly(), GUIPolygon::drawGL(), GLHelper::drawLine(), GUILaneWrapper::drawMarkings(), Distribution_Points::getAreaNo(), Distribution_Points::getAreaPerc(), GUIEdge::getBoundary(), getCentroid(), Distribution_Points::getMax(), GUIVehicle::getSeatPosition(), GUIBusStop::GUIBusStop(), GUIJunctionWrapper::GUIJunctionWrapper(), GUILaneWrapper::GUILaneWrapper(), NBEdge::hasDefaultGeometry(), NBEdgeCont::ignoreFilterMatch(), indexOfClosest(), NBEdge::init(), insertAtClosest(), intersects(), Line::intersectsAtLengths2D(), NIImporter_OpenDrive::loadNetwork(), PCLoaderDlrNavteq::loadPolyFile(), operator==(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Polygon::processGet(), push_back_noDoublePos(), push_front_noDoublePos(), NIVissimConnectionCluster::recomputeBoundary(), NIImporter_SUMO::reconstructEdgeShape(), replaceAt(), NBNodeShapeComputer::replaceLastChecking(), reshiftRotate(), scaleSize(), simpleHull_2D(), splitAt(), NBEdge::splitGeometry(), GUIPolygon::storeTesselation(), NILoader::transformCoordinates(), BinaryFormatter::writeAttr(), NWWriter_SUMO::writeDistrict(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and NWWriter_OpenDrive::writePlanView().
void PositionVector::sortAsPolyCWByAngle | ( | ) |
void PositionVector::sortByIncreasingXY | ( | ) |
Definition at line 525 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 441 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(), and NBEdgeCont::splitAt().
Returns the tilt at the given length.
Definition at line 265 of file PositionVector.cpp.
References Line::atan2TiltDegree(), myCont, and SUMOReal.
|
friend |
Output operator.
Definition at line 483 of file PositionVector.cpp.
|
private |
The list of points.
Definition at line 307 of file PositionVector.h.
Referenced by add(), appendWithCrossingPoint(), around(), begin(), clear(), closePolygon(), distance(), distances(), end(), eraseAt(), extrapolate(), getBegin(), getBoxBoundary(), getEnd(), getEndLine(), getLineCenter(), getPolygonCenter(), getSubpart(), getSubpart2D(), indexOfClosest(), insertAt(), insertAtClosest(), intersectionPoints2D(), intersects(), intersectsAtLengths2D(), intersectsAtPoint(), isClosed(), length(), lineAt(), move2side(), nearest_position_on_line_to_point2D(), operator<<(), operator[](), overlapsWith(), partialWithin(), pop_back(), pop_front(), positionAtLengthPosition(), positionAtLengthPosition2D(), PositionVector(), pruneFromBeginAt(), pruneFromEndAt(), push_back(), push_back_noDoublePos(), push_front(), push_front_noDoublePos(), removeColinearPoints(), removeDoublePoints(), replaceAt(), reshiftRotate(), reverse(), rotationDegreeAtLengthPosition(), scaleSize(), set(), size(), sortAsPolyCWByAngle(), sortByIncreasingXY(), splitAt(), and tiltDegreeAtLengthPosition().