Public Types | Public Member Functions
lslgeneric::SpatialIndex< PointT > Class Template Reference

Base class for all spatial indexing structures. More...

#include <spatial_index.h>

Inheritance diagram for lslgeneric::SpatialIndex< PointT >:
Inheritance graph
[legend]

List of all members.

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 ()

Detailed Description

template<typename PointT>
class lslgeneric::SpatialIndex< PointT >

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 56 of file spatial_index.h.


Member Typedef Documentation

template<typename PointT>
typedef std::vector<Cell<PointT>*> lslgeneric::SpatialIndex< PointT >::CellPtrVector

Definition at line 61 of file spatial_index.h.

template<typename PointT>
typedef CellPtrVector::iterator lslgeneric::SpatialIndex< PointT >::CellVectorItr

Definition at line 62 of file spatial_index.h.


Constructor & Destructor Documentation

template<typename PointT>
virtual lslgeneric::SpatialIndex< PointT >::~SpatialIndex ( ) [inline, virtual]

Definition at line 64 of file spatial_index.h.


Member Function Documentation

template<typename PointT>
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 >.

template<typename 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 >.

template<typename 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 >.

template<typename 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 >.

template<typename 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 >.

template<typename PointT>
virtual Cell<PointT>* lslgeneric::SpatialIndex< PointT >::getCellForPoint ( const PointT point) [pure virtual]
template<typename 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 >.

template<typename PointT>
virtual int lslgeneric::SpatialIndex< PointT >::loadFromJFF ( FILE *  jffin) const [inline, virtual]

reads map contents from .jff file

Definition at line 99 of file spatial_index.h.

template<typename PointT>
virtual void lslgeneric::SpatialIndex< PointT >::setCellType ( Cell< PointT > *  type) [pure virtual]
template<typename 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 89 of file spatial_index.h.

template<typename PointT>
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 90 of file spatial_index.h.

template<typename PointT>
virtual int lslgeneric::SpatialIndex< PointT >::size ( void  ) const [inline, virtual]

Definition at line 77 of file spatial_index.h.


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


ndt_map
Author(s): Todor Stoyanov, Jari Saarinen, Henrik Andreasson
autogenerated on Mon Oct 6 2014 03:18:54