Eclipse SUMO - Simulation of Urban MObility
|
A RT-tree for efficient storing of SUMO's GL-objects in layers. More...
#include <LayeredRTree.h>
Public Member Functions | |
void | add (const Boundary &p) |
Makes the boundary include the given boundary. | |
void | add (const Position &p) |
Makes the boundary include the given coordinate. | |
void | add (double x, double y, double z=0) |
Makes the boundary include the given coordinate. | |
void | addAdditionalGLObject (GUIGlObject *o, const double exaggeration=1) |
Adds an additional object (detector/shape/trigger) for visualisation. | |
bool | contains2D (const Boundary &b) const |
return true if this boundary contains the given boundary (only X-Y) | |
double | distanceTo2D (const Boundary &b) const |
returns the euclidean distance in the x-y-plane | |
double | distanceTo2D (const Position &p) const |
returns the euclidean distance in the x-y-plane | |
void | flipY () |
flips ymin and ymax | |
Position | getCenter () const |
Returns the center of the boundary. | |
double | getHeight () const |
Returns the height of the boundary (y-axis) | |
PositionVector | getShape (const bool closeShape) const |
get position vector (shape) based on this boundary | |
double | getWidth () const |
Returns the width of the boudary (x-axis) | |
double | getZRange () const |
Returns the elevation range of the boundary (z-axis) | |
Boundary & | grow (double by) |
extends the boundary by the given amount | |
void | growHeight (double by) |
Increases the height of the boundary (y-axis) | |
void | growWidth (double by) |
Increases the width of the boundary (x-axis) | |
void | Insert (const float a_min[2], const float a_max[2], GUIGlObject *const &a_dataId) |
Insert entry (delegate to appropriate layer) | |
bool | isInitialised () const |
check if Boundary is Initialised | |
LayeredRTree () | |
Constructor. | |
void | moveby (double x, double y, double z=0) |
Moves the boundary by the given amount. | |
bool | operator!= (const Boundary &b) const |
Comparison operator not equal. | |
bool | operator== (const Boundary &b) const |
Comparison operator equal. | |
bool | overlaps2D (const Boundary &b) const |
return true if at least one point of the given boundary is in boundary(only X-Y) | |
void | Remove (const float a_min[2], const float a_max[2], GUIGlObject *const &a_dataId) |
Remove entry (delegate to appropriate layer) | |
void | removeAdditionalGLObject (GUIGlObject *o, const double exaggeration=1) |
Removes an additional object (detector/shape/trigger) from being visualised. | |
void | reset () |
Resets the boundary. | |
Boundary & | scale (double by) |
scale the boundary by the given amount | |
int | Search (const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const |
Find all within search rectangle (searches all layers in order) | |
void | set (double xmin, double ymin, double xmax, double ymax) |
Sets the boundary to the given values. | |
void | setOffsets (double xmin, double ymin, double xmax, double ymax) |
Sets the boundary to the given values, ignoring min < max constraints. | |
void | updateBoundaries (GUIGlObjectType type) |
update boundaries | |
double | xmax () const |
Returns maximum x-coordinate. | |
double | xmin () const |
Returns minimum x-coordinate. | |
double | ymax () const |
Returns maximum y-coordinate. | |
double | ymin () const |
Returns minimum y-coordinate. | |
double | zmax () const |
Returns maximum z-coordinate. | |
double | zmin () const |
Returns minimum z-coordinate. | |
~LayeredRTree () | |
Destructor. | |
inherited from AbstractPoly | |
bool | around (const Position &p, double offset=0) const |
Returns whether the boundary contains the given coordinate. | |
bool | around2D (const Position &p, double offset=0) const |
Returns whether the boundary contains the given 2D coordinate (position) | |
bool | around2D (const double x, const double y) const |
Returns whether the boundary contains the given 2D coordinate (x-y version) | |
bool | overlapsWith (const AbstractPoly &poly, double offset=0) const |
Returns whether the boundary overlaps with the given polygon. | |
bool | partialWithin (const AbstractPoly &poly, double offset=0) const |
Returns whether the boundary is partially within the given polygon. | |
bool | crosses (const Position &p1, const Position &p2) const |
Returns whether the boundary crosses the given line. | |
Protected Attributes | |
std::vector< SUMORTree * > | myLayers |
the layers for drawing | |
FXMutex | myLock |
A mutex avoiding parallel change and traversal of the tree. | |
int | myTreeSize = 0 |
number of inserted elements | |
Private Member Functions | |
bool | removeObjectFromTreeDebug (const GUIGlObject *obj) |
remove object from TreeDebug | |
size_t | selectLayer (GUIGlObject *o) |
select the appropriate layer for each object | |
Private Attributes | |
std::map< GUIGlObject *, Boundary > | myTreeDebug |
Map only used for check that SUMORTree works as expected, only is used if option "gui-testing-debug-gl" is enabled. | |
bool | myWasInitialised |
Information whether the boundary was initialised. | |
double | myXmax |
double | myXmin |
The boundaries. | |
double | myYmax |
double | myYmin |
double | myZmax |
double | myZmin |
A RT-tree for efficient storing of SUMO's GL-objects in layers.
This class maintains SUMORTrees for each layer (only 2 at the moment) but provides the same interface as SUMORTree
Definition at line 46 of file LayeredRTree.h.
|
inline |
Constructor.
Definition at line 49 of file LayeredRTree.h.
References myLayers, and SUMORTree::SUMORTree().
|
inline |
|
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().
|
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().
|
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(), Boundary::add(), NIVissimConnectionCluster::NodeSubCluster::add(), NIVissimConnectionCluster::add(), GUIParkingArea::addLotEntry(), MSEdge::addSuccessor(), ROEdge::addSuccessor(), GNENet::addZValueInBoundary(), GUISUMOAbstractView::applyGLTransform(), Boundary::Boundary(), 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 >::getClosestLane(), GUISUMOAbstractView::getGUIGlObjectsAtPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), 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(), NBRailwayGeometryHelper::straigthenCorrdidor(), GNEParkingSpace::updateCenteringBoundary(), GNETAZ::updateCenteringBoundary(), GNEVariableSpeedSign::updateCenteringBoundary(), GNEEdge::updateCenteringBoundary(), GNEJunction::updateCenteringBoundary(), GNEPOI::updateCenteringBoundary(), GNEViewNet::updateObjectsInPosition(), GNEDemandElementPlan::updatePlanCenteringBoundary(), and GeoConvHelper::x2cartesian().
|
inlineinherited |
Adds an additional object (detector/shape/trigger) for visualisation.
[in] | o | The object to add |
Definition at line 124 of file SUMORTree.h.
References StringUtils::format(), GUIGlObject::getCenteringBoundary(), GUIGlObject::getFullName(), Boundary::getHeight(), GUIGlObject::getMicrosimID(), Boundary::getWidth(), SUMORTree::Insert(), Boundary::isInitialised(), SUMORTree::myLock, SUMORTree::myTreeDebug, SUMORTree::myTreeSize, Boundary::scale(), toString(), WRITE_GLDEBUG, MsgHandler::writeDebugGLMessages(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by GNENet::addGLObjectIntoGrid(), GUIShapeContainer::addPOI(), GUIShapeContainer::addPolygon(), GUINet::createTLWrapper(), GUITriggeredRerouter::GUITriggeredRerouter(), GUINet::initGUIStructures(), GUIShapeContainer::movePOI(), GUIShapeContainer::polygonDynamicsUpdate(), GNEViewNet::recalculateBoundaries(), GUINet::registerRenderedObject(), GUIShapeContainer::reshapePolygon(), and SUMORTree::updateBoundaries().
|
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().
|
inherited |
Returns whether the boundary contains the given 2D coordinate (x-y version)
Definition at line 189 of file Boundary.cpp.
References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.
|
inherited |
Returns whether the boundary contains the given 2D coordinate (position)
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::checkCircleObject(), GUIViewObjectsHandler::checkGeometryPoint(), and Boundary::overlaps2D().
|
inherited |
return true if this boundary contains the given boundary (only X-Y)
Definition at line 232 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::checkCircleObject(), GUIViewObjectsHandler::checkGeometryPoint(), and GUIViewObjectsHandler::checkShapeObject().
Returns whether the boundary crosses the given line.
Implements AbstractPoly.
Definition at line 218 of file Boundary.cpp.
References PositionVector::intersects(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.
Referenced by GUIViewObjectsHandler::checkShapeObject().
|
inherited |
returns the euclidean distance in the x-y-plane
Definition at line 299 of file Boundary.cpp.
References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.
|
inherited |
returns the euclidean distance in the x-y-plane
Definition at line 265 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().
|
inherited |
flips ymin and ymax
Definition at line 375 of file Boundary.cpp.
References Boundary::myYmax, and Boundary::myYmin.
Referenced by GeoConvHelper::computeFinal().
|
inherited |
Returns the center of the boundary.
Definition at line 112 of file Boundary.cpp.
References Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::myZmax, and Boundary::myZmin.
Referenced by GUISUMOAbstractView::applyGLTransform(), GUISUMOAbstractView::centerTo(), GNEDemandElementPlan::drawPlanLanePartial(), GNEDemandElement::getColorByScheme(), GNEPoly::getPositionInView(), GUIDanielPerspectiveChanger::getXPos(), GUIDanielPerspectiveChanger::getYPos(), NIVissimConnectionCluster::liesOnSameEdgesEnd(), MSPModel_Striping::moveInDirection(), GeoConvHelper::resolveAbstractProjection(), GUISUMOAbstractView::screenPos2NetPos(), GUIBaseVehicle::setFunctionalColor(), GUIOSGPerspectiveChanger::setViewport(), and GUIDanielPerspectiveChanger::zoom().
|
inherited |
Returns the height of the boundary (y-axis)
Definition at line 160 of file Boundary.cpp.
References Boundary::myYmax, and Boundary::myYmin.
Referenced by SUMORTree::addAdditionalGLObject(), GUISUMOAbstractView::applyGLTransform(), GUIPolygon::checkDraw(), GUIVisualizationSettings::checkDrawEdge(), GUIVisualizationSettings::checkDrawJunction(), GUIVisualizationSettings::checkDrawPoly(), libsumo::Helper::convertCartesianToRoadMap(), GUISUMOAbstractView::getGridHeight(), GUIJunctionWrapper::GUIJunctionWrapper(), GUINet::initGUIStructures(), GNENet::initJunctionsAndEdges(), GUIDanielPerspectiveChanger::onKeyPress(), GUIPerspectiveChanger::patchedViewPort(), SUMORTree::removeAdditionalGLObject(), and GUISUMOAbstractView::screenPos2NetPos().
|
inherited |
get position vector (shape) based on this boundary
Definition at line 447 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(), MSDevice_FCDReplay::FCDHandler::initLaneTree(), MSRouteHandler::initLaneTree(), RORouteHandler::initLaneTree(), GUIViewObjectsHandler::setSelectionBoundary(), and LIBSUMO_NAMESPACE::Simulation::storeShape().
|
inherited |
Returns the width of the boudary (x-axis)
Definition at line 154 of file Boundary.cpp.
References Boundary::myXmax, and Boundary::myXmin.
Referenced by SUMORTree::addAdditionalGLObject(), GUISUMOAbstractView::applyGLTransform(), GUIPolygon::checkDraw(), GUIVisualizationSettings::checkDrawEdge(), GUIVisualizationSettings::checkDrawJunction(), GUIVisualizationSettings::checkDrawPoly(), libsumo::Helper::convertCartesianToRoadMap(), GUISUMOAbstractView::getGridWidth(), GUIDanielPerspectiveChanger::getZoom(), GUIDanielPerspectiveChanger::getZPos(), GUIJunctionWrapper::GUIJunctionWrapper(), GUINet::initGUIStructures(), GNENet::initJunctionsAndEdges(), GUISUMOAbstractView::m2p(), MSPModel_Striping::moveInDirection(), GUIDanielPerspectiveChanger::onKeyPress(), GUISUMOAbstractView::p2m(), GUIPerspectiveChanger::patchedViewPort(), SUMORTree::removeAdditionalGLObject(), and GUISUMOAbstractView::screenPos2NetPos().
|
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().
|
inherited |
extends the boundary by the given amount
Definition at line 343 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(), GNEAdditional::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 >::getClosestLane(), 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(), GNEViewNet::updateObjectsInPosition(), and GNEDemandElementPlan::updatePlanCenteringBoundary().
|
inherited |
Increases the height of the boundary (y-axis)
Definition at line 369 of file Boundary.cpp.
References Boundary::myYmax, and Boundary::myYmin.
Referenced by GUIPointOfInterest::getCenteringBoundary(), GUIPerspectiveChanger::patchedViewPort(), Boundary::scale(), and GUIDanielPerspectiveChanger::setViewport().
|
inherited |
Increases the width of the boundary (x-axis)
Definition at line 362 of file Boundary.cpp.
References Boundary::myXmax, and Boundary::myXmin.
Referenced by GUIPointOfInterest::getCenteringBoundary(), MSPModel_Striping::moveInDirection(), GUIPerspectiveChanger::patchedViewPort(), Boundary::scale(), and GUIDanielPerspectiveChanger::setViewport().
|
inlinevirtual |
Insert entry (delegate to appropriate layer)
a_min | Min of bounding rect |
a_max | Max of bounding rect |
a_dataId | Positive Id of data. Maybe zero, but negative numbers not allowed. |
Reimplemented from SUMORTree.
Definition at line 69 of file LayeredRTree.h.
References myLayers, and selectLayer().
Referenced by GUINet::initGUIStructures().
|
inherited |
check if Boundary is Initialised
Definition at line 259 of file Boundary.cpp.
References Boundary::myWasInitialised.
Referenced by SUMORTree::addAdditionalGLObject(), GNEEdge::calculateEdgeContour(), GNEJunction::calculateJunctioncontour(), GUIViewObjectsHandler::checkBoundaryParentObject(), GUIViewObjectsHandler::checkCircleObject(), GNENetworkElement::checkDrawingBoundarySelection(), GUIViewObjectsHandler::checkGeometryPoint(), GUIViewObjectsHandler::checkShapeObject(), GNEAdditional::getCenteringBoundary(), GNERoute::getCenteringBoundary(), GNEStop::getCenteringBoundary(), SUMORTree::removeAdditionalGLObject(), and GNEDemandElementPlan::updatePlanCenteringBoundary().
|
inherited |
Moves the boundary by the given amount.
Definition at line 436 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().
|
inherited |
Comparison operator not equal.
Definition at line 406 of file Boundary.cpp.
|
inherited |
Comparison operator equal.
Definition at line 393 of file Boundary.cpp.
References Boundary::myWasInitialised, Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::myZmax, and Boundary::myZmin.
|
inherited |
return true if at least one point of the given boundary is in boundary(only X-Y)
Definition at line 243 of file Boundary.cpp.
References Boundary::around2D(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.
Referenced by GNEViewNet::redrawContourElements().
|
virtualinherited |
Returns whether the boundary overlaps with the given polygon.
Implements AbstractPoly.
Definition at line 197 of file Boundary.cpp.
References AbstractPoly::crosses(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::partialWithin(), and AbstractPoly::partialWithin().
Referenced by GUIViewObjectsHandler::checkCircleObject(), GUIViewObjectsHandler::checkGeometryPoint(), NBEdgeCont::checkOverlap(), NIVissimBoundedClusterObject::crosses(), NBEdgeCont::ignoreFilterMatch(), NIVissimConnectionCluster::NodeSubCluster::overlapsWith(), and NIVissimConnectionCluster::overlapsWith().
|
virtualinherited |
Returns whether the boundary is partially within the given polygon.
Implements AbstractPoly.
Definition at line 333 of file Boundary.cpp.
References AbstractPoly::around(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.
Referenced by PCPolyContainer::add(), and Boundary::overlapsWith().
|
inlinevirtual |
Remove entry (delegate to appropriate layer)
a_min | Min of bounding rect |
a_max | Max of bounding rect |
a_dataId | Positive Id of data. Maybe zero, but negative numbers not allowed. |
Reimplemented from SUMORTree.
Definition at line 79 of file LayeredRTree.h.
References myLayers, and selectLayer().
|
inlineinherited |
Removes an additional object (detector/shape/trigger) from being visualised.
[in] | o | The object to remove |
Definition at line 162 of file SUMORTree.h.
References StringUtils::format(), GUIGlObject::getCenteringBoundary(), GUIGlObject::getFullName(), Boundary::getHeight(), GUIGlObject::getMicrosimID(), Boundary::getWidth(), Boundary::isInitialised(), SUMORTree::myLock, SUMORTree::myTreeDebug, SUMORTree::myTreeSize, SUMORTree::Remove(), Boundary::scale(), toString(), WRITE_GLDEBUG, MsgHandler::writeDebugGLMessages(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by GUIShapeContainer::addPOI(), GUIShapeContainer::addPolygon(), GUIShapeContainer::movePOI(), GUIShapeContainer::polygonDynamicsUpdate(), GNEViewNet::recalculateBoundaries(), GNENet::removeGLObjectFromGrid(), GUIShapeContainer::removePOI(), GUIShapeContainer::removePolygon(), GUIShapeContainer::reshapePolygon(), and SUMORTree::updateBoundaries().
|
inlineprivateinherited |
remove object from TreeDebug
Definition at line 240 of file SUMORTree.h.
References SUMORTree::myTreeDebug.
Referenced by SUMORTree::updateBoundaries().
|
inherited |
Resets the boundary.
Definition at line 66 of file Boundary.cpp.
References Boundary::myWasInitialised, Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, Boundary::myYmin, Boundary::myZmax, and Boundary::myZmin.
Referenced by GNEContour::buildContourCircle(), GNEContour::buildContourClosedShape(), GNEContour::buildContourExtrudedShape(), GNEContour::buildContourRectangle(), GNEContour::clearContour(), NBHeightMapper::clearData(), GNENet::computeAndUpdate(), GUIViewObjectsHandler::setSelectionPosition(), GNEParkingSpace::updateCenteringBoundary(), and GNEPOI::updateCenteringBoundary().
|
inherited |
scale the boundary by the given amount
Definition at line 354 of file Boundary.cpp.
References Boundary::growHeight(), Boundary::growWidth(), Boundary::myXmax, Boundary::myXmin, Boundary::myYmax, and Boundary::myYmin.
Referenced by SUMORTree::addAdditionalGLObject(), and SUMORTree::removeAdditionalGLObject().
|
inlinevirtual |
Find all within search rectangle (searches all layers in order)
a_min | Min of search bounding rect |
a_max | Max of search bounding rect |
a_searchResult | Search result array. Caller should set grow size. Function will reset, not append to array. |
a_resultCallback | Callback function to return result. Callback should return 'true' to continue searching |
a_context | User context to pass as parameter to a_resultCallback |
Reimplemented from SUMORTree.
Definition at line 91 of file LayeredRTree.h.
References myLayers.
|
inlineprivate |
select the appropriate layer for each object
Definition at line 107 of file LayeredRTree.h.
References GUIGlObject::getType(), GLO_EDGE, GLO_LANE, GLO_PERSON, GLO_POI, and GLO_VEHICLE.
Referenced by Insert(), and Remove().
|
inherited |
Sets the boundary to the given values.
Definition at line 412 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().
|
inherited |
Sets the boundary to the given values, ignoring min < max constraints.
Definition at line 427 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().
|
inlineinherited |
update boundaries
Definition at line 201 of file SUMORTree.h.
References SUMORTree::addAdditionalGLObject(), GLO_ADDITIONALELEMENT, GLO_LOCKICON, GLO_SHAPE, GLO_TAZ, SUMORTree::myTreeSize, SUMORTree::removeAdditionalGLObject(), and SUMORTree::removeObjectFromTreeDebug().
|
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(), SUMORTree::addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NIVissimConnectionCluster::around(), NBPTStopCont::assignEdgeForFloatingStops(), NIVissimConnection::buildNodeClusters(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), NIVissimDisturbance::computeBounding(), Boundary::contains2D(), NIVissimBoundedClusterObject::crosses(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), NIVissimConnection::getBoundingBox(), MapMatcher< E, L, N >::getClosestLane(), GNEDemandElement::getColorByScheme(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), NIVissimConnectionCluster::getPositionForEdge(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), GUINet::initGUIStructures(), MSDevice_FCDReplay::FCDHandler::initLaneTree(), 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(), SUMORTree::removeAdditionalGLObject(), Boundary::set(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), GNENetworkElement::simplifyShapeEdited(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().
|
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(), SUMORTree::addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NIVissimConnectionCluster::around(), NBPTStopCont::assignEdgeForFloatingStops(), NIVissimConnection::buildNodeClusters(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), NIVissimDisturbance::computeBounding(), Boundary::contains2D(), NIVissimBoundedClusterObject::crosses(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), NIVissimConnection::getBoundingBox(), MapMatcher< E, L, N >::getClosestLane(), GNEDemandElement::getColorByScheme(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), NIVissimConnectionCluster::getPositionForEdge(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), NBHeightMapper::getZ(), GUINet::initGUIStructures(), MSDevice_FCDReplay::FCDHandler::initLaneTree(), 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(), SUMORTree::removeAdditionalGLObject(), GUISUMOAbstractView::screenPos2NetPos(), Boundary::set(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), GNENetworkElement::simplifyShapeEdited(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().
|
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(), SUMORTree::addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NBPTStopCont::assignEdgeForFloatingStops(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), Boundary::contains2D(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), MapMatcher< E, L, N >::getClosestLane(), GNEDemandElement::getColorByScheme(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), NBHeightMapper::getZ(), GUINet::initGUIStructures(), MSDevice_FCDReplay::FCDHandler::initLaneTree(), 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(), SUMORTree::removeAdditionalGLObject(), Boundary::set(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), GNENetworkElement::simplifyShapeEdited(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().
|
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(), SUMORTree::addAdditionalGLObject(), NBHeightMapper::addTriangle(), GUISUMOAbstractView::applyGLTransform(), NBPTStopCont::assignEdgeForFloatingStops(), GUIDanielPerspectiveChanger::changeCanvasSizeLeft(), libsumo::Helper::collectObjectsInRange(), NBNetBuilder::compute(), Boundary::contains2D(), GeomHelper::crossPoint(), GUIViewTraffic::doPaintGL(), GLHelper::drawBoundary(), GNEViewNet::drawGLElements(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSLane::fill(), NBPTStopCont::findAccessEdgesForRailStops(), MapMatcher< E, L, N >::getClosestLane(), GNEDemandElement::getColorByScheme(), LIBSUMO_NAMESPACE::Simulation::getNetBoundary(), LIBSUMO_NAMESPACE::Junction::getTree(), LIBSUMO_NAMESPACE::LaneArea::getTree(), LIBSUMO_NAMESPACE::Polygon::getTree(), GUINet::initGUIStructures(), MSDevice_FCDReplay::FCDHandler::initLaneTree(), 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(), SUMORTree::removeAdditionalGLObject(), GUISUMOAbstractView::screenPos2NetPos(), Boundary::set(), GUIBaseVehicle::setFunctionalColor(), Boundary::setOffsets(), GNEPoly::simplifyShape(), GNENetworkElement::simplifyShapeEdited(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), and GUIDanielPerspectiveChanger::zoom().
|
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().
|
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().
|
protected |
the layers for drawing
Definition at line 102 of file LayeredRTree.h.
Referenced by Insert(), LayeredRTree(), Remove(), Search(), and ~LayeredRTree().
|
mutableprotectedinherited |
A mutex avoiding parallel change and traversal of the tree.
Definition at line 228 of file SUMORTree.h.
Referenced by SUMORTree::addAdditionalGLObject(), SUMORTree::Insert(), SUMORTree::Remove(), SUMORTree::removeAdditionalGLObject(), SUMORTree::Search(), and SUMORTree::~SUMORTree().
|
privateinherited |
Map only used for check that SUMORTree works as expected, only is used if option "gui-testing-debug-gl" is enabled.
Definition at line 237 of file SUMORTree.h.
Referenced by SUMORTree::addAdditionalGLObject(), SUMORTree::removeAdditionalGLObject(), SUMORTree::removeObjectFromTreeDebug(), and SUMORTree::~SUMORTree().
|
protectedinherited |
number of inserted elements
Definition at line 231 of file SUMORTree.h.
Referenced by SUMORTree::addAdditionalGLObject(), SUMORTree::removeAdditionalGLObject(), and SUMORTree::updateBoundaries().
|
privateinherited |
Information whether the boundary was initialised.
Definition at line 178 of file Boundary.h.
Referenced by Boundary::add(), Boundary::isInitialised(), Boundary::operator==(), and Boundary::reset().
|
privateinherited |
Definition at line 175 of file Boundary.h.
Referenced by Boundary::add(), Boundary::around(), Boundary::around2D(), Boundary::around2D(), Boundary::contains2D(), Boundary::crosses(), Boundary::distanceTo2D(), Boundary::distanceTo2D(), Boundary::getCenter(), Boundary::getShape(), Boundary::getWidth(), Boundary::grow(), Boundary::growWidth(), Boundary::moveby(), Boundary::operator==(), Boundary::overlaps2D(), Boundary::overlapsWith(), Boundary::partialWithin(), Boundary::reset(), Boundary::scale(), Boundary::set(), Boundary::setOffsets(), and Boundary::xmax().
|
privateinherited |
The boundaries.
Definition at line 175 of file Boundary.h.
Referenced by Boundary::add(), Boundary::around(), Boundary::around2D(), Boundary::around2D(), Boundary::contains2D(), Boundary::crosses(), Boundary::distanceTo2D(), Boundary::distanceTo2D(), Boundary::getCenter(), Boundary::getShape(), Boundary::getWidth(), Boundary::grow(), Boundary::growWidth(), Boundary::moveby(), Boundary::operator==(), Boundary::overlaps2D(), Boundary::overlapsWith(), Boundary::partialWithin(), Boundary::reset(), Boundary::scale(), Boundary::set(), Boundary::setOffsets(), and Boundary::xmin().
|
privateinherited |
Definition at line 175 of file Boundary.h.
Referenced by Boundary::add(), Boundary::around(), Boundary::around2D(), Boundary::around2D(), Boundary::contains2D(), Boundary::crosses(), Boundary::distanceTo2D(), Boundary::distanceTo2D(), Boundary::flipY(), Boundary::getCenter(), Boundary::getHeight(), Boundary::getShape(), Boundary::grow(), Boundary::growHeight(), Boundary::moveby(), Boundary::operator==(), Boundary::overlaps2D(), Boundary::overlapsWith(), Boundary::partialWithin(), Boundary::reset(), Boundary::scale(), Boundary::set(), Boundary::setOffsets(), and Boundary::ymax().
|
privateinherited |
Definition at line 175 of file Boundary.h.
Referenced by Boundary::add(), Boundary::around(), Boundary::around2D(), Boundary::around2D(), Boundary::contains2D(), Boundary::crosses(), Boundary::distanceTo2D(), Boundary::distanceTo2D(), Boundary::flipY(), Boundary::getCenter(), Boundary::getHeight(), Boundary::getShape(), Boundary::grow(), Boundary::growHeight(), Boundary::moveby(), Boundary::operator==(), Boundary::overlaps2D(), Boundary::overlapsWith(), Boundary::partialWithin(), Boundary::reset(), Boundary::scale(), Boundary::set(), Boundary::setOffsets(), and Boundary::ymin().
|
privateinherited |
Definition at line 175 of file Boundary.h.
Referenced by Boundary::add(), Boundary::around(), Boundary::getCenter(), Boundary::getZRange(), Boundary::moveby(), Boundary::operator==(), Boundary::reset(), and Boundary::zmax().
|
privateinherited |
Definition at line 175 of file Boundary.h.
Referenced by Boundary::add(), Boundary::around(), Boundary::getCenter(), Boundary::getZRange(), Boundary::moveby(), Boundary::operator==(), Boundary::reset(), and Boundary::zmin().