Horizon
Classes | Public Member Functions | List of all members
SHAPE_INDEX< T > Class Template Reference

Classes

class  Iterator
 

Public Member Functions

void Add (T aShape)
 Function Add() More...
 
void Remove (T aShape)
 Function Remove() More...
 
void RemoveAll ()
 Function RemoveAll() More...
 
template<class V >
void Accept (V aVisitor)
 Function Accept() More...
 
void Reindex ()
 Function Reindex() More...
 
template<class V >
int Query (const SHAPE *aShape, int aMinDistance, V &aVisitor, bool aExact)
 Function Query() More...
 
Iterator Begin ()
 Function Begin() More...
 

Member Function Documentation

◆ Accept()

template<class T = SHAPE*>
template<class V >
void SHAPE_INDEX< T >::Accept ( aVisitor)
inline

Function Accept()

Accepts a visitor for every SHAPE object contained in this INDEX.

Parameters
aVisitorVisitor object to be run

◆ Add()

template<class T >
void SHAPE_INDEX< T >::Add ( aShape)

Function Add()

Adds a SHAPE to the index.

Parameters
aShapeis the new SHAPE.

◆ Begin()

template<class T >
SHAPE_INDEX< T >::Iterator SHAPE_INDEX< T >::Begin ( )

Function Begin()

Creates an iterator for the current index object

Returns
iterator

◆ Query()

template<class T = SHAPE*>
template<class V >
int SHAPE_INDEX< T >::Query ( const SHAPE aShape,
int  aMinDistance,
V &  aVisitor,
bool  aExact 
)
inline

Function Query()

Runs a callback on every SHAPE object contained in the bounding box of (shape).

Parameters
aShapeshape to search against
aMinDistancedistance threshold
aVisitorobject to be invoked on every object contained in the search area.

◆ Reindex()

template<class T >
void SHAPE_INDEX< T >::Reindex ( )

Function Reindex()

Rebuilds the index. This should be used if the geometry of the objects contained by the index has changed.

◆ Remove()

template<class T >
void SHAPE_INDEX< T >::Remove ( aShape)

Function Remove()

Removes a SHAPE to the index.

Parameters
aShapeis the new SHAPE.

◆ RemoveAll()

template<class T >
void SHAPE_INDEX< T >::RemoveAll ( )

Function RemoveAll()

Removes all the contents of the index.


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