8 #include "API/Grids/BaseGrid.hpp"
10 #include "API/Grids/TwoDCell.hpp"
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
30 TwoDGrid( Eigen::Vector2i size, std::vector<double> envSize );
31 TwoDGrid(
double samplingRate, std::vector<double> envSize );
37 Eigen::Vector2d getCellSize() {
return _cellSize; }
39 TwoDCell* getCell(
const Eigen::Vector2i& cell);
41 TwoDCell* getCell(Eigen::Vector2d pos);
43 TwoDCell* getCell(
unsigned int index);
58 Eigen::Vector2d _originCorner;
59 Eigen::Vector2d _cellSize;
61 unsigned int _nbCellsX;
62 unsigned int _nbCellsY;
67 #endif // TWODGRID_HPP
virtual TwoDCell * createNewCell(unsigned int index, unsigned int x, unsigned int y)
Virtual function that creates a new Cell.
Definition: TwoDGrid.cpp:261
bool isCellCoordInGrid(const Eigen::Vector2i &coord)
Is a Coord inside the Grid (used to debug)
Definition: TwoDGrid.cpp:230
TwoDCell * getNeighbour(const Eigen::Vector2i &pos, int i)
Get Neighboor Cell.
Definition: TwoDGrid.cpp:304
void createAllCells()
Creates All Cells.
Definition: TwoDGrid.cpp:115
Eigen::Vector2i getCellCoord(TwoDCell *ptrCell)
Get place in grid.
Definition: TwoDGrid.cpp:240
Eigen::Vector2d computeCellCorner(int x, int y)
Computes the corner of a cell.
Definition: TwoDGrid.cpp:278
Definition: TwoDCell.hpp:19
Definition: BaseGrid.hpp:15
~TwoDGrid()
Destructor.
Definition: TwoDGrid.cpp:32
Definition: TwoDGrid.hpp:25
EIGEN_MAKE_ALIGNED_OPERATOR_NEW TwoDGrid()
Constructor.
Definition: TwoDGrid.cpp:24
int getNumberOfCells()
Get Number Of Cells.
Definition: TwoDGrid.cpp:295
Eigen::Vector2d getCoordinates(TwoDCell *cell)
Retrive the X Y Z coordinate of the cell from its index.
Definition: TwoDGrid.cpp:336