This class defines a grid that keeps track of its boundary: it distinguishes between interior and exterior cells. More...
#include <GridB.h>
Classes | |
struct | LessThanExternalCell |
Define order for external cells. More... | |
struct | LessThanInternalCell |
Define order for internal cells. More... | |
Public Types | |
typedef GridN< _T >::Cell | Cell |
Definition of a cell in this grid. | |
typedef GridN< _T >::CellArray | CellArray |
The datatype for arrays of cells. | |
typedef GridN< _T >::Coord | Coord |
Datatype for cell coordinates. | |
typedef void(* | EventCellUpdate )(Cell *, void *) |
Public Member Functions | |
virtual void | add (Cell *cell) |
Add the cell to the grid. | |
virtual void | clear (void) |
Clear all cells in the grid. | |
unsigned int | countExternal (void) const |
Return the number of external cells. | |
unsigned int | countInternal (void) const |
Return the number of internal cells. | |
virtual Cell * | createCell (const Coord &coord, CellArray *nbh=NULL) |
Create a cell but do not add it to the grid; update neighboring cells however. | |
double | fracExternal (void) const |
Return the fraction of external cells. | |
double | fracInternal (void) const |
Return the fraction of internal cells. | |
GridB (unsigned int dimension) | |
Constructor. | |
void | onCellUpdate (EventCellUpdate event, void *arg) |
virtual bool | remove (Cell *cell) |
Remove a cell from the grid. | |
virtual void | status (std::ostream &out=std::cout) const |
Print information about the data in this grid structure. | |
Cell * | topExternal (void) const |
Return the cell that is at the top of the heap maintaining external cells. | |
Cell * | topInternal (void) const |
Return the cell that is at the top of the heap maintaining internal cells. | |
void | update (Cell *cell) |
Update the position in the heaps for a particular cell. | |
void | updateAll (void) |
Update all cells and reconstruct the heaps. | |
virtual | ~GridB (void) |
Protected Types | |
typedef BinaryHeap< CellX *, LessThanExternalCell > | externalBHeap |
Datatype for a heap of cells containing exterior cells. | |
typedef BinaryHeap< CellX *, LessThanInternalCell > | internalBHeap |
Datatype for a heap of cells containing interior cells. | |
Protected Member Functions | |
void | clearHeaps (void) |
Clear the data from both heaps. | |
void | setupHeaps (void) |
Set the update procedure for the heaps of internal and external cells. | |
Static Protected Member Functions | |
static void | noCellUpdate (Cell *, void *) |
Default no-op update routine for a cell. | |
static void | setHeapElementE (typename externalBHeap::Element *element, void *) |
Routine used internally for keeping track of binary heap elements for external cells. | |
static void | setHeapElementI (typename internalBHeap::Element *element, void *) |
Routine used internally for keeping track of binary heap elements for internal cells. | |
Protected Attributes | |
EventCellUpdate | eventCellUpdate_ |
Pointer to function to be called when a cell needs to be updated. | |
void * | eventCellUpdateData_ |
Data to be passed to function pointer above. | |
externalBHeap | external_ |
The heap of external cells. | |
internalBHeap | internal_ |
The heap of interior cells. |
This class defines a grid that keeps track of its boundary: it distinguishes between interior and exterior cells.
Definition at line 51 of file GridB.h.
typedef GridN<_T>::Cell ompl::GridB< _T, LessThanExternal, LessThanInternal >::Cell |
typedef GridN<_T>::CellArray ompl::GridB< _T, LessThanExternal, LessThanInternal >::CellArray |
The datatype for arrays of cells.
Reimplemented from ompl::GridN< _T >.
typedef GridN<_T>::Coord ompl::GridB< _T, LessThanExternal, LessThanInternal >::Coord |
Datatype for cell coordinates.
Reimplemented from ompl::GridN< _T >.
typedef void(* ompl::GridB< _T, LessThanExternal, LessThanInternal >::EventCellUpdate)(Cell *, void *) |
typedef BinaryHeap< CellX*, LessThanExternalCell > ompl::GridB< _T, LessThanExternal, LessThanInternal >::externalBHeap [protected] |
typedef BinaryHeap< CellX*, LessThanInternalCell > ompl::GridB< _T, LessThanExternal, LessThanInternal >::internalBHeap [protected] |
ompl::GridB< _T, LessThanExternal, LessThanInternal >::GridB | ( | unsigned int | dimension | ) | [inline, explicit] |
virtual ompl::GridB< _T, LessThanExternal, LessThanInternal >::~GridB | ( | void | ) | [inline, virtual] |
virtual void ompl::GridB< _T, LessThanExternal, LessThanInternal >::add | ( | Cell * | cell | ) | [inline, virtual] |
Add the cell to the grid.
Reimplemented from ompl::Grid< _T >.
virtual void ompl::GridB< _T, LessThanExternal, LessThanInternal >::clear | ( | void | ) | [inline, virtual] |
Clear all cells in the grid.
Reimplemented from ompl::Grid< _T >.
void ompl::GridB< _T, LessThanExternal, LessThanInternal >::clearHeaps | ( | void | ) | [inline, protected] |
unsigned int ompl::GridB< _T, LessThanExternal, LessThanInternal >::countExternal | ( | void | ) | const [inline] |
unsigned int ompl::GridB< _T, LessThanExternal, LessThanInternal >::countInternal | ( | void | ) | const [inline] |
virtual Cell* ompl::GridB< _T, LessThanExternal, LessThanInternal >::createCell | ( | const Coord & | coord, | |
CellArray * | nbh = NULL | |||
) | [inline, virtual] |
Create a cell but do not add it to the grid; update neighboring cells however.
Reimplemented from ompl::Grid< _T >.
double ompl::GridB< _T, LessThanExternal, LessThanInternal >::fracExternal | ( | void | ) | const [inline] |
double ompl::GridB< _T, LessThanExternal, LessThanInternal >::fracInternal | ( | void | ) | const [inline] |
static void ompl::GridB< _T, LessThanExternal, LessThanInternal >::noCellUpdate | ( | Cell * | , | |
void * | ||||
) | [inline, static, protected] |
void ompl::GridB< _T, LessThanExternal, LessThanInternal >::onCellUpdate | ( | EventCellUpdate | event, | |
void * | arg | |||
) | [inline] |
virtual bool ompl::GridB< _T, LessThanExternal, LessThanInternal >::remove | ( | Cell * | cell | ) | [inline, virtual] |
Remove a cell from the grid.
Reimplemented from ompl::GridN< _T >.
static void ompl::GridB< _T, LessThanExternal, LessThanInternal >::setHeapElementE | ( | typename externalBHeap::Element * | element, | |
void * | ||||
) | [inline, static, protected] |
static void ompl::GridB< _T, LessThanExternal, LessThanInternal >::setHeapElementI | ( | typename internalBHeap::Element * | element, | |
void * | ||||
) | [inline, static, protected] |
void ompl::GridB< _T, LessThanExternal, LessThanInternal >::setupHeaps | ( | void | ) | [inline, protected] |
virtual void ompl::GridB< _T, LessThanExternal, LessThanInternal >::status | ( | std::ostream & | out = std::cout |
) | const [inline, virtual] |
Print information about the data in this grid structure.
Reimplemented from ompl::Grid< _T >.
Cell* ompl::GridB< _T, LessThanExternal, LessThanInternal >::topExternal | ( | void | ) | const [inline] |
Cell* ompl::GridB< _T, LessThanExternal, LessThanInternal >::topInternal | ( | void | ) | const [inline] |
void ompl::GridB< _T, LessThanExternal, LessThanInternal >::update | ( | Cell * | cell | ) | [inline] |
void ompl::GridB< _T, LessThanExternal, LessThanInternal >::updateAll | ( | void | ) | [inline] |
EventCellUpdate ompl::GridB< _T, LessThanExternal, LessThanInternal >::eventCellUpdate_ [protected] |
void* ompl::GridB< _T, LessThanExternal, LessThanInternal >::eventCellUpdateData_ [protected] |
externalBHeap ompl::GridB< _T, LessThanExternal, LessThanInternal >::external_ [protected] |
internalBHeap ompl::GridB< _T, LessThanExternal, LessThanInternal >::internal_ [protected] |