libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
API::nDimGrid< _nDimGrid_Dimension_ > Class Template Reference

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.
 
nDimCellgetCell (unsigned int i)
 Accessors to cells. More...
 
nDimCellgetCell (const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > &coordinate)
 
nDimCellgetCell (const Eigen::Matrix< double, _nDimGrid_Dimension_, 1 > &pos)
 
nDimCellgetCell (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...
 
nDimCellgetNeighbour (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 nDimCellcreateNewCell (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...
 

Constructor & Destructor Documentation

template<int _nDimGrid_Dimension_>
nDimGrid::nDimGrid ( )

Constructors.

Constructor.

Parameters
Xnumber of cells
Ynumber of cells
Znumber of cells

Member Function Documentation

template<int _nDimGrid_Dimension_>
Matrix< double, _nDimGrid_Dimension_, 1 > nDimGrid::computeCellCorner ( const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > &  coordinate)
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.

Parameters
integerindex
template<int _nDimGrid_Dimension_>
void nDimGrid::createAllCells ( )

Creates all cells in the grid calling the function create new cell.

Creates All Cells.

Parameters
vectorenvSize XMin Xmax YMin YMax ZMin ZMax
template<int _nDimGrid_Dimension_>
nDimCell * nDimGrid::createNewCell ( int  index,
const Eigen::Matrix< int, _nDimGrid_Dimension_, 1 > &  coordinate 
)
protectedvirtual

Allocates one cell.

Virtual function that creates a new Cell.

Parameters
integerindex
integerx
integery
integerz
template<int _nDimGrid_Dimension_>
void nDimGrid::draw ( )
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

template<int _nDimGrid_Dimension_>
nDimCell * nDimGrid::getCell ( unsigned int  i)

Accessors to cells.

Get Cell.

Parameters
index
template<int _nDimGrid_Dimension_>
nDimCell * nDimGrid::getCell ( double *  point)

Get Cell in 3D nDimGrid.

Parameters
index
template<int _nDimGrid_Dimension_>
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.

Parameters
index
template<int _nDimGrid_Dimension_>
Matrix< int, _nDimGrid_Dimension_, 1 > nDimGrid::getCellCoord ( nDimCell ptrCell)

Get place in grid.

Parameters
index
template<int _nDimGrid_Dimension_>
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.

template<int _nDimGrid_Dimension_>
unsigned int nDimGrid::getNumberOfCells ( )

Returns the number of cell in the grid.

Get Number Of Cells.


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