Eclipse SUMO - Simulation of Urban MObility
Position Class Reference

A point in 2D or 3D with translation and scaling methods. More...

#include <Position.h>

Inheritance diagram for Position:
[legend]
Collaboration diagram for Position:
[legend]

Public Member Functions

void add (const Position &pos)
 Adds the given position to this one. More...
 
void add (double dx, double dy)
 Adds the given position to this one. More...
 
void add (double dx, double dy, double dz)
 Adds the given position to this one. More...
 
bool almostSame (const Position &p2, double maxDiv=POSITION_EPS) const
 check if two position is almost the sme as other More...
 
double angleTo2D (const Position &other) const
 returns the angle in the plane of the vector pointing from here to the other position (in radians between -M_PI and M_PI) More...
 
Position crossProduct (const Position &pos)
 returns the cross product between this point and the second one More...
 
double distanceSquaredTo (const Position &p2) const
 returns the square of the distance to another position More...
 
double distanceSquaredTo2D (const Position &p2) const
 returns the square of the distance to another position (Only using x and y positions) More...
 
double distanceTo (const Position &p2) const
 returns the euclidean distance in 3 dimension More...
 
double distanceTo2D (const Position &p2) const
 returns the euclidean distance in the x-y-plane More...
 
void div (double val)
 Divides position with the given value. More...
 
double dotProduct (const Position &pos) const
 returns the dot product (scalar product) between this point and the second one More...
 
bool isNAN () const
 check if position is NAN More...
 
double length2D () const
 Computes the length of the given vector. More...
 
void mul (double mx, double my)
 Multiplies position with the given values. More...
 
void mul (double mx, double my, double mz)
 Multiplies position with the given values. More...
 
void mul (double val)
 Multiplies position with the given value. More...
 
void norm2D ()
 Normalizes the given vector. More...
 
bool operator!= (const Position &p2) const
 difference operator More...
 
Position operator* (double scalar) const
 keep the direction but modify the length of the (location) vector to length * scalar More...
 
Position operator+ (const Position &p2) const
 add operator More...
 
Position operator+ (double offset) const
 keep the direction but modify the length of the (location) vector to length + scalar More...
 
Position operator- (const Position &p2) const
 sub operator More...
 
Position operator- (double offset) const
 keep the direction but modify the length of the (location) vector to length - scalar More...
 
Position operator/ (double scalar) const
 keep the direction but modify the length of the (location) vector to length / scalar More...
 
bool operator< (const Position &p2) const
 lexicographical sorting for use in maps and sets More...
 
bool operator== (const Position &p2) const
 comparation operator More...
 
 Position ()
 default constructor More...
 
 Position (double x, double y)
 Parametrised constructor (only for x-y) More...
 
 Position (double x, double y, double z)
 Parametrised constructor. More...
 
Position rotateAround2D (double rad, const Position &origin)
 rotate this position by rad around origin and return the result More...
 
void set (const Position &pos)
 set position with another position More...
 
void set (double x, double y)
 set positions x and y More...
 
void set (double x, double y, double z)
 set positions x, y and z More...
 
void setx (double x)
 set position x More...
 
void sety (double y)
 set position y More...
 
void setz (double z)
 set position z More...
 
double slopeTo2D (const Position &other) const
 returns the slope of the vector pointing from here to the other position (in radians between -M_PI and M_PI) More...
 
void sub (const Position &pos)
 Subtracts the given position from this one. More...
 
void sub (double dx, double dy)
 Subtracts the given position from this one. More...
 
void sub (double dx, double dy, double dz)
 Subtracts the given position from this one. More...
 
void swapXY ()
 swap position X and Y More...
 
double x () const
 Returns the x-position. More...
 
double y () const
 Returns the y-position. More...
 
double z () const
 Returns the z-position. More...
 
 ~Position ()
 Destructor. More...
 

Static Public Attributes

static const Position INVALID
 used to indicate that a position is valid More...
 

Private Attributes

double myX
 The x-position. More...
 
double myY
 The y-position. More...
 
double myZ
 The z-position. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Position &p)
 output operator More...
 

Detailed Description

A point in 2D or 3D with translation and scaling methods.

Definition at line 37 of file Position.h.

Constructor & Destructor Documentation

◆ Position() [1/3]

Position::Position ( )
inline

default constructor

Definition at line 40 of file Position.h.

Referenced by crossProduct(), GUIPointOfInterest::drawInnerPOI(), GNEPOI::drawPOI(), operator*(), operator+(), operator-(), operator/(), rotateAround2D(), and GNEPOI::updateGeometry().

Here is the caller graph for this function:

◆ Position() [2/3]

Position::Position ( double  x,
double  y 
)
inline

Parametrised constructor (only for x-y)

Definition at line 44 of file Position.h.

◆ Position() [3/3]

Position::Position ( double  x,
double  y,
double  z 
)
inline

Parametrised constructor.

Definition at line 48 of file Position.h.

◆ ~Position()

Position::~Position ( )
inline

Destructor.

Definition at line 52 of file Position.h.

Member Function Documentation

◆ add() [1/3]

void Position::add ( const Position pos)
inline

◆ add() [2/3]

void Position::add ( double  dx,
double  dy 
)
inline

Adds the given position to this one.

Definition at line 139 of file Position.h.

References myX, and myY.

◆ add() [3/3]

void Position::add ( double  dx,
double  dy,
double  dz 
)
inline

Adds the given position to this one.

Definition at line 145 of file Position.h.

References myX, myY, and myZ.

◆ almostSame()

bool Position::almostSame ( const Position p2,
double  maxDiv = POSITION_EPS 
) const
inline

check if two position is almost the sme as other

Definition at line 256 of file Position.h.

References distanceTo().

Referenced by NBNode::getEndPoints(), PositionVector::insert_noDoublePos(), AGPosition::operator==(), MSStageWalking::proceed(), PositionVector::push_back_noDoublePos(), and PositionVector::push_front_noDoublePos().

Here is the caller graph for this function:

◆ angleTo2D()

◆ crossProduct()

Position Position::crossProduct ( const Position pos)
inline

returns the cross product between this point and the second one

Definition at line 291 of file Position.h.

References myX, myY, myZ, and Position().

Referenced by NBHeightMapper::Triangle::normalVector().

Here is the caller graph for this function:

◆ distanceSquaredTo()

double Position::distanceSquaredTo ( const Position p2) const
inline

returns the square of the distance to another position

Definition at line 266 of file Position.h.

References myX, myY, and myZ.

Referenced by distanceTo(), GNEViewNet::drawTemporalJunction(), and GNEVehicle::getMoveOperation().

Here is the caller graph for this function:

◆ distanceSquaredTo2D()

◆ distanceTo()

double Position::distanceTo ( const Position p2) const
inline

returns the euclidean distance in 3 dimension

Definition at line 261 of file Position.h.

References distanceSquaredTo().

Referenced by MSDevice_SSM::Encounter::add(), MSStoppingPlace::addAccess(), IntermodalNetwork< E, L, N, V >::addSchedule(), almostSame(), TraCIServerAPI_Simulation::commandDistanceRequest(), NBHelpers::distance(), AGPosition::distanceTo(), GLHelper::drawBoxLines(), GUIOverheadWire::drawGL(), GUIOverheadWireClamp::drawGL(), GLHelper::drawTriangleAtEnd(), PositionVector::extrapolate(), LIBSUMO_NAMESPACE::Simulation::getDistance2D(), LIBSUMO_NAMESPACE::Simulation::getDistanceRoad(), GUIOverheadWire::GUIOverheadWire(), GUIParkingArea::GUIParkingArea(), PositionVector::indexOfClosest(), GUIChargingStation::initAppearance(), GUIBusStop::initShape(), GUIE2Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GeomHelper::nearest_offset_on_line_to_point25D(), MSDevice_Bluelight::notifyMove(), GNEViewNet::onCmdTransformPOI(), GUIViewTraffic::onGamingClick(), operator+(), operator-(), RONetHandler::parseAccess(), PositionVector::positionAtOffset(), MSStageWalking::proceed(), NIVissimEdge::remapOneOfNodes(), PositionVector::rotationAtOffset(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), PositionVector::sidePositionAtAngle(), PositionVector::slopeDegreeAtOffset(), GUILane::splitAtSegments(), GNETAZRelData::updateGeometry(), and MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility().

Here is the caller graph for this function:

◆ distanceTo2D()

double Position::distanceTo2D ( const Position p2) const
inline

returns the euclidean distance in the x-y-plane

Definition at line 271 of file Position.h.

References distanceSquaredTo2D().

Referenced by MSCFModel_CC::_consensus(), MSCFModel_CC::_v(), NIImporter_OpenDrive::addOffsets(), libsumo::Helper::applySubscriptionFilterFieldOfVision(), GUISettingsHandler::applyViewport(), NBNode::bezierControlPoints(), NBNode::buildWalkingAreas(), GUIGeometry::calculateLength(), GNEMoveElement::calculateNewLane(), NGRandomNetBuilder::canConnect(), NBNode::checkCrossing(), MSLink::checkWalkingAreaFoe(), GUIBaseVehicle::computeSeats(), NIImporter_OpenDrive::discretizeOffsets(), PositionVector::distance2D(), NBNodeShapeComputer::divisionWidth(), GUIVehicle::drawAction_drawCarriageClass(), GUIBusStop::drawGL(), GNEDemandElement::drawJunctionLine(), GNEVehicle::drawLanePartialGL(), GNERoute::drawRoutePartialLane(), GNEPathCreator::drawTemporalRoute(), GNEPlanCreator::drawTemporalRoute(), GNEEdge::editEndpoint(), MSPModel_JuPedSim::execute(), PositionVector::extrapolate2D(), NBPTStopCont::findAccessEdgesForRailStops(), NBNodeCont::generateNodeClusters(), MSLane::getLeadersOnConsecutive(), PositionVector::getMaxGrade(), MSPModel_NonInteracting::CState::getPosition(), NBEdge::getSignalOffset(), NBNodeShapeComputer::getSmoothCorner(), MSVehicle::Influencer::implicitDeltaPosRemote(), MSVehicle::Influencer::implicitSpeedRemote(), PositionVector::indexOfClosest(), GUILane::initRotations(), PositionVector::insertAtClosest(), MSPModel_Striping::insertWalkArePaths(), PositionVector::intersects(), PositionVector::intersectsAtLengths2D(), PCLoaderOSM::loadIfSet(), PCLoaderOSM::mergeClosest(), PositionVector::move2side(), PositionVector::move2sideCustom(), LIBSUMO_NAMESPACE::Vehicle::moveTo(), LIBSUMO_NAMESPACE::Person::moveToXY(), LIBSUMO_NAMESPACE::Vehicle::moveToXY(), MSPModel_Striping::PState::moveToXY(), GeomHelper::nearest_offset_on_line_to_point25D(), GeomHelper::nearest_offset_on_line_to_point2D(), PositionVector::nearest_offset_to_point25D(), MSDevice_Bluelight::notifyMove(), GUIViewTraffic::onGamingClick(), PositionVector::positionAtOffset2D(), NBNodeCont::pruneClusterFringe(), PositionVector::removeClosest(), GNEEdge::resetEndpoint(), NBNodeCont::shortestEdge(), PositionVector::sideOffset(), PositionVector::simplified(), slopeTo2D(), PositionVector::smoothedZFront(), PositionVector::transformToVectorCoordinates(), MSStageWalking::walkDistance(), NWWriter_OpenDrive::writeGeomLines(), NWWriter_OpenDrive::writeGeomSmooth(), NWWriter_OpenDrive::writeRoadObjectPOI(), and NWWriter_OpenDrive::writeRoadObjectPoly().

◆ div()

void Position::div ( double  val)
inline

Divides position with the given value.

Definition at line 112 of file Position.h.

References myX, myY, and myZ.

◆ dotProduct()

double Position::dotProduct ( const Position pos) const
inline

returns the dot product (scalar product) between this point and the second one

Definition at line 299 of file Position.h.

References myX, myY, and myZ.

Referenced by NBHeightMapper::Triangle::getZ(), and PositionVector::as_poly_cw_sorter::operator()().

Here is the caller graph for this function:

◆ isNAN()

bool Position::isNAN ( ) const
inline

check if position is NAN

Definition at line 312 of file Position.h.

References myX, myY, and myZ.

◆ length2D()

double Position::length2D ( ) const
inline

Computes the length of the given vector.

Definition at line 172 of file Position.h.

References myX, and myY.

Referenced by MSTrainHelper::computeDoorPositions(), MSTrainHelper::computeUnboardingPositions(), MSPModel_JuPedSim::execute(), and norm2D().

Here is the caller graph for this function:

◆ mul() [1/3]

void Position::mul ( double  mx,
double  my 
)
inline

Multiplies position with the given values.

Definition at line 119 of file Position.h.

References myX, and myY.

◆ mul() [2/3]

void Position::mul ( double  mx,
double  my,
double  mz 
)
inline

Multiplies position with the given values.

Definition at line 125 of file Position.h.

References myX, myY, and myZ.

◆ mul() [3/3]

void Position::mul ( double  val)
inline

◆ norm2D()

void Position::norm2D ( )
inline

Normalizes the given vector.

Definition at line 177 of file Position.h.

References length2D(), myX, and myY.

Referenced by MSTrainHelper::computeDoorPositions(), MSTrainHelper::computeUnboardingPositions(), MSPModel_JuPedSim::execute(), NBNode::getEmptyDir(), NBNode::indirectLeftShape(), and MSStageDriving::setArrived().

Here is the caller graph for this function:

◆ operator!=()

bool Position::operator!= ( const Position p2) const
inline

difference operator

Definition at line 240 of file Position.h.

References myX, myY, and myZ.

◆ operator*()

Position Position::operator* ( double  scalar) const
inline

keep the direction but modify the length of the (location) vector to length * scalar

Definition at line 205 of file Position.h.

References myX, myY, myZ, and Position().

◆ operator+() [1/2]

Position Position::operator+ ( const Position p2) const
inline

add operator

Definition at line 195 of file Position.h.

References myX, myY, myZ, and Position().

◆ operator+() [2/2]

Position Position::operator+ ( double  offset) const
inline

keep the direction but modify the length of the (location) vector to length + scalar

Definition at line 215 of file Position.h.

References distanceTo(), myX, myY, myZ, and Position().

◆ operator-() [1/2]

Position Position::operator- ( const Position p2) const
inline

sub operator

Definition at line 200 of file Position.h.

References myX, myY, myZ, and Position().

◆ operator-() [2/2]

Position Position::operator- ( double  offset) const
inline

keep the direction but modify the length of the (location) vector to length - scalar

Definition at line 225 of file Position.h.

References distanceTo(), myX, myY, myZ, and Position().

◆ operator/()

Position Position::operator/ ( double  scalar) const
inline

keep the direction but modify the length of the (location) vector to length / scalar

Definition at line 210 of file Position.h.

References myX, myY, myZ, and Position().

◆ operator<()

bool Position::operator< ( const Position p2) const
inline

lexicographical sorting for use in maps and sets

Definition at line 245 of file Position.h.

References myX, myY, and myZ.

◆ operator==()

bool Position::operator== ( const Position p2) const
inline

comparation operator

Definition at line 235 of file Position.h.

References myX, myY, and myZ.

◆ rotateAround2D()

Position Position::rotateAround2D ( double  rad,
const Position origin 
)

rotate this position by rad around origin and return the result

Definition at line 41 of file Position.cpp.

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

Referenced by GUISUMOAbstractView::applyGLTransform(), GUIJunctionWrapper::drawGL(), GUIDanielPerspectiveChanger::onMouseMove(), and GUISUMOAbstractView::screenPos2NetPos().

Here is the caller graph for this function:

◆ set() [1/3]

void Position::set ( const Position pos)
inline

set position with another position

Definition at line 98 of file Position.h.

References myX, myY, and myZ.

◆ set() [2/3]

◆ set() [3/3]

void Position::set ( double  x,
double  y,
double  z 
)
inline

set positions x, y and z

Definition at line 91 of file Position.h.

References myX, myY, myZ, x(), y(), and z().

◆ setx()

void Position::setx ( double  x)
inline

set position x

Definition at line 70 of file Position.h.

References myX, and x().

Referenced by MSCFModel_CC::_consensus(), MSPModel_JuPedSim::add(), NIXMLNodesHandler::addJoinCluster(), GeomHelper::calculateLotSpacePosition(), MSPModel_JuPedSim::execute(), NBNodeCont::joinNodeCluster(), GNENet::joinSelectedJunctions(), and GUISUMOAbstractView::snapToActiveGrid().

Here is the caller graph for this function:

◆ sety()

void Position::sety ( double  y)
inline

set position y

Definition at line 75 of file Position.h.

References myY, and y().

Referenced by MSCFModel_CC::_consensus(), MSPModel_JuPedSim::add(), GeomHelper::calculateLotSpacePosition(), MSPModel_JuPedSim::execute(), NBNodeCont::joinNodeCluster(), GNENet::joinSelectedJunctions(), NBEdge::mirrorX(), GUISUMOAbstractView::snapToActiveGrid(), and NGNet::toNB().

Here is the caller graph for this function:

◆ setz()

◆ slopeTo2D()

double Position::slopeTo2D ( const Position other) const
inline

returns the slope of the vector pointing from here to the other position (in radians between -M_PI and M_PI)

Definition at line 286 of file Position.h.

References distanceTo2D(), and myZ.

Referenced by MSVehicle::getSlope(), and PositionVector::slopeDegreeAtOffset().

Here is the caller graph for this function:

◆ sub() [1/3]

void Position::sub ( const Position pos)
inline

Subtracts the given position from this one.

Definition at line 165 of file Position.h.

References myX, myY, and myZ.

◆ sub() [2/3]

void Position::sub ( double  dx,
double  dy 
)
inline

Subtracts the given position from this one.

Definition at line 152 of file Position.h.

References myX, and myY.

Referenced by NBNode::bezierControlPoints(), GeoConvHelper::cartesian2geo(), AGPosition::compute2dPosition(), PositionVector::extrapolate(), PositionVector::extrapolate2D(), NBNode::getEmptyDir(), NBHeightMapper::Triangle::getZ(), LIBSUMO_NAMESPACE::Vehicle::highlight(), and NBNode::indirectLeftShape().

Here is the caller graph for this function:

◆ sub() [3/3]

void Position::sub ( double  dx,
double  dy,
double  dz 
)
inline

Subtracts the given position from this one.

Definition at line 158 of file Position.h.

References myX, myY, and myZ.

◆ swapXY()

void Position::swapXY ( )
inline

swap position X and Y

Definition at line 307 of file Position.h.

References myX, myY, and std::swap().

Referenced by GNEShapeFrame::GEOPOICreator::onCmdCreateGEOPOI(), and GNEShapeFrame::GEOPOICreator::onCmdSetCoordinates().

Here is the caller graph for this function:

◆ x()

double Position::x ( ) const
inline

Returns the x-position.

Definition at line 55 of file Position.h.

References myX.

Referenced by MSCFModel_CC::_consensus(), PositionVector::add(), Boundary::add(), LIBSUMO_NAMESPACE::POI::add(), MSPModel_JuPedSim::add(), NIXMLNodesHandler::addNode(), MSPModel_Striping::addVehicleFoe(), MSPModel_JuPedSim::addWaypoint(), GeomHelper::angle2D(), GUISUMOAbstractView::applyGLTransform(), GUISettingsHandler::applyViewport(), Boundary::around(), PositionVector::around(), Boundary::around2D(), NBPTStopCont::assignEdgeForFloatingStops(), PositionVector::as_poly_cw_sorter::atAngle2D(), PositionVector::bezier(), NBNode::bezierControlPoints(), GNEAdditionalFrame::buildAdditionalOverView(), GNEContour::buildContourCircle(), GNEWireFrame::buildWireOverView(), GeomHelper::calculateLotSpaceAngle(), GeomHelper::calculateLotSpacePosition(), GNEViewNetHelper::MoveSingleElementModul::calculateMoveOffset(), GNEViewNetHelper::MoveMultipleElementModul::calculateMoveOffset(), GUIGeometry::calculateRotation(), NIImporter_OpenDrive::calculateStraightEndPoint(), GeoConvHelper::cartesian2geo(), GUIOSGPerspectiveChanger::centerTo(), GUIDanielPerspectiveChanger::centerTo(), MSPerson::checkAccess(), NGRandomNetBuilder::checkAngles(), GUISUMOAbstractView::checkGDALImage(), TraCIServerAPI_Simulation::commandPositionConversion(), NBPTStopCont::computeCrossProductEdgePosition(), NBNodeShapeComputer::computeNodeShapeSmall(), MSTrainHelper::computeUnboardingPositions(), MSPModel_JuPedSim::createGeometryFromAnchors(), NGRandomNetBuilder::createNewNode(), Boundary::distanceTo2D(), GUIVehicle::drawAction_drawCarriageClass(), GUITLLogicPhasesTrackerWindow::drawAdditionalStates(), GUILane::drawArrows(), GNELane::drawArrows(), GLHelper::drawBoxLine(), GLHelper::drawBoxLines(), GNECalibrator::drawCalibratorSymbol(), GUISUMOAbstractView::drawDecals(), GNEDetector::drawE1DetectorLogo(), GNEDetector::drawE2DetectorLogo(), GNELaneAreaDetector::drawE2PartialLane(), GNEJunction::drawElevation(), GNEDemandElementPlan::drawEndPosition(), GLHelper::drawFilledPoly(), GNEDemandElementFlow::drawFlowLabel(), GUIBusStop::drawGL(), GUICalibrator::drawGL(), GUIChargingStation::drawGL(), GUIJunctionWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIOverheadWire::drawGL(), GUIOverheadWireClamp::drawGL(), GUIParkingArea::drawGL(), GUITrafficLightLogicWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNETAZ::drawGL(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEVehicle::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GNEJunction::drawJunctionAsBubble(), GNEDemandElement::drawJunctionLine(), GNELane::drawLane2LaneConnections(), GUILane::drawLane2LaneConnections(), GNEVehicle::drawLanePartialGL(), GNELane::drawLaneStopOffset(), GLHelper::drawLine(), GNEStoppingPlace::drawLines(), GUIBaseVehicle::drawLinkItem(), GUILane::drawLinkRule(), GUILane::drawLinkRules(), GNEAdditional::drawListedAdditional(), GNEViewNetHelper::LockIcon::drawLockIcon(), GUIBaseVehicle::drawOnPos(), GNEPOI::drawPOI(), GLHelper::drawRectangle(), GNEAdditional::drawSemiCircleGeometryPoint(), GNEStoppingPlace::drawSign(), GUIE3Collector::MyWrapper::drawSingleCrossing(), GLHelper::drawSpaceOccupancies(), GNEAdditional::drawSquaredAdditional(), GNEDemandElement::drawStackLabel(), GNEStopPlan::drawStopOverStoppingPlace(), GNEViewNet::drawTemporalJunction(), GNEPathCreator::drawTemporalRoute(), GNEPlanCreator::drawTemporalRoute(), TesselatedPolygon::drawTesselation(), GNEViewNetHelper::TestingMode::drawTestingElements(), GNEViewNet::drawTestsCircle(), GLHelper::drawText(), GLHelper::drawTextAtEnd(), GLHelper::drawTextBox(), GNEJunction::drawTLSIcon(), GLHelper::drawTriangleAtEnd(), MSVTypeProbe::execute(), MSPModel_JuPedSim::execute(), NBNodeCont::extract(), NBPTStopCont::findAccessEdgesForRailStops(), GeomHelper::findLineCircleIntersections(), NIImporter_OpenDrive::geomFromLine(), GNEPOI::getAttribute(), PointOfInterest::getCenter(), GUIPointOfInterest::getCenteringBoundary(), NBNode::getEmptyDir(), MSPModel_Striping::getNextLaneObstacles(), MSCFModel_CC::getParameter(), PositionVector::getPolygonCenter(), MSVTKExport::getPositions(), LIBSUMO_NAMESPACE::InductionLoop::getTree(), GUIGeometry::getVertexCircleAroundPosition(), GUIDanielPerspectiveChanger::getXPos(), NBHeightMapper::getZ(), GUIJunctionWrapper::GUIJunctionWrapper(), GUIOverheadWire::GUIOverheadWire(), GUIParkingArea::GUIParkingArea(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUIChargingStation::initAppearance(), GUINet::initGUIStructures(), GUILane::initRotations(), GUIBusStop::initShape(), NBNodeCont::insert(), PositionVector::insertAtClosest(), PositionVector::intersects(), PositionVector::isClockwiseOriented(), PositionVector::isLeft(), NBNodeCont::joinNodeCluster(), NBNodeCont::joinSameJunctions(), GNENet::joinSelectedJunctions(), MSAbstractLaneChangeModel::laneChangeOutput(), NBHeightMapper::loadTiff(), libsumo::Helper::makeTraCIPosition(), NWWriter_OpenDrive::mapmatchRoadObjects(), MSDevice_FCDReplay::move(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::PState::moveToXY(), MSParkingArea::MSParkingArea(), GUISettingsHandler::myStartElement(), GUIE2Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIMEInductLoop::MyWrapper::MyWrapper(), GeomHelper::nearest_offset_on_line_to_point2D(), MSDevice_ToC::notifyMove(), GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition(), GUIGLObjectPopupMenu::onCmdCopyViewGeoBoundary(), GNEShapeFrame::GEOPOICreator::onCmdCreateGEOPOI(), GNEShapeFrame::GEOPOICreator::onCmdSetCoordinates(), GUIGLObjectPopupMenu::onCmdShowCursorGeoPositionOnline(), GUIDanielPerspectiveChanger::onMouseMove(), PositionVector::increasing_x_y_sorter::operator()(), NBNodeCont::paretoCheck(), GNEShapeFrame::processClickPOI(), GNEShapeFrame::processClickPOIGeo(), LIBSUMO_NAMESPACE::POI::remove(), MSDevice_ToC::requestToC(), NBNodeCont::retrieve(), rotateAround2D(), PCPolyContainer::saveDlrTDP(), set(), MSStageDriving::setArrived(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), GUIDialog_EditViewport::setValues(), GUIOSGPerspectiveChanger::setViewport(), GUICompleteSchemeStorage::setViewport(), GUISUMOAbstractView::setViewportFromToRot(), setx(), NGNode::setY(), PositionVector::sideOffset(), PositionVector::simplified(), GUISUMOAbstractView::snapToActiveGrid(), PositionVector::sub(), NBNetBuilder::transformCoordinate(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSDevice_ToC::triggerUpwardToC(), MSPModel_JuPedSim::tryPedestrianInsertion(), GNEJunction::updateCenteringBoundary(), GNEParkingArea::updateGeometry(), GNEVehicle::updateGeometry(), GUISUMOAbstractView::updatePositionInformationLabel(), MSElecHybridExport::write(), MSFCDExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), GNEParkingSpace::writeAdditional(), MSElecHybridExport::writeAggregated(), NBSign::writeAsPOI(), NWWriter_OpenDrive::writeGeomLines(), NWWriter_OpenDrive::writeGeomPP3(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWFrame::writePositionLong(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), MSFullExport::writeVehicles(), GUIDialog_EditViewport::writeXML(), PointOfInterest::writeXML(), GeoConvHelper::x2cartesian(), GeoConvHelper::x2cartesian_const(), and GUIDanielPerspectiveChanger::zoom().

◆ y()

double Position::y ( ) const
inline

Returns the y-position.

Definition at line 60 of file Position.h.

References myY.

Referenced by MSCFModel_CC::_consensus(), PositionVector::add(), Boundary::add(), LIBSUMO_NAMESPACE::POI::add(), MSPModel_JuPedSim::add(), MSParkingArea::addLotEntry(), NIXMLNodesHandler::addNode(), MSPModel_Striping::addVehicleFoe(), MSPModel_JuPedSim::addWaypoint(), GeomHelper::angle2D(), GUISUMOAbstractView::applyGLTransform(), GUISettingsHandler::applyViewport(), Boundary::around(), PositionVector::around(), Boundary::around2D(), NBPTStopCont::assignEdgeForFloatingStops(), PositionVector::as_poly_cw_sorter::atAngle2D(), NBNode::bezierControlPoints(), GNEAdditionalFrame::buildAdditionalOverView(), GNEContour::buildContourCircle(), GNEWireFrame::buildWireOverView(), GeomHelper::calculateLotSpaceAngle(), GeomHelper::calculateLotSpacePosition(), GNEViewNetHelper::MoveSingleElementModul::calculateMoveOffset(), GNEViewNetHelper::MoveMultipleElementModul::calculateMoveOffset(), GUIGeometry::calculateRotation(), NIImporter_OpenDrive::calculateStraightEndPoint(), GeoConvHelper::cartesian2geo(), GUIOSGPerspectiveChanger::centerTo(), GUIDanielPerspectiveChanger::centerTo(), MSPerson::checkAccess(), NGRandomNetBuilder::checkAngles(), GUISUMOAbstractView::checkGDALImage(), TraCIServerAPI_Simulation::commandPositionConversion(), NBPTStopCont::computeCrossProductEdgePosition(), NBNodeShapeComputer::computeNodeShapeSmall(), MSTrainHelper::computeUnboardingPositions(), MSPModel_JuPedSim::createGeometryFromAnchors(), NGRandomNetBuilder::createNewNode(), Boundary::distanceTo2D(), GUIVehicle::drawAction_drawCarriageClass(), GUITLLogicPhasesTrackerWindow::drawAdditionalStates(), GUILane::drawArrows(), GNELane::drawArrows(), GLHelper::drawBoxLine(), GLHelper::drawBoxLines(), GNECalibrator::drawCalibratorSymbol(), GUISUMOAbstractView::drawDecals(), GNEDetector::drawE1DetectorLogo(), GNEDetector::drawE2DetectorLogo(), GNELaneAreaDetector::drawE2PartialLane(), GNEJunction::drawElevation(), GNEDemandElementPlan::drawEndPosition(), GLHelper::drawFilledPoly(), GNEDemandElementFlow::drawFlowLabel(), GUIBusStop::drawGL(), GUICalibrator::drawGL(), GUIChargingStation::drawGL(), GUIJunctionWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIOverheadWire::drawGL(), GUIOverheadWireClamp::drawGL(), GUIParkingArea::drawGL(), GUITrafficLightLogicWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNETAZ::drawGL(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEVehicle::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GNEJunction::drawJunctionAsBubble(), GNEDemandElement::drawJunctionLine(), GNELane::drawLane2LaneConnections(), GUILane::drawLane2LaneConnections(), GNEVehicle::drawLanePartialGL(), GNELane::drawLaneStopOffset(), GLHelper::drawLine(), GNEStoppingPlace::drawLines(), GUIBaseVehicle::drawLinkItem(), GUILane::drawLinkRule(), GUILane::drawLinkRules(), GNEAdditional::drawListedAdditional(), GNEViewNetHelper::LockIcon::drawLockIcon(), GUIBaseVehicle::drawOnPos(), GNEPOI::drawPOI(), GLHelper::drawRectangle(), GNEAdditional::drawSemiCircleGeometryPoint(), GNEStoppingPlace::drawSign(), GUIE3Collector::MyWrapper::drawSingleCrossing(), GLHelper::drawSpaceOccupancies(), GNEAdditional::drawSquaredAdditional(), GNEDemandElement::drawStackLabel(), GNEStopPlan::drawStopOverStoppingPlace(), GNEViewNet::drawTemporalJunction(), GNEPathCreator::drawTemporalRoute(), GNEPlanCreator::drawTemporalRoute(), TesselatedPolygon::drawTesselation(), GNEViewNetHelper::TestingMode::drawTestingElements(), GNEViewNet::drawTestsCircle(), GLHelper::drawText(), GLHelper::drawTextAtEnd(), GLHelper::drawTextBox(), GNEJunction::drawTLSIcon(), GLHelper::drawTriangleAtEnd(), MSVTypeProbe::execute(), MSPModel_JuPedSim::execute(), NBNodeCont::extract(), NBPTStopCont::findAccessEdgesForRailStops(), GeomHelper::findLineCircleIntersections(), NIImporter_OpenDrive::geomFromLine(), GNEPOI::getAttribute(), PointOfInterest::getCenter(), GUIPointOfInterest::getCenteringBoundary(), NBNode::getEmptyDir(), MSPModel_Striping::getNextLaneObstacles(), MSCFModel_CC::getParameter(), PositionVector::getPolygonCenter(), MSVTKExport::getPositions(), LIBSUMO_NAMESPACE::InductionLoop::getTree(), GUIGeometry::getVertexCircleAroundPosition(), GUIDanielPerspectiveChanger::getYPos(), NBHeightMapper::getZ(), GUIJunctionWrapper::GUIJunctionWrapper(), GUIOverheadWire::GUIOverheadWire(), GUIParkingArea::GUIParkingArea(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUIChargingStation::initAppearance(), GUINet::initGUIStructures(), GUILane::initRotations(), GUIBusStop::initShape(), NBNodeCont::insert(), PositionVector::insertAtClosest(), PositionVector::intersects(), PositionVector::isClockwiseOriented(), PositionVector::isLeft(), NBNodeCont::joinNodeCluster(), NBNodeCont::joinSameJunctions(), GNENet::joinSelectedJunctions(), MSAbstractLaneChangeModel::laneChangeOutput(), NBHeightMapper::loadTiff(), libsumo::Helper::makeTraCIPosition(), NWWriter_OpenDrive::mapmatchRoadObjects(), NBEdge::mirrorX(), MSDevice_FCDReplay::move(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::PState::moveToXY(), MSParkingArea::MSParkingArea(), GUISettingsHandler::myStartElement(), GUIE2Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIMEInductLoop::MyWrapper::MyWrapper(), GeomHelper::nearest_offset_on_line_to_point2D(), MSDevice_ToC::notifyMove(), GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition(), GUIGLObjectPopupMenu::onCmdCopyViewGeoBoundary(), GNEShapeFrame::GEOPOICreator::onCmdCreateGEOPOI(), GNEShapeFrame::GEOPOICreator::onCmdSetCoordinates(), GUIGLObjectPopupMenu::onCmdShowCursorGeoPositionOnline(), GUIDanielPerspectiveChanger::onMouseMove(), PositionVector::increasing_x_y_sorter::operator()(), NBNodeCont::paretoCheck(), GNEShapeFrame::processClickPOI(), GNEShapeFrame::processClickPOIGeo(), LIBSUMO_NAMESPACE::POI::remove(), MSDevice_ToC::requestToC(), NBNodeCont::retrieve(), rotateAround2D(), PCPolyContainer::saveDlrTDP(), set(), MSStageDriving::setArrived(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), GUIDialog_EditViewport::setValues(), GUIOSGPerspectiveChanger::setViewport(), GUICompleteSchemeStorage::setViewport(), GUISUMOAbstractView::setViewportFromToRot(), NGNode::setX(), sety(), PositionVector::sideOffset(), PositionVector::simplified(), GUISUMOAbstractView::snapToActiveGrid(), PositionVector::sub(), NBNetBuilder::transformCoordinate(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSDevice_ToC::triggerUpwardToC(), MSPModel_JuPedSim::tryPedestrianInsertion(), GNEJunction::updateCenteringBoundary(), GNEParkingArea::updateGeometry(), GNEVehicle::updateGeometry(), GUISUMOAbstractView::updatePositionInformationLabel(), MSElecHybridExport::write(), MSFCDExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), GNEParkingSpace::writeAdditional(), MSElecHybridExport::writeAggregated(), NBSign::writeAsPOI(), NWWriter_OpenDrive::writeGeomLines(), NWWriter_OpenDrive::writeGeomPP3(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWFrame::writePositionLong(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), MSFullExport::writeVehicles(), GUIDialog_EditViewport::writeXML(), PointOfInterest::writeXML(), GeoConvHelper::x2cartesian(), GeoConvHelper::x2cartesian_const(), and GUIDanielPerspectiveChanger::zoom().

◆ z()

double Position::z ( ) const
inline

Returns the z-position.

Definition at line 65 of file Position.h.

References myZ.

Referenced by PositionVector::add(), Boundary::add(), GUISettingsHandler::applyViewport(), Boundary::around(), NBNode::bezierControlPoints(), GNEAdditionalFrame::buildAdditionalOverView(), GNEWireFrame::buildWireOverView(), GeomHelper::calculateLotSpacePosition(), GUIOSGPerspectiveChanger::centerTo(), MSLaneChanger::changeOpposite(), TraCIServerAPI_Simulation::commandPositionConversion(), NBEdge::computeEdgeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), GNEJunction::drawElevation(), GLHelper::drawSpaceOccupancies(), TesselatedPolygon::drawTesselation(), MSVTypeProbe::execute(), GUIJunctionWrapper::getColorValue(), GNEJunction::getColorValue(), PositionVector::getMaxGrade(), PositionVector::getOverlapWith(), PositionVector::getPolygonCenter(), GNELane::getPopUpMenu(), GUILane::getPopUpMenu(), MSVTKExport::getPositions(), NBNodeShapeComputer::getSmoothCorner(), MSVehicle::interpolateLateralZ(), NBNodeCont::joinNodeCluster(), NBNodeCont::joinSameJunctions(), libsumo::Helper::makeTraCIPosition(), PositionVector::move2side(), PositionVector::move2sideCustom(), LIBSUMO_NAMESPACE::Vehicle::moveToXY(), MSParkingArea::MSParkingArea(), GUISettingsHandler::myStartElement(), GNENetHelper::AttributeCarriers::registerJunction(), set(), GUIDialog_EditViewport::setValues(), GUICompleteSchemeStorage::setViewport(), GUISUMOAbstractView::setViewportFromToRot(), setz(), GNEEdge::smoothElevation(), GNEEdge::smoothShape(), GUISUMOAbstractView::snapToActiveGrid(), NBEdge::startShapeAt(), GNEEdge::straightenElevation(), PositionVector::sub(), NBNetBuilder::transformCoordinate(), GNEParkingArea::updateGeometry(), MSElecHybridExport::write(), MSFCDExport::write(), MSEmissionExport::write(), GNEParkingSpace::writeAdditional(), MSElecHybridExport::writeAggregated(), NWWriter_OpenDrive::writeGeomLines(), NWWriter_OpenDrive::writeGeomPP3(), NWWriter_OpenDrive::writeNetwork(), NWFrame::writePositionLong(), MSFCDExport::writeTransportable(), GUIDialog_EditViewport::writeXML(), and PointOfInterest::writeXML().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Position p 
)
friend

output operator

Definition at line 186 of file Position.h.

Field Documentation

◆ INVALID

const Position Position::INVALID
static

used to indicate that a position is valid

Definition at line 317 of file Position.h.

Referenced by MSPModel_JuPedSim::add(), NIXMLNodesHandler::addJoinCluster(), GUIViewObjectsHandler::addPositionOverShape(), GUIEdge::addRerouter(), MSPModel_Striping::addVehicleFoe(), NBEdge::append(), NBNodeShapeComputer::badIntersection(), NBNode::bezierControlPoints(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildTAZ(), GNEContour::calculateContourEdgeGeometryPoints(), GNEMoveElement::calculateMoveShapeOperation(), GUISUMOAbstractView::centerTo(), GUIViewObjectsHandler::checkCircleElement(), GUIViewObjectsHandler::checkGeometryPoint(), GUIViewObjectsHandler::checkPositionOverShape(), GUIViewObjectsHandler::checkShapeElement(), GNEMoveElement::commitMove(), MSVehicle::computeAngle(), MSLaneChanger::continueChange(), GNEContour::drawDottedContourGeometryPoints(), GNEPerson::drawGL(), GNEVehicle::drawGL(), GNELaneAreaDetector::drawLanePartialGL(), GNEOverheadWire::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNENeteditAttributes::drawLaneReference(), GNEDemandElementPlan::drawPlanLanePartial(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), MSVehicle::enterLaneAtMove(), MSVehicle::executeFractionalMove(), MSVehicle::executeMove(), GNETAZFrame::TAZParameters::getAttributesAndValues(), GUIDottedGeometry::getBackPosition(), PositionVector::getCentroid(), GUIDottedGeometry::getFrontPosition(), GUIPerson::getGUIAngle(), GUIPerson::getGUIPosition(), NIXMLShapeHandler::getLanePos(), NLShapeHandler::getLanePos(), PCLoaderXML::getLanePos(), GNEDemandElementPlan::getPlanAttributePosition(), PositionVector::getPolygonCenter(), GUIPerson::getPosition(), MSVehicle::getPosition(), MSPModel_Striping::PState::getPosition(), MSStageDriving::getPosition(), MSStageMoving::getPosition(), MSStageWaiting::getPosition(), MSVehicle::getPositionAlongBestLanes(), GUIViewObjectsHandler::getPositionOverShape(), NBEdge::getSignalOffset(), MSVehicle::getSlope(), MSParkingArea::getVehiclePosition(), GUIVehicle::getVisualPosition(), NBNodeCont::guessTLs(), MSVehicle::handleCollisionStop(), MSVehicle::Influencer::implicitSpeedRemote(), NBNode::indirectLeftShape(), PolygonDynamics::initTrackedPosition(), MSVehicle::interpolateLateralZ(), PositionVector::intersectionPosition2D(), MSVehicle::invalidateCachedPosition(), NBNodeCont::joinNodeCluster(), MSStageDriving::loadState(), MSDevice_SSM::makeStringWithNAs(), NBEdge::mirrorX(), PositionVector::move2side(), PositionVector::move2sideCustom(), GNEMoveElement::moveElement(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToXY(), GUIDialog_EditViewport::onCmdChanged(), GUIDialog_EditViewport::onCmdOk(), GUISUMOAbstractView::onMouseMove(), NLTriggerBuilder::parseAndBuildRerouter(), AdditionalHandler::parseRerouterAttributes(), AdditionalHandler::parseTAZAttributes(), AdditionalHandler::parseTractionSubstation(), PositionVector::positionAtOffset(), PositionVector::positionAtOffset2D(), MSStageDriving::proceed(), GNEEdge::processMoveFromJunctionSelected(), GNEEdge::processMoveToJunctionSelected(), GNEEdge::processNoneJunctionSelected(), MSStageDriving::registerWaiting(), GNEViewNet::resetLastClickedPosition(), NBEdge::reshiftPosition(), GUIViewObjectsHandler::setSelectionBoundary(), GNETAZFrame::shapeDrawed(), GUISUMOAbstractView::showViewportEditor(), PositionVector::sidePositionAtAngle(), MSLaneChangerSublane::startChangeSublane(), MSDevice_SSM::toGeo(), PositionVector::transformToVectorCoordinates(), PolygonDynamics::update(), GNETAZ::updateCenteringBoundary(), GNETAZRelData::updateGeometry(), GUIGeometry::updateGeometry(), GNEDemandElementPlan::updatePlanGeometry(), MSVehicle::updateState(), MSVehicle::validatePosition(), and GUIDialog_EditViewport::writeXML().

◆ myX

◆ myY

◆ myZ

double Position::myZ
private

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