SUMO - Simulation of Urban MObility
PositionVector Class Reference

A list of positions. More...

#include <PositionVector.h>

Inheritance diagram for PositionVector:
Inheritance graph
Collaboration diagram for PositionVector:
Collaboration graph

Data Structures

class  as_poly_cw_sorter
 clase for CW Sorter More...
 
class  increasing_x_y_sorter
 clase for increasing Sorter More...
 

Public Member Functions

void add (SUMOReal xoff, SUMOReal yoff, SUMOReal zoff)
 
void add (const Position &offset)
 
SUMOReal angleAt2D (int pos) const
 get angle in certain position of position vector More...
 
void append (const PositionVector &v, SUMOReal sameThreshold=2.0)
 
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. More...
 
SUMOReal beginEndAngle () const
 returns the angle in radians of the line connecting the first and the last position More...
 
void closePolygon ()
 ensures that the last position equals the first More...
 
PositionVector convexHull () const
 
bool crosses (const Position &p1, const Position &p2) const
 
SUMOReal distance2D (const Position &p, bool perpendicular=false) const
 closest 2D-distance to point p (or -1 if perpendicular is true and the point is beyond this vector) More...
 
std::vector< SUMORealdistances (const PositionVector &s, bool perpendicular=false) const
 distances of all my points to s and all of s points to myself More...
 
void extrapolate (const SUMOReal val, const bool onlyFirst=false)
 extrapolate position vector More...
 
void extrapolate2D (const SUMOReal val, const bool onlyFirst=false)
 extrapolate position vector in two dimensions (Z is ignored) More...
 
Boundary getBoxBoundary () const
 Returns a boundary enclosing this list of lines. More...
 
Position getCentroid () const
 Returns the centroid (closes the polygon if unclosed) More...
 
Position getLineCenter () const
 get line center More...
 
PositionVector getOrthogonal (const Position &p, SUMOReal extend, SUMOReal &distToClosest) const
 return orthogonal through p (extending this vector if necessary) More...
 
Position getPolygonCenter () const
 Returns the arithmetic of all corner points. More...
 
PositionVector getSubpart (SUMOReal beginOffset, SUMOReal endOffset) const
 get subpart of a position vector More...
 
PositionVector getSubpart2D (SUMOReal beginOffset, SUMOReal endOffset) const
 get subpart of a position vector in two dimensions (Z is ignored) More...
 
PositionVector getSubpartByIndex (int beginIndex, int count) const
 get subpart of a position vector using index and a cout More...
 
bool hasElevation () const
 return whether two positions differ in z-coordinate More...
 
int indexOfClosest (const Position &p) const
 index of the closest position to p More...
 
int insertAtClosest (const Position &p)
 inserts p between the two closest positions and returns the insertion index More...
 
Position intersectionPosition2D (const Position &p1, const Position &p2, const SUMOReal withinDist=0.) const
 Returns the position of the intersection. More...
 
Position intersectionPosition2D (const PositionVector &v1) const
 Returns the position of the intersection. More...
 
bool intersects (const Position &p1, const Position &p2) const
 Returns the information whether this list of points interesects the given line. More...
 
bool intersects (const PositionVector &v1) const
 Returns the information whether this list of points interesects one the given lines. More...
 
std::vector< SUMORealintersectsAtLengths2D (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< SUMORealintersectsAtLengths2D (const Position &lp1, const Position &lp2) const
 For all intersections between this vector and line, return the 2D-length of the subvector from this vectors start to the intersection. More...
 
bool isClosed () const
 check if PositionVector is closed More...
 
SUMOReal isLeft (const Position &P0, const Position &P1, const Position &P2) const
 get left More...
 
SUMOReal length () const
 Returns the length. More...
 
SUMOReal length2D () const
 Returns the length. More...
 
void mirrorX ()
 
void move2side (SUMOReal amount)
 move position vector to side using certain ammount More...
 
SUMOReal nearest_offset_to_point2D (const Position &p, bool perpendicular=true) const
 return the nearest offest to point 2D More...
 
bool operator== (const PositionVector &v2) const
 comparing operation More...
 
const Positionoperator[] (int index) const
 returns the constat position at the given index !!! exceptions? More...
 
Positionoperator[] (int index)
 returns the position at the given index !!! exceptions? More...
 
bool overlapsWith (const AbstractPoly &poly, SUMOReal offset=0) const
 Returns the information whether the given polygon overlaps with this. More...
 
bool partialWithin (const AbstractPoly &poly, SUMOReal offset=0) const
 Returns the information whether this polygon lies partially within the given polygon. More...
 
Position positionAtOffset (SUMOReal pos, SUMOReal lateralOffset=0) const
 Returns the position at the given length. More...
 
Position positionAtOffset2D (SUMOReal pos, SUMOReal lateralOffset=0) const
 Returns the position at the given length. More...
 
 PositionVector ()
 Constructor. Creates an empty position vector. More...
 
 PositionVector (const std::vector< Position > &v)
 Copy Constructor. Create a positionVector with the same elements as other positionVector. More...
 
 PositionVector (const std::vector< Position >::const_iterator beg, const std::vector< Position >::const_iterator end)
 Parameter Constructor. Create a positionVector using a part of other positionVector. More...
 
 PositionVector (const Position &p1, const Position &p2)
 Parameter Constructor used for lines. More...
 
void push_back_noDoublePos (const Position &p)
 insert in back a non double position More...
 
void push_front_noDoublePos (const Position &p)
 insert in front a non double position More...
 
int removeClosest (const Position &p)
 removes the point closest to p and return the removal index More...
 
void removeDoublePoints (SUMOReal minDist=POSITION_EPS, bool assertLength=false)
 Removes positions if too near. More...
 
PositionVector reverse () const
 reverse position vector More...
 
void rotate2D (SUMOReal angle)
 
SUMOReal rotationAtOffset (SUMOReal pos) const
 Returns the rotation at the given length. More...
 
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...
 
PositionVector simplified () const
 return the same shape with intermediate colinear points removed More...
 
SUMOReal slopeDegreeAtOffset (SUMOReal pos) const
 Returns the slope at the given length. More...
 
void sortAsPolyCWByAngle ()
 short as polygon CV by angle More...
 
void sortByIncreasingXY ()
 shory by increasing X-Y Psitions More...
 
std::pair< PositionVector, PositionVectorsplitAt (SUMOReal where) const
 Returns the two lists made when this list vector is splitted at the given point. More...
 
Position transformToVectorCoordinates (const Position &p, bool extend=false) const
 return position p within the length-wise coordinate system defined by this position vector. The x value is the same as that returned by nearest_offset_to_point2D(p) and the y value is the perpendicular distance to this vector with the sign indicating the side (right is postive). if extend is true, the vector is extended on both sides and the x-coordinate of the result may be below 0 or above the length of the original vector More...
 
 ~PositionVector ()
 Destructor. More...
 

Static Public Member Functions

static Position positionAtOffset (const Position &p1, const Position &p2, SUMOReal pos, SUMOReal lateralOffset=0.)
 Returns the position between the two given point at the specified position. More...
 
static Position positionAtOffset2D (const Position &p1, const Position &p2, SUMOReal pos, SUMOReal lateralOffset=0.)
 Returns the position between the two given point at the specified position. More...
 
static Position sideOffset (const Position &beg, const Position &end, const SUMOReal amount)
 get a side position of position vector using a offset More...
 

Private Types

typedef std::vector< Positionvp
 vector of position More...
 

Static Private Member Functions

static bool intersects (const Position &p11, const Position &p12, const Position &p21, const Position &p22, const SUMOReal withinDist=0., SUMOReal *x=0, SUMOReal *y=0, SUMOReal *mu=0)
 return whether the line segments defined by Line p11,p12 and Line p21,p22 intersect More...
 

Friends

std::ostream & operator<< (std::ostream &os, const PositionVector &geom)
 

Detailed Description

A list of positions.

Definition at line 52 of file PositionVector.h.

Member Typedef Documentation

§ vp

typedef std::vector<Position> PositionVector::vp
private

vector of position

Definition at line 56 of file PositionVector.h.

Constructor & Destructor Documentation

§ PositionVector() [1/4]

PositionVector::PositionVector ( )

Constructor. Creates an empty position vector.

Definition at line 59 of file PositionVector.cpp.

§ PositionVector() [2/4]

PositionVector::PositionVector ( const std::vector< Position > &  v)

Copy Constructor. Create a positionVector with the same elements as other positionVector.

Parameters
[in]vThe vector to copy

Definition at line 62 of file PositionVector.cpp.

§ PositionVector() [3/4]

PositionVector::PositionVector ( const std::vector< Position >::const_iterator  beg,
const std::vector< Position >::const_iterator  end 
)

Parameter Constructor. Create a positionVector using a part of other positionVector.

Parameters
[in]begThe begin iterator for copy
[in]endThe end iterator to copy

Definition at line 67 of file PositionVector.cpp.

§ PositionVector() [4/4]

PositionVector::PositionVector ( const Position p1,
const Position p2 
)

Parameter Constructor used for lines.

Parameters
[in]p1the first position
[in]p2the second position

Definition at line 72 of file PositionVector.cpp.

§ ~PositionVector()

PositionVector::~PositionVector ( )

Destructor.

Definition at line 78 of file PositionVector.cpp.

Member Function Documentation

§ add() [1/2]

§ add() [2/2]

void PositionVector::add ( const Position offset)

Definition at line 525 of file PositionVector.cpp.

References add(), Position::x(), Position::y(), and Position::z().

§ angleAt2D()

§ append()

§ area()

SUMOReal PositionVector::area ( ) const

Returns the area (0 for non-closed)

Definition at line 419 of file PositionVector.cpp.

References isClosed(), and SUMOReal.

Referenced by GNEJunction::drawGL(), NBEdgeCont::formFactor(), getCentroid(), and NBNodesEdgesSorter::sortNodesEdges().

§ around()

bool PositionVector::around ( const Position p,
SUMOReal  offset = 0 
) const
virtual

Returns the information whether the position vector describes a polygon lying around the given point.

Note
The optional offset is added to the polygon's boundaries

Implements AbstractPoly.

Definition at line 82 of file PositionVector.cpp.

References GeomHelper::angle2D(), around(), M_PI, scaleAbsolute(), SUMOReal, Position::x(), and Position::y().

Referenced by around(), NBEdge::computeAngle(), NBNode::computeNodeShape(), NBHeightMapper::Triangle::contains(), NBNode::getCenter(), and NIVissimTL::NIVissimTLSignal::isWithin().

§ beginEndAngle()

§ closePolygon()

§ convexHull()

PositionVector PositionVector::convexHull ( ) const

Definition at line 573 of file PositionVector.cpp.

References simpleHull_2D(), and sortAsPolyCWByAngle().

§ crosses()

bool PositionVector::crosses ( const Position p1,
const Position p2 
) const
virtual

Implements AbstractPoly.

Definition at line 452 of file PositionVector.cpp.

References intersects().

§ distance2D()

§ distances()

std::vector< SUMOReal > PositionVector::distances ( const PositionVector s,
bool  perpendicular = false 
) const

distances of all my points to s and all of s points to myself

Note
if perpendicular is set to true, only the perpendicular distances are returned

Definition at line 971 of file PositionVector.cpp.

References distance2D(), GeomHelper::INVALID_OFFSET, and SUMOReal.

Referenced by NBNodeShapeComputer::badIntersection(), NBEdgeCont::guessOpposites(), and NBEdge::isNearEnough2BeJoined2().

§ extrapolate()

§ extrapolate2D()

void PositionVector::extrapolate2D ( const SUMOReal  val,
const bool  onlyFirst = false 
)

extrapolate position vector in two dimensions (Z is ignored)

Definition at line 868 of file PositionVector.cpp.

References Position::add(), Position::distanceTo2D(), and Position::sub().

Referenced by NBNode::bezierControlPoints(), NBNodeShapeComputer::computeNodeShapeSmall(), computeSameEnd(), getOrthogonal(), move2side(), and NBEdge::setNodeBorder().

§ getBoxBoundary()

§ getCentroid()

Position PositionVector::getCentroid ( ) const

Returns the centroid (closes the polygon if unclosed)

Definition at line 333 of file PositionVector.cpp.

References area(), isClosed(), length(), and SUMOReal.

Referenced by NBEdge::computeAngle(), scaleAbsolute(), and scaleRelative().

§ getLineCenter()

§ getOrthogonal()

PositionVector PositionVector::getOrthogonal ( const Position p,
SUMOReal  extend,
SUMOReal distToClosest 
) const

return orthogonal through p (extending this vector if necessary)

Parameters
[in]pThe point through which to draw the orthogonal
[in]extendhow long to extend this vector for finding an orthogonal
[out]distToClosestDistance between the intersection point and the closest geometry point

Definition at line 1198 of file PositionVector.cpp.

References Position::distanceTo2D(), extrapolate2D(), indexOfClosest(), GeomHelper::INVALID_OFFSET, nearest_offset_to_point2D(), NUMERICAL_EPS, positionAtOffset2D(), and SUMOReal.

Referenced by NBEdge::setNodeBorder().

§ getPolygonCenter()

Position PositionVector::getPolygonCenter ( ) const

Returns the arithmetic of all corner points.

Note
: this is different from the centroid!

Definition at line 319 of file PositionVector.cpp.

References SUMOReal.

Referenced by NIVissimNodeCluster::buildNBNode(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), GUIPolygon::drawGL(), and NBNode::getCenter().

§ getSubpart()

§ getSubpart2D()

§ getSubpartByIndex()

PositionVector PositionVector::getSubpartByIndex ( int  beginIndex,
int  count 
) const

get subpart of a position vector using index and a cout

Definition at line 665 of file PositionVector.cpp.

References SUMOReal.

Referenced by NBNode::buildWalkingAreas(), NBNodeShapeComputer::computeNodeShapeSmall(), NBEdge::getInnerGeometry(), and NBEdge::startShapeAt().

§ hasElevation()

bool PositionVector::hasElevation ( ) const

return whether two positions differ in z-coordinate

Definition at line 1060 of file PositionVector.cpp.

§ indexOfClosest()

int PositionVector::indexOfClosest ( const Position p) const

index of the closest position to p

Note
: may only be called for a non-empty vector

Definition at line 767 of file PositionVector.cpp.

References Position::distanceTo(), max, and SUMOReal.

Referenced by GNEEdge::changeGeometry(), GNEEdge::deleteGeometry(), GNEPoly::deleteGeometryNear(), getOrthogonal(), GNEEdge::getSplitPos(), GNEEdge::setEndpoint(), and GUILane::splitAtSegments().

§ insertAtClosest()

int PositionVector::insertAtClosest ( const Position p)

inserts p between the two closest positions and returns the insertion index

Definition at line 784 of file PositionVector.cpp.

References Position::distanceTo2D(), length(), max, GeomHelper::nearest_offset_on_line_to_point2D(), positionAtOffset2D(), and SUMOReal.

Referenced by GNEEdge::changeGeometry(), and GUILane::splitAtSegments().

§ intersectionPosition2D() [1/2]

Position PositionVector::intersectionPosition2D ( const Position p1,
const Position p2,
const SUMOReal  withinDist = 0. 
) const

§ intersectionPosition2D() [2/2]

Position PositionVector::intersectionPosition2D ( const PositionVector v1) const

Returns the position of the intersection.

Definition at line 161 of file PositionVector.cpp.

References intersectionPosition2D(), intersects(), and Position::INVALID.

§ intersects() [1/3]

§ intersects() [2/3]

bool PositionVector::intersects ( const PositionVector v1) const

Returns the information whether this list of points interesects one the given lines.

Definition at line 135 of file PositionVector.cpp.

References intersects().

§ intersects() [3/3]

bool PositionVector::intersects ( const Position p11,
const Position p12,
const Position p21,
const Position p22,
const SUMOReal  withinDist = 0.,
SUMOReal x = 0,
SUMOReal y = 0,
SUMOReal mu = 0 
)
staticprivate

return whether the line segments defined by Line p11,p12 and Line p21,p22 intersect

Definition at line 1074 of file PositionVector.cpp.

References Position::distanceTo2D(), SUMOReal, Position::x(), and Position::y().

§ intersectsAtLengths2D() [1/2]

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 821 of file PositionVector.cpp.

Referenced by NBNodeShapeComputer::closestIntersection(), NBNodeShapeComputer::computeNodeShapeDefault(), computeSameEnd(), NBEdge::firstIntersection(), MSLink::setRequestInformation(), and NBEdge::startShapeAt().

§ intersectsAtLengths2D() [2/2]

std::vector< SUMOReal > PositionVector::intersectsAtLengths2D ( const Position lp1,
const Position lp2 
) const

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 832 of file PositionVector.cpp.

References Position::distanceTo2D(), intersects(), and SUMOReal.

§ isClosed()

bool PositionVector::isClosed ( ) const

check if PositionVector is closed

Definition at line 1023 of file PositionVector.cpp.

Referenced by area(), GNEEdge::changeGeometry(), and getCentroid().

§ isLeft()

SUMOReal PositionVector::isLeft ( const Position P0,
const Position P1,
const Position P2 
) const

get left

Note
previously marked with "!!!"

Definition at line 567 of file PositionVector.cpp.

References Position::x(), and Position::y().

Referenced by transformToVectorCoordinates().

§ length()

§ length2D()

§ mirrorX()

void PositionVector::mirrorX ( )

Definition at line 531 of file PositionVector.cpp.

Referenced by NBDistrict::mirrorX(), NBNode::mirrorX(), and NBEdge::mirrorX().

§ move2side()

§ nearest_offset_to_point2D()

§ operator==()

bool PositionVector::operator== ( const PositionVector v2) const

comparing operation

Definition at line 1045 of file PositionVector.cpp.

§ operator[]() [1/2]

const Position & PositionVector::operator[] ( int  index) const

returns the constat position at the given index !!! exceptions?

Definition at line 172 of file PositionVector.cpp.

§ operator[]() [2/2]

Position & PositionVector::operator[] ( int  index)

returns the position at the given index !!! exceptions?

Definition at line 182 of file PositionVector.cpp.

§ overlapsWith()

bool PositionVector::overlapsWith ( const AbstractPoly poly,
SUMOReal  offset = 0 
) const
virtual

Returns the information whether the given polygon overlaps with this.

Note
Again a boundary may be specified

Implements AbstractPoly.

Definition at line 110 of file PositionVector.cpp.

References AbstractPoly::around().

Referenced by MSLane::detectCollisions(), and NIVissimAbstractEdge::overlapsWith().

§ partialWithin()

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 441 of file PositionVector.cpp.

References AbstractPoly::around().

§ positionAtOffset() [1/2]

Position PositionVector::positionAtOffset ( SUMOReal  pos,
SUMOReal  lateralOffset = 0 
) const

§ positionAtOffset() [2/2]

Position PositionVector::positionAtOffset ( const Position p1,
const Position p2,
SUMOReal  pos,
SUMOReal  lateralOffset = 0. 
)
static

Returns the position between the two given point at the specified position.

Definition at line 269 of file PositionVector.cpp.

References Position::distanceTo(), Position::INVALID, sideOffset(), and SUMOReal.

§ positionAtOffset2D() [1/2]

§ positionAtOffset2D() [2/2]

Position PositionVector::positionAtOffset2D ( const Position p1,
const Position p2,
SUMOReal  pos,
SUMOReal  lateralOffset = 0. 
)
static

Returns the position between the two given point at the specified position.

Definition at line 289 of file PositionVector.cpp.

References Position::distanceTo2D(), Position::INVALID, sideOffset(), and SUMOReal.

§ push_back_noDoublePos()

§ push_front_noDoublePos()

void PositionVector::push_front_noDoublePos ( const Position p)

§ removeClosest()

int PositionVector::removeClosest ( const Position p)

removes the point closest to p and return the removal index

Definition at line 802 of file PositionVector.cpp.

References Position::distanceTo2D(), max, and SUMOReal.

§ removeDoublePoints()

void PositionVector::removeDoublePoints ( SUMOReal  minDist = POSITION_EPS,
bool  assertLength = false 
)

Removes positions if too near.

Parameters
[in]minDistThe minimum accepted distance; default: POSITION_EPS
[in]assertLengthWhether the result must at least contain two points (be a line); default: false, to ensure original behaviour

Definition at line 1029 of file PositionVector.cpp.

Referenced by NIImporter_OpenDrive::computeShapes(), NBEdge::init(), and NBEdge::reduceGeometry().

§ reverse()

§ rotate2D()

void PositionVector::rotate2D ( SUMOReal  angle)

Definition at line 1158 of file PositionVector.cpp.

References SUMOReal.

Referenced by NWWriter_OpenDrive::writeGeomPP3().

§ rotationAtOffset()

§ rotationDegreeAtOffset()

§ scaleAbsolute()

void PositionVector::scaleAbsolute ( SUMOReal  offset)

enlarges/shrinks the polygon by an absolute offset based at the centroid

Definition at line 381 of file PositionVector.cpp.

References getCentroid().

Referenced by around().

§ scaleRelative()

void PositionVector::scaleRelative ( SUMOReal  factor)

enlarges/shrinks the polygon by a factor based at the centroid

Definition at line 372 of file PositionVector.cpp.

References getCentroid().

Referenced by GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), and MSVehicle::getBoundingPoly().

§ sideOffset()

Position PositionVector::sideOffset ( const Position beg,
const Position end,
const SUMOReal  amount 
)
static

get a side position of position vector using a offset

Definition at line 897 of file PositionVector.cpp.

References Position::distanceTo2D(), SUMOReal, Position::x(), and Position::y().

Referenced by move2side(), positionAtOffset(), positionAtOffset2D(), NIImporter_SUMO::reconstructEdgeShape(), and NWWriter_OpenDrive::writeNetwork().

§ simplified()

PositionVector PositionVector::simplified ( ) const

return the same shape with intermediate colinear points removed

Definition at line 1173 of file PositionVector.cpp.

References Position::distanceTo2D(), NUMERICAL_EPS, SUMOReal, Position::x(), and Position::y().

Referenced by NWWriter_SUMO::writeJunction().

§ slopeDegreeAtOffset()

SUMOReal PositionVector::slopeDegreeAtOffset ( SUMOReal  pos) const

Returns the slope at the given length.

Definition at line 250 of file PositionVector.cpp.

References Position::distanceTo(), Position::distanceTo2D(), RAD2DEG, SUMOReal, and Position::z().

Referenced by MEVehicle::getSlope(), and MSVehicle::getSlope().

§ sortAsPolyCWByAngle()

void PositionVector::sortAsPolyCWByAngle ( )

short as polygon CV by angle

Definition at line 511 of file PositionVector.cpp.

Referenced by convexHull().

§ sortByIncreasingXY()

void PositionVector::sortByIncreasingXY ( )

shory by increasing X-Y Psitions

Definition at line 548 of file PositionVector.cpp.

§ splitAt()

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 458 of file PositionVector.cpp.

References length(), POSITION_EPS, positionAtOffset(), SUMOReal, toString(), and WRITE_WARNING.

Referenced by NBEdge::buildInnerEdges(), NBEdgeCont::splitAt(), and GNENet::splitEdge().

§ transformToVectorCoordinates()

Position PositionVector::transformToVectorCoordinates ( const Position p,
bool  extend = false 
) const

return position p within the length-wise coordinate system defined by this position vector. The x value is the same as that returned by nearest_offset_to_point2D(p) and the y value is the perpendicular distance to this vector with the sign indicating the side (right is postive). if extend is true, the vector is extended on both sides and the x-coordinate of the result may be below 0 or above the length of the original vector

Definition at line 720 of file PositionVector.cpp.

References distance2D(), Position::distanceTo2D(), extrapolate(), Position::INVALID, GeomHelper::INVALID_OFFSET, isLeft(), max, GeomHelper::nearest_offset_on_line_to_point2D(), positionAtOffset(), sign, SUMOReal, and transformToVectorCoordinates().

Referenced by MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::moveInDirection(), and transformToVectorCoordinates().

Friends And Related Function Documentation

§ operator<<

std::ostream& operator<< ( std::ostream &  os,
const PositionVector geom 
)
friend

Definition at line 499 of file PositionVector.cpp.


The documentation for this class was generated from the following files: