![]() |
Eclipse SUMO - Simulation of Urban MObility
|
A point in 2D or 3D with translation and scaling methods. More...
#include <Position.h>
Public Member Functions | |
void | add (const Position &pos) |
Adds the given position to this one. | |
void | add (double dx, double dy) |
Adds the given position to this one. | |
void | add (double dx, double dy, double dz) |
Adds the given position to this one. | |
bool | almostSame (const Position &p2, double maxDiv=POSITION_EPS) const |
check if two position is almost the sme as other | |
double | angleTo2D (const Position &other) const |
returns the angle in the plane of the vector pointing from here to the other position | |
Position | crossProduct (const Position &pos) |
returns the cross product between this point and the second one | |
double | distanceSquaredTo (const Position &p2) const |
returns the square of the distance to another position | |
double | distanceSquaredTo2D (const Position &p2) const |
returns the square of the distance to another position (Only using x and y positions) | |
double | distanceTo (const Position &p2) const |
returns the euclidean distance in 3 dimension | |
double | distanceTo2D (const Position &p2) const |
returns the euclidean distance in the x-y-plane | |
double | dotProduct (const Position &pos) |
returns the dot product (scalar product) between this point and the second one | |
bool | isNAN () const |
check if position is NAN | |
void | mul (double mx, double my) |
Multiplies position with the given values. | |
void | mul (double mx, double my, double mz) |
Multiplies position with the given values. | |
void | mul (double val) |
Multiplies both positions with the given value. | |
void | norm2d () |
Normalises the given 2d position. | |
bool | operator!= (const Position &p2) const |
difference operator | |
Position | operator* (double scalar) const |
keep the direction but modify the length of the (location) vector to length * scalar | |
Position | operator+ (const Position &p2) const |
add operator | |
Position | operator+ (double offset) const |
keep the direction but modify the length of the (location) vector to length + scalar | |
Position | operator- (const Position &p2) const |
sub operator | |
Position | operator- (double offset) const |
keep the direction but modify the length of the (location) vector to length - scalar | |
bool | operator< (const Position &p2) const |
lexicographical sorting for use in maps and sets | |
bool | operator== (const Position &p2) const |
comparation operator | |
Position () | |
default constructor | |
Position (double x, double y) | |
Parametrised constructor (only for x-y) | |
Position (double x, double y, double z) | |
Parametrised constructor. | |
Position | rotateAround2D (double rad, const Position &origin) |
rotate this position by rad around origin and return the result | |
void | set (const Position &pos) |
set position with another position | |
void | set (double x, double y) |
set positions x and y | |
void | set (double x, double y, double z) |
set positions x, y and z | |
void | setx (double x) |
set position x | |
void | sety (double y) |
set position y | |
void | setz (double z) |
set position z | |
double | slopeTo2D (const Position &other) const |
returns the slope of the vector pointing from here to the other position | |
void | sub (const Position &pos) |
Subtracts the given position from this one. | |
void | sub (double dx, double dy) |
Subtracts the given position from this one. | |
void | sub (double dx, double dy, double dz) |
Subtracts the given position from this one. | |
void | swapXY () |
swap position X and Y | |
double | x () const |
Returns the x-position. | |
double | y () const |
Returns the y-position. | |
double | z () const |
Returns the z-position. | |
~Position () | |
Destructor. | |
Static Public Attributes | |
static const Position | INVALID |
used to indicate that a position is valid | |
Private Attributes | |
double | myX |
The x-position. | |
double | myY |
The y-position. | |
double | myZ |
The z-position. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Position &p) |
output operator | |
A point in 2D or 3D with translation and scaling methods.
Definition at line 37 of file Position.h.
|
inline |
default constructor
Definition at line 40 of file Position.h.
Referenced by crossProduct(), GNEPOI::drawGL(), GUIPointOfInterest::drawInnerPOI(), operator*(), operator+(), operator+(), operator-(), operator-(), rotateAround2D(), and GNEPOI::updateGeometry().
|
inline |
Parametrised constructor (only for x-y)
Definition at line 44 of file Position.h.
|
inline |
Parametrised constructor.
Definition at line 48 of file Position.h.
|
inline |
Destructor.
Definition at line 52 of file Position.h.
|
inline |
Adds the given position to this one.
Definition at line 125 of file Position.h.
Referenced by NBNodeCont::analyzeCluster(), GNEMoveElement::calculateLaneOffset(), GNETAZ::commitMoveShape(), AGPosition::compute2dPosition(), NBNodeShapeComputer::computeNodeShapeDefault(), NIVissimDistrictConnection::dict_BuildDistrictNodes(), GNEEdge::drawEdgeName(), GUIEdge::drawGL(), GNEAdditional::drawListedAddtional(), GLHelper::drawTextBox(), PositionVector::extrapolate(), PositionVector::extrapolate2D(), NBNode::getEmptyDir(), GNECalibratorFlow::getPositionInView(), GNEClosingLaneReroute::getPositionInView(), GNEClosingReroute::getPositionInView(), GNEDestProbReroute::getPositionInView(), GNEParkingAreaReroute::getPositionInView(), GNERerouterInterval::getPositionInView(), GNERouteProbReroute::getPositionInView(), GNEVariableSpeedSignStep::getPositionInView(), NIImporter_OpenDrive::loadNetwork(), GeoConvHelper::moveConvertedBy(), GNEMoveFrame::ChangeZInSelection::onCmdApplyZ(), GNEMoveFrame::ShiftShapeGeometry::onCmdShiftShapeGeometry(), NBPTPlatform::reshiftPosition(), NBPTStop::reshiftPosition(), NBDistrict::reshiftPosition(), NBEdge::reshiftPosition(), NBNode::reshiftPosition(), GNETAZ::setMoveShape(), and GeoConvHelper::x2cartesian_const().
|
inline |
Adds the given position to this one.
Definition at line 132 of file Position.h.
|
inline |
Adds the given position to this one.
Definition at line 138 of file Position.h.
|
inline |
check if two position is almost the sme as other
Definition at line 239 of file Position.h.
References distanceTo().
Referenced by NBNode::getEndPoints(), PositionVector::insert_noDoublePos(), AGPosition::operator==(), PositionVector::push_back_noDoublePos(), and PositionVector::push_front_noDoublePos().
|
inline |
returns the angle in the plane of the vector pointing from here to the other position
Definition at line 264 of file Position.h.
Referenced by libsumo::Helper::applySubscriptionFilterFieldOfVision(), NBNode::bezierControlPoints(), NBEdge::computeAngle(), MSVehicle::computeAngle(), GUIBaseVehicle::computeSeats(), GNENet::createRoundabout(), GUIGeometry::drawChildLine(), GUIBusStop::drawGL(), GUIGeometry::drawParentLine(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GLHelper::drawTriangleAtEnd(), LIBSUMO_NAMESPACE::Lane::getAngle(), NBTurningDirectionsComputer::getFarAngleAtNode(), GNELane::getPopUpMenu(), NBEdge::getShapeEndAngle(), GUIVehicle::getVisualAngle(), MSLink::isInFront(), MSLink::isOnComingPed(), NBEdgeCont::joinTramEdges(), PositionVector::localAngle(), MSPModel_Striping::PState::moveTo(), LIBSUMO_NAMESPACE::Person::moveToXY(), LIBSUMO_NAMESPACE::Vehicle::moveToXY(), NBContHelper::relative_outgoing_edge_sorter::operator()(), NBContHelper::relative_incoming_edge_sorter::operator()(), PositionVector::rotationAtOffset(), and NWWriter_OpenDrive::writeGeomSmooth().
returns the cross product between this point and the second one
Definition at line 274 of file Position.h.
References myX, myY, myZ, and Position().
Referenced by NBHeightMapper::Triangle::normalVector().
|
inline |
returns the square of the distance to another position
Definition at line 249 of file Position.h.
Referenced by distanceTo(), GNEContainer::drawGL(), GNEPerson::drawGL(), GNEViewNet::drawTemporalJunction(), and GNEVehicle::getMoveOperation().
|
inline |
returns the square of the distance to another position (Only using x and y positions)
Definition at line 259 of file Position.h.
Referenced by GNEMoveElement::calculateMoveShapeOperation(), GNEMoveElement::calculateNewLane(), GNEOverlappedInspection::checkSavedPosition(), distanceTo2D(), GUIGeometry::drawChildLine(), GNEEdge::drawEdgeGeometryPoints(), GNEEdge::drawEndGeometryPoint(), GUIGeometry::drawGeometry(), GUIGeometry::drawGeometryPoints(), GNEAccess::drawGL(), GNEVehicle::drawGL(), GNEJunction::drawJunctionAsBubble(), GUIGeometry::drawLaneGeometry(), GUIGeometry::drawParentLine(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), GNEStoppingPlace::drawSign(), GNEEdge::drawStartGeometryPoint(), NBPTStopCont::getClosestPlatformToPTStopPosition(), RORouteHandler::getJunctionTaz(), GNETAZ::getMoveOperation(), GNEPersonTrip::getMoveOperation(), GNERide::getMoveOperation(), GNETranship::getMoveOperation(), GNETransport::getMoveOperation(), GNEWalk::getMoveOperation(), GUIGlObject::mouseWithinGeometry(), GNEMoveFrame::ChangeZInSelection::onCmdApplyZ(), GNEEdge::processMoveFromJunctionSelected(), GNEEdge::processMoveToJunctionSelected(), and GNEEdge::processNoneJunctionSelected().
|
inline |
returns the euclidean distance in 3 dimension
Definition at line 244 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(), GUIChargingStation::GUIChargingStation(), GUIOverheadWire::GUIOverheadWire(), GUIParkingArea::GUIParkingArea(), PositionVector::indexOfClosest(), 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(), NIVissimEdge::remapOneOfNodes(), PositionVector::rotationAtOffset(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), PositionVector::sidePositionAtAngle(), PositionVector::slopeDegreeAtOffset(), GUILane::splitAtSegments(), GNETAZRelData::updateGeometry(), and MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility().
|
inline |
returns the euclidean distance in the x-y-plane
Definition at line 254 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(), GUIVehicle::drawAction_drawCarriageClass(), GUIBusStop::drawGL(), GNEDemandElement::drawJunctionLine(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEPathCreator::drawTemporalRoute(), GNEEdge::editEndpoint(), 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(), 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(), PositionVector::nearest_offset_to_point2D(), MSDevice_Bluelight::notifyMove(), GUIViewTraffic::onGamingClick(), PositionVector::positionAtOffset2D(), NBNodeCont::pruneClusterFringe(), PositionVector::removeClosest(), GNEEdge::resetEndpoint(), NBNodeCont::shortestEdge(), PositionVector::sideOffset(), PositionVector::simplified(), slopeTo2D(), PositionVector::smoothedZFront(), PositionVector::transformToVectorCoordinates(), MSPerson::MSPersonStage_Walking::walkDistance(), NWWriter_OpenDrive::writeGeomLines(), NWWriter_OpenDrive::writeGeomSmooth(), NWWriter_OpenDrive::writeRoadObjectPOI(), and NWWriter_OpenDrive::writeRoadObjectPoly().
|
inline |
returns the dot product (scalar product) between this point and the second one
Definition at line 282 of file Position.h.
Referenced by NBHeightMapper::Triangle::getZ().
|
inline |
|
inline |
Multiplies position with the given values.
Definition at line 112 of file Position.h.
|
inline |
Multiplies position with the given values.
Definition at line 118 of file Position.h.
|
inline |
Multiplies both positions with the given value.
Definition at line 105 of file Position.h.
Referenced by NBNodeCont::analyzeCluster(), AGPosition::compute2dPosition(), GeoConvHelper::computeFinal(), NBNodeShapeComputer::computeNodeShapeDefault(), GNEEdge::drawEdgeName(), GUIEdge::drawGL(), NBNode::getEmptyDir(), NBNode::indirectLeftShape(), NIImporter_OpenDrive::loadNetwork(), NBDistrict::mirrorX(), NBNode::mirrorX(), NBPTStop::mirrorX(), PCPolyContainer::saveDlrTDP(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and NWWriter_DlrNavteq::writeTrafficSignals().
|
inline |
Normalises the given 2d position.
Definition at line 165 of file Position.h.
Referenced by NBNode::getEmptyDir(), and NBNode::indirectLeftShape().
|
inline |
|
inline |
keep the direction but modify the length of the (location) vector to length * scalar
Definition at line 193 of file Position.h.
References myX, myY, myZ, and Position().
|
inline |
keep the direction but modify the length of the (location) vector to length + scalar
Definition at line 198 of file Position.h.
References distanceTo(), myX, myY, myZ, and Position().
|
inline |
keep the direction but modify the length of the (location) vector to length - scalar
Definition at line 208 of file Position.h.
References distanceTo(), myX, myY, myZ, and Position().
|
inline |
lexicographical sorting for use in maps and sets
Definition at line 228 of file Position.h.
|
inline |
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().
|
inline |
set position with another position
Definition at line 98 of file Position.h.
|
inline |
set positions x and y
Definition at line 85 of file Position.h.
References myX, myY, x(), and y().
Referenced by MSCFModel_CC::_consensus(), NIXMLNodesHandler::addNode(), ShapeHandler::addPOI(), NBNode::bezierControlPoints(), GeoConvHelper::cartesian2geo(), CC_VehicleVariables::CC_VehicleVariables(), TraCIServerAPI_Simulation::commandDistanceRequest(), TraCIServerAPI_Simulation::commandPositionConversion(), NBNodeShapeComputer::computeNodeShapeSmall(), GUISUMOAbstractView::destroyPopup(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUICompleteSchemeStorage::init(), NBHeightMapper::loadTiff(), NIImporter_OpenDrive::myStartElement(), GUISettingsHandler::myStartElement(), NLJunctionControlBuilder::openJunction(), GUICompleteSchemeStorage::saveViewport(), GNEPOI::setAttribute(), GNEPOI::setMoveShape(), NGNode::setX(), NGNode::setY(), GNEPOI::updateGeometry(), GeoConvHelper::x2cartesian(), and GeoConvHelper::x2cartesian_const().
|
inline |
|
inline |
set position x
Definition at line 70 of file Position.h.
Referenced by MSCFModel_CC::_consensus(), NIXMLNodesHandler::addJoinCluster(), GeomHelper::calculateLotSpacePosition(), NBNodeCont::joinNodeCluster(), GNENet::joinSelectedJunctions(), and GUISUMOAbstractView::snapToActiveGrid().
|
inline |
set position y
Definition at line 75 of file Position.h.
Referenced by MSCFModel_CC::_consensus(), GeomHelper::calculateLotSpacePosition(), NBNodeCont::joinNodeCluster(), GNENet::joinSelectedJunctions(), NBEdge::mirrorX(), GUISUMOAbstractView::snapToActiveGrid(), and NGNet::toNB().
|
inline |
set position z
Definition at line 80 of file Position.h.
Referenced by GeomHelper::calculateLotSpacePosition(), NBNodeShapeComputer::computeNodeShapeDefault(), LIBSUMO_NAMESPACE::Simulation::convert2D(), MSVehicle::interpolateLateralZ(), NBNodeCont::joinNodeCluster(), LIBSUMO_NAMESPACE::Vehicle::moveToXY(), GNEMoveFrame::ChangeZInSelection::onCmdApplyZ(), GUISUMOAbstractView::snapToActiveGrid(), NBEdge::startShapeAt(), NGNet::toNB(), NBNetBuilder::transformCoordinate(), and GeoConvHelper::x2cartesian_const().
|
inline |
returns the slope of the vector pointing from here to the other position
Definition at line 269 of file Position.h.
References distanceTo2D(), and myZ.
Referenced by MSVehicle::getSlope(), and PositionVector::slopeDegreeAtOffset().
|
inline |
Subtracts the given position from this one.
Definition at line 158 of file Position.h.
|
inline |
Subtracts the given position from this one.
Definition at line 145 of file Position.h.
Referenced by NBNode::bezierControlPoints(), GeoConvHelper::cartesian2geo(), AGPosition::compute2dPosition(), PositionVector::extrapolate(), PositionVector::extrapolate2D(), NBNode::getEmptyDir(), NBHeightMapper::Triangle::getZ(), LIBSUMO_NAMESPACE::Vehicle::highlight(), and NBNode::indirectLeftShape().
|
inline |
Subtracts the given position from this one.
Definition at line 151 of file Position.h.
|
inline |
swap position X and Y
Definition at line 290 of file Position.h.
References myX, myY, and std::swap().
Referenced by GNEShapeFrame::GEOPOICreator::onCmdCreateGEOPOI(), and GNEShapeFrame::GEOPOICreator::onCmdSetCoordinates().
|
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(), NIXMLNodesHandler::addNode(), MSPModel_Striping::addVehicleFoe(), GeomHelper::angle2D(), GUISUMOAbstractView::applyGLTransform(), GUISettingsHandler::applyViewport(), Boundary::around(), PositionVector::around(), NBPTStopCont::assignEdgeForFloatingStops(), NBNode::bezierControlPoints(), GNEAdditionalFrame::buildAdditionalOverView(), GNEWireFrame::buildWireOverView(), GeomHelper::calculateLotSpaceAngle(), GeomHelper::calculateLotSpacePosition(), GNEViewNetHelper::MoveSingleElementValues::calculateMoveOffset(), GNEViewNetHelper::MoveMultipleElementValues::calculateMoveOffset(), GUIGeometry::calculateRotation(), NIImporter_OpenDrive::calculateStraightEndPoint(), GeoConvHelper::cartesian2geo(), GUIOSGPerspectiveChanger::centerTo(), GUIDanielPerspectiveChanger::centerTo(), NGRandomNetBuilder::checkAngles(), GUISUMOAbstractView::checkGDALImage(), TraCIServerAPI_Simulation::commandPositionConversion(), NBPTStopCont::computeCrossProductEdgePosition(), NBNodeShapeComputer::computeNodeShapeSmall(), NGRandomNetBuilder::createNewNode(), Boundary::distanceTo2D(), GUIVehicle::drawAction_drawCarriageClass(), GUITLLogicPhasesTrackerWindow::drawAdditionalStates(), GUILane::drawArrows(), GNELane::drawArrows(), GLHelper::drawBoxLine(), GLHelper::drawBoxLine(), GLHelper::drawBoxLines(), GNECalibrator::drawCalibratorSymbol(), GUISUMOAbstractView::drawDecals(), GNEDetector::drawE1DetectorLogo(), GNEDetector::drawE2DetectorLogo(), GLHelper::drawFilledPoly(), GNEDemandElement::drawFlowLabel(), GUIGeometry::drawGeometry(), 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(), GNEJunction::drawGL(), GNEWalkingArea::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GNEPOI::drawGL(), GNEPoly::drawGL(), GNEJunction::drawJunctionAsBubble(), GNEJunction::drawJunctionAsShape(), GNEDemandElement::drawJunctionLine(), GNELane::drawLane2LaneConnections(), GUILane::drawLane2LaneConnections(), GUIGeometry::drawLaneGeometry(), GNELane::drawLaneStopOffset(), GLHelper::drawLine(), GLHelper::drawLine(), GLHelper::drawLine(), GNEStoppingPlace::drawLines(), GUIBaseVehicle::drawLinkItem(), GUILane::drawLinkRule(), GUILane::drawLinkRules(), GNEAdditional::drawListedAddtional(), GNEViewNetHelper::LockIcon::drawLockIcon(), GUIGeometry::drawMovingHint(), GUIBaseVehicle::drawOnPos(), GNELaneAreaDetector::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), GNEAdditional::drawSemiCircleGeometryPoint(), GNEStoppingPlace::drawSign(), GUIE3Collector::MyWrapper::drawSingleCrossing(), GLHelper::drawSpaceOccupancies(), GNEAdditional::drawSquaredAdditional(), GNEDemandElement::drawStackLabel(), GNEStop::drawStopPersonOverStoppingPlace(), GNEViewNet::drawTemporalJunction(), GNEPathCreator::drawTemporalRoute(), GNEViewNetHelper::TestingMode::drawTestingElements(), GNEViewNet::drawTestsCircle(), GLHelper::drawText(), GLHelper::drawTextAtEnd(), GLHelper::drawTextBox(), GNEJunction::drawTLSIcon(), GLHelper::drawTriangleAtEnd(), MSVTypeProbe::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(), GUIChargingStation::GUIChargingStation(), GUIJunctionWrapper::GUIJunctionWrapper(), GUIOverheadWire::GUIOverheadWire(), GUIParkingArea::GUIParkingArea(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUINet::initGUIStructures(), GUILane::initRotations(), GUIBusStop::initShape(), NBNodeCont::insert(), NBNodeCont::insert(), PositionVector::insertAtClosest(), PositionVector::intersects(), PositionVector::isLeft(), NBNodeCont::joinNodeCluster(), NBNodeCont::joinSameJunctions(), GNENet::joinSelectedJunctions(), MSAbstractLaneChangeModel::laneChangeOutput(), NBHeightMapper::loadTiff(), libsumo::Helper::makeTraCIPosition(), NWWriter_OpenDrive::mapmatchRoadObjects(), 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::as_poly_cw_sorter::operator()(), PositionVector::increasing_x_y_sorter::operator()(), NBNodeCont::paretoCheck(), GNEShapeFrame::processClick(), LIBSUMO_NAMESPACE::POI::remove(), MSDevice_ToC::requestToC(), NBNodeCont::retrieve(), rotateAround2D(), PCPolyContainer::saveDlrTDP(), set(), set(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), GUIDialog_EditViewport::setValues(), GUIOSGPerspectiveChanger::setViewport(), GUICompleteSchemeStorage::setViewport(), GUISUMOAbstractView::setViewportFromToRot(), setx(), NGNode::setY(), PositionVector::sideOffset(), PositionVector::simplified(), GUISUMOAbstractView::snapToActiveGrid(), PositionVector::sub(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSDevice_ToC::triggerUpwardToC(), GNEConnection::updateCenteringBoundary(), 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().
|
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(), MSParkingArea::addLotEntry(), NIXMLNodesHandler::addNode(), MSPModel_Striping::addVehicleFoe(), GeomHelper::angle2D(), GUISUMOAbstractView::applyGLTransform(), GUISettingsHandler::applyViewport(), Boundary::around(), PositionVector::around(), NBPTStopCont::assignEdgeForFloatingStops(), NBNode::bezierControlPoints(), GNEAdditionalFrame::buildAdditionalOverView(), GNEWireFrame::buildWireOverView(), GeomHelper::calculateLotSpaceAngle(), GeomHelper::calculateLotSpacePosition(), GNEViewNetHelper::MoveSingleElementValues::calculateMoveOffset(), GNEViewNetHelper::MoveMultipleElementValues::calculateMoveOffset(), GUIGeometry::calculateRotation(), NIImporter_OpenDrive::calculateStraightEndPoint(), GeoConvHelper::cartesian2geo(), GUIOSGPerspectiveChanger::centerTo(), GUIDanielPerspectiveChanger::centerTo(), NGRandomNetBuilder::checkAngles(), GUISUMOAbstractView::checkGDALImage(), TraCIServerAPI_Simulation::commandPositionConversion(), NBPTStopCont::computeCrossProductEdgePosition(), NBNodeShapeComputer::computeNodeShapeSmall(), NGRandomNetBuilder::createNewNode(), Boundary::distanceTo2D(), GUIVehicle::drawAction_drawCarriageClass(), GUITLLogicPhasesTrackerWindow::drawAdditionalStates(), GUILane::drawArrows(), GNELane::drawArrows(), GLHelper::drawBoxLine(), GLHelper::drawBoxLine(), GLHelper::drawBoxLines(), GNECalibrator::drawCalibratorSymbol(), GUISUMOAbstractView::drawDecals(), GNEDetector::drawE1DetectorLogo(), GNEDetector::drawE2DetectorLogo(), GLHelper::drawFilledPoly(), GNEDemandElement::drawFlowLabel(), GUIGeometry::drawGeometry(), 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(), GNEJunction::drawGL(), GNEWalkingArea::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GNEPOI::drawGL(), GNEPoly::drawGL(), GNEJunction::drawJunctionAsBubble(), GNEJunction::drawJunctionAsShape(), GNEDemandElement::drawJunctionLine(), GNELane::drawLane2LaneConnections(), GUILane::drawLane2LaneConnections(), GUIGeometry::drawLaneGeometry(), GNELane::drawLaneStopOffset(), GLHelper::drawLine(), GLHelper::drawLine(), GLHelper::drawLine(), GNEStoppingPlace::drawLines(), GUIBaseVehicle::drawLinkItem(), GUILane::drawLinkRule(), GUILane::drawLinkRules(), GNEAdditional::drawListedAddtional(), GNEViewNetHelper::LockIcon::drawLockIcon(), GUIGeometry::drawMovingHint(), GUIBaseVehicle::drawOnPos(), GNELaneAreaDetector::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), GNEAdditional::drawSemiCircleGeometryPoint(), GNEStoppingPlace::drawSign(), GUIE3Collector::MyWrapper::drawSingleCrossing(), GLHelper::drawSpaceOccupancies(), GNEAdditional::drawSquaredAdditional(), GNEDemandElement::drawStackLabel(), GNEStop::drawStopPersonOverStoppingPlace(), GNEViewNet::drawTemporalJunction(), GNEPathCreator::drawTemporalRoute(), GNEViewNetHelper::TestingMode::drawTestingElements(), GNEViewNet::drawTestsCircle(), GLHelper::drawText(), GLHelper::drawTextAtEnd(), GLHelper::drawTextBox(), GNEJunction::drawTLSIcon(), GLHelper::drawTriangleAtEnd(), MSVTypeProbe::execute(), NBNodeCont::extract(), NBPTStopCont::findAccessEdgesForRailStops(), GeomHelper::findLineCircleIntersections(), NIImporter_OpenDrive::geomFromLine(), GNEPOI::getAttribute(), PointOfInterest::getCenter(), GUIPointOfInterest::getCenteringBoundary(), NBNode::getEmptyDir(), MSPModel_Striping::getNextLaneObstacles(), MSCFModel_CC::getParameter(), MSVTKExport::getPositions(), LIBSUMO_NAMESPACE::InductionLoop::getTree(), GUIGeometry::getVertexCircleAroundPosition(), GUIDanielPerspectiveChanger::getYPos(), NBHeightMapper::getZ(), GUIChargingStation::GUIChargingStation(), GUIJunctionWrapper::GUIJunctionWrapper(), GUIOverheadWire::GUIOverheadWire(), GUIParkingArea::GUIParkingArea(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUINet::initGUIStructures(), GUILane::initRotations(), GUIBusStop::initShape(), NBNodeCont::insert(), NBNodeCont::insert(), PositionVector::insertAtClosest(), PositionVector::intersects(), PositionVector::isLeft(), NBNodeCont::joinNodeCluster(), NBNodeCont::joinSameJunctions(), GNENet::joinSelectedJunctions(), MSAbstractLaneChangeModel::laneChangeOutput(), NBHeightMapper::loadTiff(), libsumo::Helper::makeTraCIPosition(), NWWriter_OpenDrive::mapmatchRoadObjects(), NBEdge::mirrorX(), 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::as_poly_cw_sorter::operator()(), PositionVector::increasing_x_y_sorter::operator()(), NBNodeCont::paretoCheck(), GNEShapeFrame::processClick(), LIBSUMO_NAMESPACE::POI::remove(), MSDevice_ToC::requestToC(), NBNodeCont::retrieve(), rotateAround2D(), PCPolyContainer::saveDlrTDP(), set(), set(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), GUIDialog_EditViewport::setValues(), GUIOSGPerspectiveChanger::setViewport(), GUICompleteSchemeStorage::setViewport(), GUISUMOAbstractView::setViewportFromToRot(), NGNode::setX(), sety(), PositionVector::sideOffset(), PositionVector::simplified(), GUISUMOAbstractView::snapToActiveGrid(), PositionVector::sub(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSDevice_ToC::triggerUpwardToC(), GNEConnection::updateCenteringBoundary(), 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().
|
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::drawGL(), GLHelper::drawSpaceOccupancies(), MSVTypeProbe::execute(), GUIJunctionWrapper::getColorValue(), GNEJunction::getColorValue(), PositionVector::getMaxGrade(), PositionVector::getOverlapWith(), 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(), 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(), and GUIDialog_EditViewport::writeXML().
|
friend |
output operator
Definition at line 174 of file Position.h.
|
static |
used to indicate that a position is valid
Definition at line 300 of file Position.h.
Referenced by NIXMLNodesHandler::addJoinCluster(), MSPModel_Striping::addVehicleFoe(), NBEdge::append(), NBNodeShapeComputer::badIntersection(), NBNode::bezierControlPoints(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildTAZ(), GNEMoveElement::calculateMoveShapeOperation(), GUISUMOAbstractView::centerTo(), GNEMoveElement::commitMove(), MSVehicle::computeAngle(), MSLaneChanger::continueChange(), GNEVehicle::drawGL(), GNELaneAreaDetector::drawPartialGL(), GNEOverheadWire::drawPartialGL(), GNERoute::drawPartialGL(), GNEVehicle::drawPartialGL(), GNEDemandElement::drawPersonPlanPartial(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), MSVehicle::enterLaneAtMove(), MSVehicle::executeFractionalMove(), MSVehicle::executeMove(), GUIPostDrawing::executePostDrawingTasks(), GNETAZFrame::TAZParameters::getAttributesAndValues(), PositionVector::getCentroid(), GUIPerson::getGUIAngle(), GUIPerson::getGUIPosition(), NIXMLShapeHandler::getLanePos(), NLShapeHandler::getLanePos(), PCLoaderXML::getLanePos(), PositionVector::getPolygonCenter(), GUIPerson::getPosition(), MSVehicle::getPosition(), MSPModel_Striping::PState::getPosition(), MSStageDriving::getPosition(), MSStageMoving::getPosition(), MSStageWaiting::getPosition(), MSVehicle::getPositionAlongBestLanes(), NBEdge::getSignalOffset(), MSVehicle::getSlope(), MSParkingArea::getVehiclePosition(), GUIVehicle::getVisualPosition(), NBNodeCont::guessTLs(), MSVehicle::handleCollisionStop(), MSVehicle::Influencer::implicitSpeedRemote(), NBNode::indirectLeftShape(), PolygonDynamics::initTrackedPosition(), MSVehicle::interpolateLateralZ(), PositionVector::intersectionPosition2D(), PositionVector::intersectionPosition2D(), MSVehicle::invalidateCachedPosition(), NBNodeCont::joinNodeCluster(), PCLoaderOSM::loadIfSet(), MSStageDriving::loadState(), MSDevice_SSM::makeStringWithNAs(), 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(), AdditionalHandler::parseRerouterAttributes(), AdditionalHandler::parseTAZAttributes(), AdditionalHandler::parseTractionSubstation(), PositionVector::positionAtOffset(), PositionVector::positionAtOffset(), PositionVector::positionAtOffset2D(), PositionVector::positionAtOffset2D(), MSStageDriving::proceed(), GNEEdge::processMoveFromJunctionSelected(), GNEEdge::processMoveToJunctionSelected(), GNEEdge::processNoneJunctionSelected(), MSStageDriving::registerWaiting(), GNEViewNet::resetLastClickedPosition(), NBEdge::reshiftPosition(), GNETAZFrame::shapeDrawed(), GUISUMOAbstractView::showViewportEditor(), PositionVector::sidePositionAtAngle(), PositionVector::sidePositionAtAngle(), MSLaneChangerSublane::startChangeSublane(), MSDevice_SSM::toGeo(), PositionVector::transformToVectorCoordinates(), PolygonDynamics::update(), GNETAZ::updateCenteringBoundary(), GNETAZRelData::updateGeometry(), GUIGeometry::updateGeometry(), MSVehicle::updateState(), MSVehicle::validatePosition(), and GUIDialog_EditViewport::writeXML().
|
private |
The x-position.
Definition at line 304 of file Position.h.
Referenced by add(), add(), add(), angleTo2D(), crossProduct(), distanceSquaredTo(), distanceSquaredTo2D(), dotProduct(), isNAN(), mul(), mul(), mul(), norm2d(), operator!=(), operator*(), operator+(), operator+(), operator-(), operator-(), operator<(), operator==(), set(), set(), set(), setx(), sub(), sub(), sub(), swapXY(), and x().
|
private |
The y-position.
Definition at line 307 of file Position.h.
Referenced by add(), add(), add(), angleTo2D(), crossProduct(), distanceSquaredTo(), distanceSquaredTo2D(), dotProduct(), isNAN(), mul(), mul(), mul(), norm2d(), operator!=(), operator*(), operator+(), operator+(), operator-(), operator-(), operator<(), operator==(), set(), set(), set(), sety(), sub(), sub(), sub(), swapXY(), and y().
|
private |
The z-position.
Definition at line 310 of file Position.h.
Referenced by add(), add(), crossProduct(), distanceSquaredTo(), dotProduct(), isNAN(), mul(), mul(), operator!=(), operator*(), operator+(), operator+(), operator-(), operator-(), operator<(), operator==(), set(), set(), setz(), slopeTo2D(), sub(), sub(), and z().