Template Class GridN
Defined in File GridN.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ompl::Grid< _T >
(Template Class Grid)
Derived Types
public ompl::GridB< CellData *, OrderCellsByImportance >
(Template Class GridB)public ompl::GridB< _T, LessThanExternal, LessThanInternal >
(Template Class GridB)
Class Documentation
-
template<typename _T>
class GridN : public ompl::Grid<_T> Representation of a grid where cells keep track of how many neighbors they have.
Subclassed by ompl::GridB< CellData *, OrderCellsByImportance >, ompl::GridB< _T, LessThanExternal, LessThanInternal >
Public Types
Public Functions
-
inline explicit GridN(unsigned int dimension)
The constructor takes the dimension of the grid as argument.
-
~GridN() override = default
-
inline void setDimension(unsigned int dimension)
Update the dimension of the grid; this should not be done unless the grid is empty
-
inline void setBounds(const Coord &low, const Coord &up)
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.
-
inline void setInteriorCellNeighborLimit(unsigned int count)
Set the limit of neighboring cells to determine when a cell becomes interior by default, this is 2 * dimension of grid
-
inline void neighbors(const Cell *cell, CellArray &list) const
Get the list of neighbors for a given cell.
-
inline void neighbors(const Coord &coord, CellArray &list) const
Get the list of neighbors for a given coordinate.
-
inline void neighbors(Coord &coord, CellArray &list) const
Get the list of neighbors for a given coordinate.
-
inline virtual BaseCell *createCell(const Coord &coord, BaseCellArray *nbh = nullptr) override
Instantiate a new cell at given coordinates; Optionally return the list of future neighbors. Note: this call only creates the cell, but does not add it to the grid. It however updates the neighbor count for neighboring cells
Protected Functions
Protected Attributes
-
bool hasBounds_
Flag indicating whether bounds are in effect for this grid.
-
unsigned int interiorCellNeighborsLimit_
By default, cells are considered on the border if 2n neighbors are created, for a space of dimension n. this value is overridden and set in this member variable
-
bool overrideCellNeighborsLimit_
Flag indicating whether the neighbor count used to determine whether a cell is on the border or not
-
inline explicit GridN(unsigned int dimension)