Base class for all spatial indexing structures. More...
#include <spatial_index.h>
Public Types | |
typedef std::vector< Cell < PointT > * > | CellPtrVector |
typedef CellPtrVector::iterator | CellVectorItr |
Public Member Functions | |
virtual Cell< PointT > * | addPoint (const PointT &point)=0 |
add a point and get back the pointer to the cell in which it ended up | |
virtual CellVectorItr | begin ()=0 |
iterator through all cells in index, points at the begining | |
virtual SpatialIndex< PointT > * | clone () const =0 |
clone - create an empty object with same type | |
virtual SpatialIndex< PointT > * | copy () const =0 |
copy - create the same object as a new instance | |
virtual CellVectorItr | end ()=0 |
iterator through all cells in index, points at the end | |
virtual Cell< PointT > * | getCellForPoint (const PointT &point)=0 |
virtual void | getNeighbors (const PointT &point, const double &radius, std::vector< Cell< PointT > * > &cells)=0 |
method to return all cells within a certain radius from a point | |
virtual int | loadFromJFF (FILE *jffin) const |
reads map contents from .jff file | |
virtual void | setCellType (Cell< PointT > *type)=0 |
sets the cell factory type | |
virtual void | setCenter (const double &cx, const double &cy, const double &cz) |
virtual void | setSize (const double &sx, const double &sy, const double &sz) |
virtual int | size () const |
virtual | ~SpatialIndex () |
Base class for all spatial indexing structures.
A SpatialIndex is anything that holds PointInterface pointers and organizes them in a manner accessible from outside. This class defines what is necessary to be a spatial index - namely the ability to find the cell in which a point is placed and to store newly observed points. It should also be possible to check the size of the occupied space, as well as to get cells neighboring any given cell.
Definition at line 55 of file spatial_index.h.
typedef std::vector<Cell<PointT>*> lslgeneric::SpatialIndex< PointT >::CellPtrVector |
Definition at line 60 of file spatial_index.h.
typedef CellPtrVector::iterator lslgeneric::SpatialIndex< PointT >::CellVectorItr |
Definition at line 61 of file spatial_index.h.
virtual lslgeneric::SpatialIndex< PointT >::~SpatialIndex | ( | ) | [inline, virtual] |
Definition at line 63 of file spatial_index.h.
virtual Cell<PointT>* lslgeneric::SpatialIndex< PointT >::addPoint | ( | const PointT & | point | ) | [pure virtual] |
add a point and get back the pointer to the cell in which it ended up
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual CellVectorItr lslgeneric::SpatialIndex< PointT >::begin | ( | ) | [pure virtual] |
iterator through all cells in index, points at the begining
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual SpatialIndex<PointT>* lslgeneric::SpatialIndex< PointT >::clone | ( | ) | const [pure virtual] |
clone - create an empty object with same type
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual SpatialIndex<PointT>* lslgeneric::SpatialIndex< PointT >::copy | ( | ) | const [pure virtual] |
copy - create the same object as a new instance
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual CellVectorItr lslgeneric::SpatialIndex< PointT >::end | ( | ) | [pure virtual] |
iterator through all cells in index, points at the end
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual Cell<PointT>* lslgeneric::SpatialIndex< PointT >::getCellForPoint | ( | const PointT & | point | ) | [pure virtual] |
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual void lslgeneric::SpatialIndex< PointT >::getNeighbors | ( | const PointT & | point, |
const double & | radius, | ||
std::vector< Cell< PointT > * > & | cells | ||
) | [pure virtual] |
method to return all cells within a certain radius from a point
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual int lslgeneric::SpatialIndex< PointT >::loadFromJFF | ( | FILE * | jffin | ) | const [inline, virtual] |
reads map contents from .jff file
Definition at line 98 of file spatial_index.h.
virtual void lslgeneric::SpatialIndex< PointT >::setCellType | ( | Cell< PointT > * | type | ) | [pure virtual] |
sets the cell factory type
Implemented in lslgeneric::OctTree< PointT >, lslgeneric::CellVector< PointT >, and lslgeneric::LazyGrid< PointT >.
virtual void lslgeneric::SpatialIndex< PointT >::setCenter | ( | const double & | cx, |
const double & | cy, | ||
const double & | cz | ||
) | [inline, virtual] |
the following methods provide index specific functionalities and don't have to be implemented by all sub-classes
Reimplemented in lslgeneric::OctTree< PointT >, and lslgeneric::LazyGrid< PointT >.
Definition at line 88 of file spatial_index.h.
virtual void lslgeneric::SpatialIndex< PointT >::setSize | ( | const double & | sx, |
const double & | sy, | ||
const double & | sz | ||
) | [inline, virtual] |
Reimplemented in lslgeneric::OctTree< PointT >, and lslgeneric::LazyGrid< PointT >.
Definition at line 89 of file spatial_index.h.
virtual int lslgeneric::SpatialIndex< PointT >::size | ( | ) | const [inline, virtual] |
Definition at line 76 of file spatial_index.h.