Eclipse SUMO - Simulation of Urban MObility
SUMORTree Class Reference

A RT-tree for efficient storing of SUMO's GL-objects. More...

#include <SUMORTree.h>

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

Public Member Functions

void add (const Boundary &p)
 Makes the boundary include the given boundary. More...
 
void add (const Position &p)
 Makes the boundary include the given coordinate. More...
 
void add (double x, double y, double z=0)
 Makes the boundary include the given coordinate. More...
 
void addAdditionalGLObject (GUIGlObject *o, const double exaggeration=1)
 Adds an additional object (detector/shape/trigger) for visualisation. More...
 
double contains (const Boundary &b) const
 return true if this boundary contains the given boundary (only X-Y) More...
 
double distanceTo2D (const Boundary &b) const
 returns the euclidean distance in the x-y-plane More...
 
double distanceTo2D (const Position &p) const
 returns the euclidean distance in the x-y-plane More...
 
void flipY ()
 flips ymin and ymax More...
 
Position getCenter () const
 Returns the center of the boundary. More...
 
double getHeight () const
 Returns the height of the boundary (y-axis) More...
 
PositionVector getShape (const bool closeShape) const
 get position vector (shape) based on this boundary More...
 
double getWidth () const
 Returns the width of the boudary (x-axis) More...
 
double getZRange () const
 Returns the elevation range of the boundary (z-axis) More...
 
Boundarygrow (double by)
 extends the boundary by the given amount More...
 
void growHeight (double by)
 Increases the height of the boundary (y-axis) More...
 
void growWidth (double by)
 Increases the width of the boundary (x-axis) More...
 
virtual void Insert (const float a_min[2], const float a_max[2], GUIGlObject *const &a_dataId)
 Insert entry. More...
 
bool isInitialised () const
 check if Boundary is Initialised More...
 
void moveby (double x, double y, double z=0)
 Moves the boundary by the given amount. More...
 
bool operator!= (const Boundary &b) const
 Comparison operator not equal. More...
 
bool operator== (const Boundary &b) const
 Comparison operator equal. More...
 
virtual void Remove (const float a_min[2], const float a_max[2], GUIGlObject *const &a_dataId)
 Remove entry. More...
 
void removeAdditionalGLObject (GUIGlObject *o, const double exaggeration=1)
 Removes an additional object (detector/shape/trigger) from being visualised. More...
 
void reset ()
 Resets the boundary. More...
 
Boundaryscale (double by)
 scale the boundary by the given amount More...
 
virtual int Search (const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
 Find all within search rectangle. More...
 
void set (double xmin, double ymin, double xmax, double ymax)
 Sets the boundary to the given values. More...
 
void setOffsets (double xmin, double ymin, double xmax, double ymax)
 Sets the boundary to the given values, ignoring min < max constraints. More...
 
 SUMORTree ()
 Constructor. More...
 
void updateBoundaries (GUIGlObjectType type)
 update boundaries More...
 
double xmax () const
 Returns maximum x-coordinate. More...
 
double xmin () const
 Returns minimum x-coordinate. More...
 
double ymax () const
 Returns maximum y-coordinate. More...
 
double ymin () const
 Returns minimum y-coordinate. More...
 
double zmax () const
 Returns maximum z-coordinate. More...
 
double zmin () const
 Returns minimum z-coordinate. More...
 
virtual ~SUMORTree ()
 Destructor. More...
 
inherited from AbstractPoly
bool around (const Position &p, double offset=0) const
 Returns whether the boundary contains the given coordinate. More...
 
bool around2D (const Position &p, double offset=0) const
 Returns whether the boundary contains the given 2D coordinate. More...
 
bool overlapsWith (const AbstractPoly &poly, double offset=0) const
 Returns whether the boundary overlaps with the given polygon. More...
 
bool partialWithin (const AbstractPoly &poly, double offset=0) const
 Returns whether the boundary is partially within the given polygon. More...
 
bool crosses (const Position &p1, const Position &p2) const
 Returns whether the boundary crosses the given line. More...
 

Protected Attributes

FXMutex myLock
 A mutex avoiding parallel change and traversal of the tree. More...
 
int myTreeSize = 0
 number of inserted elements More...
 

Private Member Functions

bool removeObjectFromTreeDebug (const GUIGlObject *obj)
 remove object from TreeDebug More...
 

Private Attributes

std::map< GUIGlObject *, BoundarymyTreeDebug
 Map only used for check that SUMORTree works as expected, only is used if option "gui-testing-debug-gl" is enabled. More...
 
bool myWasInitialised
 Information whether the boundary was initialised. More...
 
double myXmax
 
double myXmin
 The boundaries. More...
 
double myYmax
 
double myYmin
 
double myZmax
 
double myZmin
 

Detailed Description

A RT-tree for efficient storing of SUMO's GL-objects.

This class specialises the used RT-tree implementation from "rttree.h" and extends it by a mutex for avoiding parallel change and traversal of the tree.

Definition at line 66 of file SUMORTree.h.

Constructor & Destructor Documentation

◆ SUMORTree()

SUMORTree::SUMORTree ( )
inline

Constructor.

Definition at line 69 of file SUMORTree.h.

Referenced by LayeredRTree::LayeredRTree().

Here is the caller graph for this function:

◆ ~SUMORTree()

virtual SUMORTree::~SUMORTree ( )
inlinevirtual

Destructor.

Definition at line 75 of file SUMORTree.h.

References myLock, myTreeDebug, toString(), WRITE_ERROR, and WRITE_GLDEBUG.

Member Function Documentation

◆ add() [1/3]

void Boundary::add ( const Boundary p)
inherited

Makes the boundary include the given boundary.

Definition at line 105 of file Boundary.cpp.

References Boundary::add(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), Boundary::ymin(), Boundary::zmax(), and Boundary::zmin().

◆ add() [2/3]

void Boundary::add ( const Position p)
inherited

Makes the boundary include the given coordinate.

Definition at line 99 of file Boundary.cpp.

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

◆ add() [3/3]

void Boundary::add ( double  x,
double  y,
double  z = 0 
)
inherited

Makes the boundary include the given coordinate.

Definition at line 78 of file Boundary.cpp.

References Boundary::myWasInitialised, Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::myZmax, and Boundary::myZmin.

Referenced by Boundary::add(), NIVissimConnectionCluster::NodeSubCluster::add(), NIVissimConnectionCluster::add(), GUIParkingArea::addLotEntry(), MSEdge::addSuccessor(), ROEdge::addSuccessor(), GNENet::addZValueInBoundary(), GUISUMOAbstractView::applyGLTransform(), Boundary::Boundary(), GNEAdditionalHandler::buildTAZ(), GUIDanielPerspectiveChanger::centerTo(), GUIViewObjectsHandler::checkGeometryPoint(), NBNetBuilder::compute(), GNENet::computeAndUpdate(), NIVissimConnection::computeBounding(), NIVissimDisturbance::computeBounding(), GNENet::expandBoundary(), GUIEdge::getBoundary(), MSDevice_BTsender::VehicleInformation::getBoxBoundary(), PositionVector::getBoxBoundary(), GUIBaseVehicle::getCenteringBoundary(), GUIBusStop::getCenteringBoundary(), GUITrafficLightLogicWrapper::getCenteringBoundary(), GUIMEVehicle::getCenteringBoundary(), GNETAZRelData::getCenteringBoundary(), GNEContainer::getCenteringBoundary(), GNEPerson::getCenteringBoundary(), GNERoute::getCenteringBoundary(), GNEStop::getCenteringBoundary(), GNEVehicle::getCenteringBoundary(), GUIContainer::getCenteringBoundary(), GUILane::getCenteringBoundary(), GUIPerson::getCenteringBoundary(), GUIPointOfInterest::getCenteringBoundary(), GUIPolygon::getCenteringBoundary(), MapMatcher< E, L, N >::getClosestEdge(), GUISUMOAbstractView::getGUIGlObjectsAtPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GNEDemandElementPlan::getPlanCenteringBoundary(), GUICalibrator::GUICalibrator(), GUILaneSpeedTrigger::GUILaneSpeedTrigger(), GUITriggeredRerouter::GUITriggeredRerouter(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), GUINet::initGUIStructures(), GNENet::initJunctionsAndEdges(), NBHeightMapper::loadShapeFile(), NBHeightMapper::loadTiff(), MSPModel_Striping::moveInDirection(), NIImporter_OpenDrive::myCharacters(), GUITriggeredRerouter::myEndElement(), GUIE3Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUIMEInductLoop::MyWrapper::MyWrapper(), GNEShapeFrame::GEOPOICreator::onCmdCreateGEOPOI(), GNEViewNetHelper::SelectingArea::processEdgeRectangleSelection(), GNEViewNetHelper::SelectingArea::processRectangleSelection(), NIVissimConnectionCluster::recomputeBoundary(), ROEdge::ROEdge(), MSEdge::setJunctions(), GUIDanielPerspectiveChanger::setViewport(), GNEParkingSpace::updateCenteringBoundary(), GNETAZ::updateCenteringBoundary(), GNEVariableSpeedSign::updateCenteringBoundary(), GNEEdge::updateCenteringBoundary(), GNEJunction::updateCenteringBoundary(), GNEPOI::updateCenteringBoundary(), GNEViewNet::updateObjectsInPosition(), and GeoConvHelper::x2cartesian().

◆ addAdditionalGLObject()

◆ around()

bool Boundary::around ( const Position p,
double  offset = 0 
) const
virtualinherited

Returns whether the boundary contains the given coordinate.

Implements AbstractPoly.

Definition at line 172 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::myZmax, Boundary::myZmin, Position::x(), Position::y(), and Position::z().

Referenced by PCPolyContainer::add(), NIVissimConnectionCluster::around(), GNERouteHandler::buildContainerPlan(), GNERouteHandler::buildPersonPlan(), GNEVehicleFrame::buildVehicleOverRoute(), NBHeightMapper::getZ(), and NIVissimConnectionCluster::recheckEdges().

Here is the caller graph for this function:

◆ around2D()

bool Boundary::around2D ( const Position p,
double  offset = 0 
) const
inherited

Returns whether the boundary contains the given 2D coordinate.

Definition at line 181 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Position::x(), and Position::y().

Referenced by GUIViewObjectsHandler::checkCircleElement(), and GUIViewObjectsHandler::checkGeometryPoint().

Here is the caller graph for this function:

◆ contains()

double Boundary::contains ( const Boundary b) const
inherited

return true if this boundary contains the given boundary (only X-Y)

Definition at line 224 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by GNEEdge::calculateEdgeContour(), GNEJunction::calculateJunctioncontour(), GUIViewObjectsHandler::checkCircleElement(), GUIViewObjectsHandler::checkGeometryPoint(), and GUIViewObjectsHandler::checkShapeElement().

Here is the caller graph for this function:

◆ crosses()

bool Boundary::crosses ( const Position p1,
const Position p2 
) const
virtualinherited

Returns whether the boundary crosses the given line.

Implements AbstractPoly.

Definition at line 210 of file Boundary.cpp.

References PositionVector::intersects(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.

Referenced by GUIViewObjectsHandler::checkShapeElement().

Here is the caller graph for this function:

◆ distanceTo2D() [1/2]

double Boundary::distanceTo2D ( const Boundary b) const
inherited

returns the euclidean distance in the x-y-plane

Definition at line 275 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.

◆ distanceTo2D() [2/2]

double Boundary::distanceTo2D ( const Position p) const
inherited

returns the euclidean distance in the x-y-plane

Definition at line 241 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Position::x(), and Position::y().

Referenced by libsumo::Helper::convertCartesianToRoadMap(), MSEdge::getDistanceTo(), and ROEdge::getDistanceTo().

Here is the caller graph for this function:

◆ flipY()

void Boundary::flipY ( )
inherited

flips ymin and ymax

Definition at line 351 of file Boundary.cpp.

References Boundary::myYmax, and Boundary::myYmin.

Referenced by GeoConvHelper::computeFinal().

Here is the caller graph for this function:

◆ getCenter()

◆ getHeight()

double Boundary::getHeight ( ) const
inherited

◆ getShape()

PositionVector Boundary::getShape ( const bool  closeShape) const
inherited

get position vector (shape) based on this boundary

Definition at line 423 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.

Referenced by GNEAdditionalHandler::buildTAZ(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), MSRouteHandler::initLaneTree(), RORouteHandler::initLaneTree(), GUIViewObjectsHandler::setSelectionBoundary(), and LIBSUMO_NAMESPACE::Simulation::storeShape().

Here is the caller graph for this function:

◆ getWidth()

◆ getZRange()

double Boundary::getZRange ( ) const
inherited

Returns the elevation range of the boundary (z-axis)

Definition at line 166 of file Boundary.cpp.

References Boundary::myZmax, and Boundary::myZmin.

Referenced by NBNetBuilder::compute().

Here is the caller graph for this function:

◆ grow()

Boundary & Boundary::grow ( double  by)
inherited

extends the boundary by the given amount

Returns
a reference to the instance for further use

Definition at line 319 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.

Referenced by GUIParkingArea::addLotEntry(), GUIDanielPerspectiveChanger::centerTo(), GUIViewObjectsHandler::checkGeometryPoint(), NBEdgeCont::checkOverlap(), libsumo::Helper::collectObjectsInRange(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), GUIEdge::getBoundary(), GUIBaseVehicle::getCenteringBoundary(), GUIBusStop::getCenteringBoundary(), GUICalibrator::getCenteringBoundary(), GUIChargingStation::getCenteringBoundary(), GUIE3Collector::MyWrapper::getCenteringBoundary(), GUIInstantInductLoop::MyWrapper::getCenteringBoundary(), GUIJunctionWrapper::getCenteringBoundary(), GUILaneSpeedTrigger::getCenteringBoundary(), GUIOverheadWire::getCenteringBoundary(), GUIOverheadWireClamp::getCenteringBoundary(), GUITrafficLightLogicWrapper::getCenteringBoundary(), GUITriggeredRerouter::getCenteringBoundary(), GUITriggeredRerouter::GUITriggeredRerouterEdge::getCenteringBoundary(), GUIMEInductLoop::MyWrapper::getCenteringBoundary(), GUIMEVehicle::getCenteringBoundary(), GNETAZRelData::getCenteringBoundary(), GNEContainer::getCenteringBoundary(), GNEPerson::getCenteringBoundary(), GNEStop::getCenteringBoundary(), GNEVehicle::getCenteringBoundary(), GUIContainer::getCenteringBoundary(), GUIE2Collector::MyWrapper::getCenteringBoundary(), GUIEdge::getCenteringBoundary(), GUIInductLoop::MyWrapper::getCenteringBoundary(), GUILane::getCenteringBoundary(), GUIPerson::getCenteringBoundary(), GUIPointOfInterest::getCenteringBoundary(), GUIPolygon::getCenteringBoundary(), MapMatcher< E, L, N >::getClosestEdge(), GUISUMOAbstractView::getGUIGlObjectsAtPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIParkingArea::GUIParkingArea(), NBEdgeCont::ignoreFilterMatch(), GUINet::initGUIStructures(), NBEdgeCont::joinTramEdges(), NWWriter_OpenDrive::mapmatchRoadObjects(), GNEShapeFrame::GEOPOICreator::onCmdCreateGEOPOI(), GNEMultiEntryExitDetector::updateCenteringBoundary(), GNEParkingSpace::updateCenteringBoundary(), GNERerouter::updateCenteringBoundary(), GNETAZ::updateCenteringBoundary(), GNETractionSubstation::updateCenteringBoundary(), GNEVariableSpeedSign::updateCenteringBoundary(), GNEEdge::updateCenteringBoundary(), GNEJunction::updateCenteringBoundary(), GNEPOI::updateCenteringBoundary(), GNEPoly::updateCenteringBoundary(), and GNEViewNet::updateObjectsInPosition().

◆ growHeight()

void Boundary::growHeight ( double  by)
inherited

Increases the height of the boundary (y-axis)

Definition at line 345 of file Boundary.cpp.

References Boundary::myYmax, and Boundary::myYmin.

Referenced by GUIPointOfInterest::getCenteringBoundary(), GUIPerspectiveChanger::patchedViewPort(), Boundary::scale(), and GUIDanielPerspectiveChanger::setViewport().

Here is the caller graph for this function:

◆ growWidth()

void Boundary::growWidth ( double  by)
inherited

Increases the width of the boundary (x-axis)

Definition at line 338 of file Boundary.cpp.

References Boundary::myXmax, and Boundary::myXmin.

Referenced by GUIPointOfInterest::getCenteringBoundary(), MSPModel_Striping::moveInDirection(), GUIPerspectiveChanger::patchedViewPort(), Boundary::scale(), and GUIDanielPerspectiveChanger::setViewport().

Here is the caller graph for this function:

◆ Insert()

virtual void SUMORTree::Insert ( const float  a_min[2],
const float  a_max[2],
GUIGlObject *const &  a_dataId 
)
inlinevirtual

Insert entry.

Parameters
a_minMin of bounding rect
a_maxMax of bounding rect
a_dataIdPositive Id of data. Maybe zero, but negative numbers not allowed.
See also
RTree::Insert

Reimplemented in LayeredRTree.

Definition at line 91 of file SUMORTree.h.

References myLock.

Referenced by addAdditionalGLObject(), and GUINet::initGUIStructures().

Here is the caller graph for this function:

◆ isInitialised()

◆ moveby()

void Boundary::moveby ( double  x,
double  y,
double  z = 0 
)
inherited

Moves the boundary by the given amount.

Definition at line 412 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::myZmax, and Boundary::myZmin.

Referenced by GUIDanielPerspectiveChanger::centerTo(), GUIDanielPerspectiveChanger::move(), GeoConvHelper::moveConvertedBy(), and GUIDanielPerspectiveChanger::onKeyPress().

Here is the caller graph for this function:

◆ operator!=()

bool Boundary::operator!= ( const Boundary b) const
inherited

Comparison operator not equal.

Definition at line 382 of file Boundary.cpp.

◆ operator==()

bool Boundary::operator== ( const Boundary b) const
inherited

◆ overlapsWith()

bool Boundary::overlapsWith ( const AbstractPoly poly,
double  offset = 0 
) const
virtualinherited

Returns whether the boundary overlaps with the given polygon.

Implements AbstractPoly.

Definition at line 189 of file Boundary.cpp.

References AbstractPoly::crosses(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::partialWithin(), and AbstractPoly::partialWithin().

Referenced by GUIViewObjectsHandler::checkCircleElement(), GUIViewObjectsHandler::checkGeometryPoint(), NBEdgeCont::checkOverlap(), NIVissimBoundedClusterObject::crosses(), NBEdgeCont::ignoreFilterMatch(), NIVissimConnectionCluster::NodeSubCluster::overlapsWith(), and NIVissimConnectionCluster::overlapsWith().

Here is the caller graph for this function:

◆ partialWithin()

bool Boundary::partialWithin ( const AbstractPoly poly,
double  offset = 0 
) const
virtualinherited

Returns whether the boundary is partially within the given polygon.

Implements AbstractPoly.

Definition at line 309 of file Boundary.cpp.

References AbstractPoly::around(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.

Referenced by PCPolyContainer::add(), and Boundary::overlapsWith().

Here is the caller graph for this function:

◆ Remove()

virtual void SUMORTree::Remove ( const float  a_min[2],
const float  a_max[2],
GUIGlObject *const &  a_dataId 
)
inlinevirtual

Remove entry.

Parameters
a_minMin of bounding rect
a_maxMax of bounding rect
a_dataIdPositive Id of data. Maybe zero, but negative numbers not allowed.
See also
RTree::Remove

Reimplemented in LayeredRTree.

Definition at line 102 of file SUMORTree.h.

References myLock.

Referenced by removeAdditionalGLObject().

Here is the caller graph for this function:

◆ removeAdditionalGLObject()

◆ removeObjectFromTreeDebug()

bool SUMORTree::removeObjectFromTreeDebug ( const GUIGlObject obj)
inlineprivate

remove object from TreeDebug

Definition at line 236 of file SUMORTree.h.

References myTreeDebug.

Referenced by updateBoundaries().

Here is the caller graph for this function:

◆ reset()

◆ scale()

Boundary & Boundary::scale ( double  by)
inherited

scale the boundary by the given amount

Returns
a reference to the instance for further use

Definition at line 330 of file Boundary.cpp.

References Boundary::growHeight(), Boundary::growWidth(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.

Referenced by addAdditionalGLObject(), and removeAdditionalGLObject().

Here is the caller graph for this function:

◆ Search()

virtual int SUMORTree::Search ( const float  a_min[2],
const float  a_max[2],
const GUIVisualizationSettings c 
) const
inlinevirtual

Find all within search rectangle.

Parameters
a_minMin of search bounding rect
a_maxMax of search bounding rect
a_searchResultSearch result array. Caller should set grow size. Function will reset, not append to array.
a_resultCallbackCallback function to return result. Callback should return 'true' to continue searching
a_contextUser context to pass as parameter to a_resultCallback
Returns
Returns the number of entries found
See also
RTree::Search

Reimplemented in LayeredRTree.

Definition at line 116 of file SUMORTree.h.

References myLock.

Referenced by GUIViewTraffic::doPaintGL(), GNEViewNet::drawGLElements(), and GUISUMOAbstractView::makeSnapshot().

Here is the caller graph for this function:

◆ set()

void Boundary::set ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
)
inherited

Sets the boundary to the given values.

Definition at line 388 of file Boundary.cpp.

References MAX2(), MIN2(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by GUIOSGPerspectiveChanger::updateViewport().

Here is the caller graph for this function:

◆ setOffsets()

void Boundary::setOffsets ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
)
inherited

Sets the boundary to the given values, ignoring min < max constraints.

Definition at line 403 of file Boundary.cpp.

References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by main(), and GeomConvHelper::parseBoundaryReporting().

Here is the caller graph for this function:

◆ updateBoundaries()

void SUMORTree::updateBoundaries ( GUIGlObjectType  type)
inline

◆ xmax()

double Boundary::xmax ( ) const
inherited

Returns maximum x-coordinate.

Definition at line 124 of file Boundary.cpp.

References Boundary::myXmax.

Referenced by Boundary::add(), LIBSUMO_NAMESPACE::Polygon::add(), MSPModel_JuPedSim::add(), NIVissimConnectionCluster::add(), addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NIVissimConnectionCluster::around(), NBPTStopCont::assignEdgeForFloatingStops(), NIVissimConnection::buildNodeClusters(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), NIVissimDisturbance::computeBounding(), Boundary::contains(), NIVissimBoundedClusterObject::crosses(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), NIVissimConnection::getBoundingBox(), MapMatcher< E, L, N >::getClosestEdge(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), NIVissimConnectionCluster::getPositionForEdge(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), GUINet::initGUIStructures(), MSRouteHandler::initLaneTree(), RORouteHandler::initLaneTree(), NBEdgeCont::joinTramEdges(), main(), GUISUMOAbstractView::makeSnapshot(), NWWriter_OpenDrive::mapmatchRoadObjects(), NIVissimConnectionCluster::NIVissimConnectionCluster(), GUIGLObjectPopupMenu::onCmdCopyViewGeoBoundary(), NIVissimConnectionCluster::NodeSubCluster::overlapsWith(), NIVissimConnectionCluster::overlapsWith(), GUISUMOAbstractView::paintGLGrid(), NIVissimConnectionCluster::recheckEdges(), NIVissimConnectionCluster::recomputeBoundary(), LIBSUMO_NAMESPACE::Polygon::remove(), removeAdditionalGLObject(), Boundary::set(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().

◆ xmin()

double Boundary::xmin ( ) const
inherited

Returns minimum x-coordinate.

Definition at line 118 of file Boundary.cpp.

References Boundary::myXmin.

Referenced by Boundary::add(), LIBSUMO_NAMESPACE::Polygon::add(), MSPModel_JuPedSim::add(), NIVissimConnectionCluster::add(), addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NIVissimConnectionCluster::around(), NBPTStopCont::assignEdgeForFloatingStops(), NIVissimConnection::buildNodeClusters(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), NIVissimDisturbance::computeBounding(), Boundary::contains(), NIVissimBoundedClusterObject::crosses(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), NIVissimConnection::getBoundingBox(), MapMatcher< E, L, N >::getClosestEdge(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), NIVissimConnectionCluster::getPositionForEdge(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), NBHeightMapper::getZ(), GUINet::initGUIStructures(), MSRouteHandler::initLaneTree(), RORouteHandler::initLaneTree(), NBEdgeCont::joinTramEdges(), main(), GUISUMOAbstractView::makeSnapshot(), NWWriter_OpenDrive::mapmatchRoadObjects(), NBNetBuilder::moveToOrigin(), NIVissimConnectionCluster::NIVissimConnectionCluster(), GUIGLObjectPopupMenu::onCmdCopyViewGeoBoundary(), NIVissimConnectionCluster::NodeSubCluster::overlapsWith(), NIVissimConnectionCluster::overlapsWith(), GUISUMOAbstractView::paintGLGrid(), NIVissimConnectionCluster::recheckEdges(), NIVissimConnectionCluster::recomputeBoundary(), LIBSUMO_NAMESPACE::Polygon::remove(), removeAdditionalGLObject(), GUISUMOAbstractView::screenPos2NetPos(), Boundary::set(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().

◆ ymax()

double Boundary::ymax ( ) const
inherited

Returns maximum y-coordinate.

Definition at line 136 of file Boundary.cpp.

References Boundary::myYmax.

Referenced by Boundary::add(), LIBSUMO_NAMESPACE::Polygon::add(), MSPModel_JuPedSim::add(), addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NBPTStopCont::assignEdgeForFloatingStops(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), Boundary::contains(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), MapMatcher< E, L, N >::getClosestEdge(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), NBHeightMapper::getZ(), GUINet::initGUIStructures(), MSRouteHandler::initLaneTree(), RORouteHandler::initLaneTree(), NBEdgeCont::joinTramEdges(), main(), GUISUMOAbstractView::makeSnapshot(), NWWriter_OpenDrive::mapmatchRoadObjects(), MSPModel_Striping::moveInDirection(), NBNetBuilder::moveToOrigin(), GUIGLObjectPopupMenu::onCmdCopyViewGeoBoundary(), GUISUMOAbstractView::paintGLGrid(), LIBSUMO_NAMESPACE::Polygon::remove(), removeAdditionalGLObject(), Boundary::set(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().

Here is the caller graph for this function:

◆ ymin()

double Boundary::ymin ( ) const
inherited

Returns minimum y-coordinate.

Definition at line 130 of file Boundary.cpp.

References Boundary::myYmin.

Referenced by Boundary::add(), LIBSUMO_NAMESPACE::Polygon::add(), MSPModel_JuPedSim::add(), addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NBPTStopCont::assignEdgeForFloatingStops(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), Boundary::contains(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), MapMatcher< E, L, N >::getClosestEdge(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), GUINet::initGUIStructures(), MSRouteHandler::initLaneTree(), RORouteHandler::initLaneTree(), NBEdgeCont::joinTramEdges(), main(), GUISUMOAbstractView::makeSnapshot(), NWWriter_OpenDrive::mapmatchRoadObjects(), MSPModel_Striping::moveInDirection(), NBNetBuilder::moveToOrigin(), GUIGLObjectPopupMenu::onCmdCopyViewGeoBoundary(), GUISUMOAbstractView::paintGLGrid(), LIBSUMO_NAMESPACE::Polygon::remove(), removeAdditionalGLObject(), GUISUMOAbstractView::screenPos2NetPos(), Boundary::set(), GNEVehicle::setColor(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().

Here is the caller graph for this function:

◆ zmax()

double Boundary::zmax ( ) const
inherited

Returns maximum z-coordinate.

Definition at line 148 of file Boundary.cpp.

References Boundary::myZmax.

Referenced by Boundary::add(), and LIBSUMO_NAMESPACE::Simulation::getNetBoundary().

Here is the caller graph for this function:

◆ zmin()

double Boundary::zmin ( ) const
inherited

Returns minimum z-coordinate.

Definition at line 142 of file Boundary.cpp.

References Boundary::myZmin.

Referenced by Boundary::add(), and LIBSUMO_NAMESPACE::Simulation::getNetBoundary().

Here is the caller graph for this function:

Field Documentation

◆ myLock

FXMutex SUMORTree::myLock
mutableprotected

A mutex avoiding parallel change and traversal of the tree.

Definition at line 224 of file SUMORTree.h.

Referenced by addAdditionalGLObject(), Insert(), Remove(), removeAdditionalGLObject(), Search(), and ~SUMORTree().

◆ myTreeDebug

std::map<GUIGlObject*, Boundary> SUMORTree::myTreeDebug
private

Map only used for check that SUMORTree works as expected, only is used if option "gui-testing-debug-gl" is enabled.

Note
Warning: DO NOT USE in release mode and use it in debug mode carefully, due it produces a slowdown.

Definition at line 233 of file SUMORTree.h.

Referenced by addAdditionalGLObject(), removeAdditionalGLObject(), removeObjectFromTreeDebug(), and ~SUMORTree().

◆ myTreeSize

int SUMORTree::myTreeSize = 0
protected

number of inserted elements

Definition at line 227 of file SUMORTree.h.

Referenced by addAdditionalGLObject(), removeAdditionalGLObject(), and updateBoundaries().

◆ myWasInitialised

bool Boundary::myWasInitialised
privateinherited

Information whether the boundary was initialised.

Definition at line 172 of file Boundary.h.

Referenced by Boundary::add(), Boundary::isInitialised(), Boundary::operator==(), and Boundary::reset().

◆ myXmax

◆ myXmin

◆ myYmax

◆ myYmin

◆ myZmax

◆ myZmin


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