libmove3d-planners
|
Public Member Functions | |
nDimGrid () | |
Constructors. More... | |
nDimGrid (Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > size, std::vector< double > envSize) | |
nDimGrid (double samplingRate, std::vector< double > envSize) | |
virtual | ~nDimGrid () |
Destructor. | |
void | createAllCells () |
Creates all cells in the grid calling the function create new cell. More... | |
Eigen::Matrix< double, _nDimGrid_Dimension_, 1 > | getCellSize () |
Returns the dimension of on cell. | |
nDimCell * | getCell (unsigned int i) |
Accessors to cells. More... | |
nDimCell * | getCell (const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > &coordinate) |
nDimCell * | getCell (const Eigen::Matrix< double, _nDimGrid_Dimension_, 1 > &pos) |
nDimCell * | getCell (double *pos) |
Get Cell in 3D nDimGrid. More... | |
Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > | getCellCoord (unsigned int index) |
Returns the coordinate of a cell in the grid. More... | |
Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > | getCellCoord (nDimCell *ptrCell) |
Get place in grid. More... | |
unsigned int | getNumberOfCells () |
Returns the number of cell in the grid. More... | |
nDimCell * | getNeighbour (const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > &coordinate, int i) |
Returns the neighbor cells of the cell at coordinate 'pos'. More... | |
virtual void | draw () |
Function to display the grid. More... | |
Protected Member Functions | |
virtual nDimCell * | createNewCell (int index, const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > &coordinate) |
Allocates one cell. More... | |
Eigen::Matrix< double, _nDimGrid_Dimension_, 1 > | computeCellCorner (const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > &coordinate) |
Compute the cell's corner as the center is stored inside the cell and the size is stored in the Grid. More... | |
nDimGrid::nDimGrid | ( | ) |
Constructors.
Constructor.
X | number of cells |
Y | number of cells |
Z | number of cells |
|
protected |
Compute the cell's corner as the center is stored inside the cell and the size is stored in the Grid.
Computes the corner of a cell.
integer | index |
void nDimGrid::createAllCells | ( | ) |
Creates all cells in the grid calling the function create new cell.
Creates All Cells.
vector | envSize XMin Xmax YMin YMax ZMin ZMax |
|
protectedvirtual |
Allocates one cell.
Virtual function that creates a new Cell.
integer | index |
integer | x |
integer | y |
integer | z |
|
virtual |
Function to display the grid.
Retrive the X Y Z coordinate of the cell from its index.
Draws the grid (function is virtual Example for 2D and 3D
nDimCell * nDimGrid::getCell | ( | unsigned int | i | ) |
Accessors to cells.
Get Cell.
index |
nDimCell * nDimGrid::getCell | ( | double * | point | ) |
Get Cell in 3D nDimGrid.
index |
Matrix< int, _nDimGrid_Dimension_, 1 > nDimGrid::getCellCoord | ( | unsigned int | index | ) |
Returns the coordinate of a cell in the grid.
Get place in grid from index.
index |
Matrix< int, _nDimGrid_Dimension_, 1 > nDimGrid::getCellCoord | ( | nDimCell * | ptrCell | ) |
Get place in grid.
index |
nDimCell * nDimGrid::getNeighbour | ( | const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > & | coordinate, |
int | i | ||
) |
Returns the neighbor cells of the cell at coordinate 'pos'.
Get Neighboor Cell.
unsigned int nDimGrid::getNumberOfCells | ( | ) |
Returns the number of cell in the grid.
Get Number Of Cells.