31 assert( range.Start() != -1 && range.End() != -1 );
33 if(
m_subIndices.size() <=
static_cast<size_t>( range.End() ) )
37 for(
int i = startIdx; i <= range.End(); ++i )
38 m_subIndices.emplace_back( std::make_unique<ITEM_SHAPE_INDEX>( i ) );
43 for(
int i = range.Start(); i <= range.End(); ++i )
64 std::map<int, std::vector<std::pair<ITEM*, BOX2I>>> layerItems;
70 for(
int i = range.Start(); i <= range.End(); ++i )
73 layerItems[i].emplace_back( item, box );
78 for(
auto& [layerId, items] : layerItems )
80 if(
static_cast<size_t>( layerId ) <
m_subIndices.size() )
89 assert( range.Start() != -1 && range.End() != -1 );
91 if(
m_subIndices.size() <=
static_cast<size_t>( range.End() ) )
94 for(
int i = range.Start(); i <= range.End(); ++i )
std::deque< std::unique_ptr< ITEM_SHAPE_INDEX > > m_subIndices
void Replace(ITEM *aOldItem, ITEM *aNewItem)
Replaces one item with another.
void Remove(ITEM *aItem)
Removes an item from the spatial index.
std::list< ITEM * > NET_ITEMS_LIST
void SetDeferred(bool aDeferred)
When deferred, Add() registers items in metadata but skips spatial index insertion.
void Add(ITEM *aItem)
Adds item to the spatial index.
NET_ITEMS_LIST * GetItemsForNet(NET_HANDLE aNet)
Returns list of all items in a given net.
std::map< NET_HANDLE, NET_ITEMS_LIST > m_netMap
void BuildSpatialIndex()
Bulk load the spatial sub-indices from all registered items.
Base class for PNS router board items.
const PNS_LAYER_RANGE & Layers() const
virtual NET_HANDLE Net() const
Represent a contiguous set of PCB layers.
Push and Shove diff pair dimensions (gap) settings dialog.
BOX2I boundingBox(T aObject, int aLayer)
Used by SHAPE_INDEX to get the bounding box of a generic T object.