9 #include "API/Grids/ThreeDCell.hpp"
10 #include "API/Grids/BaseGrid.hpp"
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
31 ThreeDGrid( Eigen::Vector3i size, std::vector<double> envSize );
32 ThreeDGrid(
double samplingRate, std::vector<double> envSize );
39 Eigen::Vector3d getCellSize() {
return _cellSize; }
41 unsigned int getXNumberOfCells()
const {
return _nbCellsX;}
42 unsigned int getYNumberOfCells()
const {
return _nbCellsY;}
43 unsigned int getZNumberOfCells()
const {
return _nbCellsZ;}
54 unsigned int getXlineOfCell(
unsigned int ith);
55 unsigned int getYlineOfCell(
unsigned int ith);
56 unsigned int getZlineOfCell(
unsigned int ith);
65 Eigen::Vector3d
computeCellCorner(
unsigned int x,
unsigned int y,
unsigned int z);
67 Eigen::Vector3d _originCorner;
68 Eigen::Vector3d _cellSize;
70 unsigned int _nbCellsX;
71 unsigned int _nbCellsY;
72 unsigned int _nbCellsZ;
bool loadFromXmlFile(std::string file)
Reads the grid from an xml file.
Definition: ThreeDGrid.cpp:523
virtual ThreeDCell * createNewCell(unsigned int index, unsigned int x, unsigned int y, unsigned int z)
Virtual function that creates a new Cell.
Definition: ThreeDGrid.cpp:299
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ThreeDGrid()
Constructor.
Definition: ThreeDGrid.cpp:21
ThreeDCell * getNeighbour(const Eigen::Vector3i &pos, unsigned int i) const
Get Neighboor Cell.
Definition: ThreeDGrid.cpp:335
Eigen::Vector3d computeCellCorner(unsigned int x, unsigned int y, unsigned int z)
Computes the corner of a cell.
Definition: ThreeDGrid.cpp:317
Definition: ThreeDGrid.hpp:24
void createAllCells()
Creates All Cells.
Definition: ThreeDGrid.cpp:145
Definition: BaseGrid.hpp:15
Definition: ThreeDCell.hpp:25
bool writeToXmlFile(std::string file)
Writes the grid to en xml file.
Definition: ThreeDGrid.cpp:445
ThreeDCell * getCell(unsigned int x, unsigned int y, unsigned int z) const
Retruns the Cell at (x,y,z)
Definition: ThreeDGrid.cpp:188
Eigen::Vector3d getCoordinates(ThreeDCell *cell) const
Retrive the X Y Z coordinate of the cell from its index.
Definition: ThreeDGrid.cpp:372
Eigen::Vector3i getCellCoord(ThreeDCell *ptrCell) const
Get place in grid.
Definition: ThreeDGrid.cpp:272
virtual void draw()
Draw a openGl view of the grid.
Definition: ThreeDGrid.cpp:403
virtual ~ThreeDGrid()
Destructor.
Definition: ThreeDGrid.cpp:29