libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
API::TwoDGrid Class Reference
Inheritance diagram for API::TwoDGrid:
API::BaseGrid GTP2DGrid HRICS::EnvGrid HRICS::MultiAgentGrid HRICS::PlanGrid

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW TwoDGrid ()
 Constructor. More...
 
 TwoDGrid (Eigen::Vector2i size, std::vector< double > envSize)
 
 TwoDGrid (double samplingRate, std::vector< double > envSize)
 
 ~TwoDGrid ()
 Destructor.
 
void createAllCells ()
 Creates All Cells. More...
 
Eigen::Vector2d getCellSize ()
 
TwoDCellgetCell (const Eigen::Vector2i &cell)
 
TwoDCellgetCell (int x, int y)
 Retruns the Cell at (x,y) More...
 
TwoDCellgetCell (Eigen::Vector2d pos)
 
TwoDCellgetCell (double *pos)
 Get Cell in 3D ThreeDGrid. More...
 
TwoDCellgetCell (unsigned int index)
 Get Cell. More...
 
bool isCellCoordInGrid (const Eigen::Vector2i &coord)
 Is a Coord inside the Grid (used to debug) More...
 
Eigen::Vector2i getCellCoord (TwoDCell *ptrCell)
 Get place in grid. More...
 
int getNumberOfCells ()
 Get Number Of Cells.
 
TwoDCellgetNeighbour (const Eigen::Vector2i &pos, int i)
 Get Neighboor Cell.
 
Eigen::Vector2d getCoordinates (TwoDCell *cell)
 Retrive the X Y Z coordinate of the cell from its index.
 
virtual void draw ()
 
- Public Member Functions inherited from API::BaseGrid
 BaseGrid (const BaseGrid &grid)
 
BaseCellgetCell (unsigned int i)
 Get Cell. More...
 
unsigned int getNumberOfCells ()
 Get Number Of Cells.
 
virtual std::vector
< Eigen::Vector3d > 
getBox ()
 
virtual bool writeToXmlFile (std::string file)
 Virtual function for creating an xml document.
 
virtual bool loadFromXmlFile (std::string file)
 Virtual function for reading from an xml document.
 
std::string getName ()
 

Protected Member Functions

virtual TwoDCellcreateNewCell (unsigned int index, unsigned int x, unsigned int y)
 Virtual function that creates a new Cell. More...
 
Eigen::Vector2d computeCellCorner (int x, int y)
 Computes the corner of a cell. More...
 

Protected Attributes

Eigen::Vector2d _originCorner
 
Eigen::Vector2d _cellSize
 
unsigned int _nbCellsX
 
unsigned int _nbCellsY
 
- Protected Attributes inherited from API::BaseGrid
std::vector< BaseCell * > _cells
 
std::string m_name
 

Constructor & Destructor Documentation

TwoDGrid::TwoDGrid ( )

Constructor.

Parameters
Xnumber of cells
Ynumber of cells

Member Function Documentation

Vector2d TwoDGrid::computeCellCorner ( int  x,
int  y 
)
protected

Computes the corner of a cell.

Parameters
integerindex
void TwoDGrid::createAllCells ( )

Creates All Cells.

Parameters
vectorenvSize XMin Xmax YMin YMax
API::TwoDCell * TwoDGrid::createNewCell ( unsigned int  index,
unsigned int  x,
unsigned int  y 
)
protectedvirtual

Virtual function that creates a new Cell.

Parameters
integerindex
integerx
integery
integerz

Reimplemented in HRICS::MultiAgentGrid, HRICS::EnvGrid, and HRICS::PlanGrid.

TwoDCell * TwoDGrid::getCell ( int  x,
int  y 
)

Retruns the Cell at (x,y)

Parameters
integersx, y
TwoDCell * TwoDGrid::getCell ( double *  pos)

Get Cell in 3D ThreeDGrid.

Parameters
index
TwoDCell * TwoDGrid::getCell ( unsigned int  index)

Get Cell.

Parameters
index
Vector2i TwoDGrid::getCellCoord ( TwoDCell ptrCell)

Get place in grid.

Parameters
index
bool TwoDGrid::isCellCoordInGrid ( const Eigen::Vector2i &  coord)

Is a Coord inside the Grid (used to debug)

Parameters
indexvector

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