|
void | Add (T aShape) |
| Add a SHAPE to the index.
|
|
void | Add (T aShape, const BOX2I &aBbox) |
| Add a shape with alternate BBox.
|
|
void | Remove (T aShape) |
| Remove a SHAPE from the index.
|
|
void | RemoveAll () |
| Remove all the contents of the index.
|
|
template<class V > |
void | Accept (V aVisitor) |
| Accept a visitor for every SHAPE object contained in this INDEX.
|
|
void | Reindex () |
| Rebuild the index.
|
|
template<class V > |
int | Query (const SHAPE *aShape, int aMinDistance, V &aVisitor) const |
| Run a callback on every SHAPE object contained in the bounding box of (shape).
|
|
Iterator | Begin () |
| Create an iterator for the current index object.
|
|
◆ Accept()
template<class T = SHAPE*>
template<class V >
Accept a visitor for every SHAPE object contained in this INDEX.
- Parameters
-
aVisitor | is the visitor object to be run. |
◆ Add() [1/2]
Add a SHAPE to the index.
- Parameters
-
◆ Add() [2/2]
Add a shape with alternate BBox.
- Parameters
-
aShape | Shape (Item) to add. |
aBbox | alternate bounding box. This should be a subset of the item's bbox |
◆ Begin()
Create an iterator for the current index object.
- Returns
- iterator to the first object.
◆ Query()
template<class T = SHAPE*>
template<class V >
int SHAPE_INDEX< T >::Query |
( |
const SHAPE * |
aShape, |
|
|
int |
aMinDistance, |
|
|
V & |
aVisitor |
|
) |
| const |
|
inline |
Run a callback on every SHAPE object contained in the bounding box of (shape).
- Parameters
-
aShape | is the shape to search against. |
aMinDistance | is the distance threshold. |
aVisitor | is the object to be invoked on every object contained in the search area. |
◆ Reindex()
Rebuild the index.
This should be used if the geometry of the objects contained by the index has changed.
◆ Remove()
Remove a SHAPE from the index.
- Parameters
-
aShape | is the SHAPE to remove. |
The documentation for this class was generated from the following file: