Representation of a grid where cells keep track of how many neighbors they have. More...
#include <GridN.h>
Classes | |
struct | Cell |
Definition of a cell in this grid. More... | |
Public Types | |
typedef Grid< _T >::Cell | BaseCell |
Datatype for cell in base class. | |
typedef Grid< _T >::CellArray | BaseCellArray |
Datatype for array of cells in base class. | |
typedef Grid< _T >::Coord | Coord |
Datatype for cell coordinates. | |
typedef std::vector< Cell * > | CellArray |
The datatype for arrays of cells. | |
Public Member Functions | |
GridN (unsigned int dimension) | |
The constructor takes the dimension of the grid as argument. | |
void | setDimension (unsigned int dimension) |
void | setBounds (const Coord &low, const Coord &up) |
void | setInteriorCellNeighborLimit (unsigned int count) |
Cell * | getCell (const Coord &coord) const |
Get the cell at a specified coordinate. | |
void | neighbors (const Cell *cell, CellArray &list) const |
Get the list of neighbors for a given cell. | |
void | neighbors (const Coord &coord, CellArray &list) const |
Get the list of neighbors for a given coordinate. | |
void | neighbors (Coord &coord, CellArray &list) const |
Get the list of neighbors for a given coordinate. | |
virtual BaseCell * | createCell (const Coord &coord, BaseCellArray *nbh=NULL) |
virtual bool | remove (BaseCell *cell) |
void | getCells (CellArray &cells) const |
Get the set of instantiated cells in the grid. | |
Protected Member Functions | |
unsigned int | numberOfBoundaryDimensions (const Coord &coord) const |
Compute how many sides of a coordinate touch the boundaries of the grid. | |
Protected Attributes | |
bool | hasBounds_ |
Flag indicating whether bounds are in effect for this grid. | |
Coord | lowBound_ |
If bounds are set, this defines the lower corner cell. | |
Coord | upBound_ |
If bounds are set, this defines the upper corner cell. | |
unsigned int | interiorCellNeighborsLimit_ |
bool | overrideCellNeighborsLimit_ |
Representation of a grid where cells keep track of how many neighbors they have.
virtual BaseCell* ompl::GridN< _T >::createCell | ( | const Coord & | coord, |
BaseCellArray * | nbh = NULL |
||
) | [inline, virtual] |
virtual bool ompl::GridN< _T >::remove | ( | BaseCell * | cell | ) | [inline, virtual] |
Remove a cell from the grid. If the cell has not been Added to the grid, only update the neighbor list
Reimplemented from ompl::Grid< _T >.
Reimplemented in ompl::GridB< _T, LessThanExternal, LessThanInternal >.
void ompl::GridN< _T >::setBounds | ( | const Coord & | low, |
const Coord & | up | ||
) | [inline] |
If bounds for the grid need to be considered, we can set them here. When the number of neighbors are counted, whether the Space is bounded matters, in the sense that if a cell is on the boundary, we know some of its neighbors cannot exist. In order to allow such a cell to reflect the fact it has Achieved its maximal number of neighbors, the boundary is counted as the number of neighbors it prevents from existing.
void ompl::GridN< _T >::setDimension | ( | unsigned int | dimension | ) | [inline] |
Update the dimension of the grid; this should not be done unless the grid is empty
Reimplemented from ompl::Grid< _T >.
void ompl::GridN< _T >::setInteriorCellNeighborLimit | ( | unsigned int | count | ) | [inline] |
unsigned int ompl::GridN< _T >::interiorCellNeighborsLimit_ [protected] |
bool ompl::GridN< _T >::overrideCellNeighborsLimit_ [protected] |