NetDEM v1.0
|
A class responsible for managing cells in a simulation grid. More...
#include <cell_manager.hpp>
Public Member Functions | |
CellManager () | |
Default constructor for the CellManager class. | |
std::tuple< Vec3d, Vec3d > | GetBound () const |
Get the bounds of the simulation. | |
Vec3d const & | GetSpacing () const |
Get the spacing of the cells. | |
Vec3i const & | GetCellSizes () const |
Get the sizes of the cells in each dimension. | |
VecXT< VecXT< VecXT< Cell > > > const & | GetCellList () |
Get the bounds of the simulation. | |
Cell *const | GetCell (int i, int j, int k) |
void | Init () |
Initialize the simulation grid by populating it with cells. | |
void | SetBound (double bmin_x, double bmin_y, double bmin_z, double bmax_x, double bmax_y, double bmax_z) |
Set the bounds of the simulation. | |
void | SetSpacing (double s_x, double s_y, double s_z) |
Set the spacing between adjacent cells in the simulation grid. | |
std::tuple< Vec3i, Vec3i > | GetOverlappedCells (Vec3d const &bmin, Vec3d const &bmax) |
Determine which cells overlap with a given bounding box. | |
Vec3i | GetOverlappedCell (Vec3d const &pos) |
Determine which cell a given point is in. | |
STLModel | GetSTLModel () |
Generate an STL model for visualization purposes. | |
A class responsible for managing cells in a simulation grid.
This class is responsible for creating and maintaining the cells in the simulation grid. It also provides functionality to determine which cells overlap with a given bounding box, and to generate an STL model for visualization purposes.
CellManager::CellManager | ( | ) |
Default constructor for the CellManager class.
Cell *const CellManager::GetCell | ( | int | i, |
int | j, | ||
int | k ) |
Get the bounds of the simulation.
Vec3i const & CellManager::GetCellSizes | ( | ) | const |
Get the sizes of the cells in each dimension.
Determine which cell a given point is in.
pos | The position of the point. |
Determine which cells overlap with a given bounding box.
bmin | The minimum coordinates of the bounding box. |
bmax | The maximum coordinates of the bounding box. |
Vec3d const & CellManager::GetSpacing | ( | ) | const |
Get the spacing of the cells.
STLModel CellManager::GetSTLModel | ( | ) |
Generate an STL model for visualization purposes.
void CellManager::Init | ( | ) |
Initialize the simulation grid by populating it with cells.
void CellManager::SetBound | ( | double | bmin_x, |
double | bmin_y, | ||
double | bmin_z, | ||
double | bmax_x, | ||
double | bmax_y, | ||
double | bmax_z ) |
Set the bounds of the simulation.
bmin_x | The minimum x-coordinate of the simulation bounds. |
bmin_y | The minimum y-coordinate of the simulation bounds. |
bmin_z | The minimum z-coordinate of the simulation bounds. |
bmax_x | The maximum x-coordinate of the simulation bounds. |
bmax_y | The maximum y-coordinate of the simulation bounds. |
bmax_z | The maximum z-coordinate of the simulation bounds. |
void CellManager::SetSpacing | ( | double | s_x, |
double | s_y, | ||
double | s_z ) |
Set the spacing between adjacent cells in the simulation grid.
s_x | The spacing along the x-axis. |
s_y | The spacing along the y-axis. |
s_z | The spacing along the z-axis. |