|
|
| UniformSpatialGrid () |
| | Construct a default grid ([0, 1]^3) with cell size of 1.
|
| |
| | UniformSpatialGrid (const Vec3d &lowerCorner, const Vec3d &upperCorner, double cellSize) |
| | Construct a grid with given corners and cell size. More...
|
| |
| void | initialize (const Vec3d &lowerCorner, const Vec3d &upperCorner, const double cellSize) |
| | Initialize the grid data. More...
|
| |
|
std::array< unsigned int, 3 > | getResolution () const |
| | Get number of grid cell in 3 dimensions: (num_cell_x, num_cell_y, num_cell_z)
|
| |
|
unsigned int | getNumTotalCells () const |
| | Get number of total cells in the grid.
|
| |
|
template<int d> |
| bool | isValidCellIndex (const int idx) const |
| | Check if cell index in dimension d is valid (d = 0/1/2 => x/y/z dimension)
|
| |
|
bool | isValidCellIndices (const int i, const int j, const int k) const |
| | Check if 3D cell indices are valid.
|
| |
|
template<class IndexType > |
| std::array< IndexType, 3 > | getCell3DIndices (const Vec3d &ppos) const |
| | Get the 3D index (cell_x, cell_y, cell_z) of the cell containing the given positions.
|
| |
|
std::vector< CellData > & | getAllCellData () |
| | Get all cell data.
|
| |
|
const std::vector< CellData > & | getAllCellData () const |
| | Get all cell data.
|
| |
| CellData & | getCellData (const Vec3d &ppos) |
| | Get data in a cell. More...
|
| |
| const CellData & | getCellData (const Vec3d &ppos) const |
| | Get data in a cell. More...
|
| |
| CellData & | getCellData (size_t linearizedIdx) |
| | Get data in a cell. More...
|
| |
| const CellData & | getCellData (size_t linearizedIdx) const |
| | Get data in a cell. More...
|
| |
| template<class IndexType > |
| CellData & | getCellData (const std::array< IndexType, 3 > &cellIdx) |
| | Get data in a cell. More...
|
| |
| template<class IndexType > |
| const CellData & | getCellData (const std::array< IndexType, 3 > &cellIdx) const |
| | Get data in a cell. More...
|
| |
| template<class IndexType > |
| CellData & | getCellData (const IndexType i, const IndexType j, const IndexType k) |
| | Get data in a cell. More...
|
| |
| template<class IndexType > |
| const CellData & | getCellData (const IndexType i, const IndexType j, const IndexType k) const |
| | Get data in a cell. More...
|
| |
|
template<class Function > |
| void | loopAllCellData (Function &&func) |
| | Apply a function to all cell data.
|
| |
| template<class IndexType > |
| IndexType | getCellLinearizedIndex (const IndexType i, const IndexType j, const IndexType k) const |
| | Get linearized index from cell 3D indices: index in 3D (cell_x, cell_y, cell_z) => index in 1D. More...
|
| |
| template<class IndexType > |
| IndexType | getCellLinearizedIndex (const Vec3d &ppos) const |
| | Get linearized index of cell containing the given position. More...
|
| |
template<class CellData>
class imstk::UniformSpatialGrid< CellData >
Class for handling data in 3D grid.
- Parameters
-
| Real | The floating point type for computation (must be float or double |
| CellData | The data type that each cell will hold an instance of it |
Definition at line 22 of file imstkUniformSpatialGrid.h.