![]() |
KiCad PCB EDA Suite
|
CN_RTREE - Implements an R-tree for fast spatial indexing of connectivity items. More...
#include <connectivity_rtree.h>
Public Member Functions | |
CN_RTREE () | |
~CN_RTREE () | |
void | Insert (T aItem) |
Function Insert() Inserts an item into the tree. More... | |
void | Remove (T aItem) |
Function Remove() Removes an item from the tree. More... | |
void | RemoveAll () |
Function RemoveAll() Removes all items from the RTree. More... | |
template<class Visitor > | |
void | Query (const BOX2I &aBounds, const LAYER_RANGE &aRange, Visitor &aVisitor) const |
Function Query() Executes a function object aVisitor for each item whose bounding box intersects with aBounds. More... | |
Private Attributes | |
RTree< T, int, 3, double > * | m_tree |
CN_RTREE - Implements an R-tree for fast spatial indexing of connectivity items.
Non-owning.
Definition at line 39 of file connectivity_rtree.h.
Definition at line 43 of file connectivity_rtree.h.
Definition at line 48 of file connectivity_rtree.h.
|
inline |
Function Insert() Inserts an item into the tree.
Item's bounding box is taken via its BBox() method.
Definition at line 57 of file connectivity_rtree.h.
Referenced by CN_LIST::addItemtoTree().
|
inline |
Function Query() Executes a function object aVisitor for each item whose bounding box intersects with aBounds.
Definition at line 110 of file connectivity_rtree.h.
Referenced by CN_LIST::FindNearby().
|
inline |
Function Remove() Removes an item from the tree.
Removal is done by comparing pointers, attempting to remove a copy of the item will fail.
Definition at line 73 of file connectivity_rtree.h.
Referenced by CN_LIST::RemoveInvalidItems().
|
inline |
Function RemoveAll() Removes all items from the RTree.
Definition at line 99 of file connectivity_rtree.h.
Referenced by CN_LIST::Clear().
|
private |
Definition at line 120 of file connectivity_rtree.h.
Referenced by CN_RTREE< CN_ITEM * >::CN_RTREE(), CN_RTREE< CN_ITEM * >::Insert(), CN_RTREE< CN_ITEM * >::Query(), CN_RTREE< CN_ITEM * >::Remove(), CN_RTREE< CN_ITEM * >::RemoveAll(), and CN_RTREE< CN_ITEM * >::~CN_RTREE().