GEL
2
GEL is a library for Geometry and Linear Algebra
|
Hierarchical voxel grid. More...
#include <HGrid.h>
Inherits Geometry::AncestorGrid< T, HGrid< T, CellT > >.
Public Types | |
typedef T | DataType |
typedef CellT | CellType |
Public Member Functions | |
const CGLA::Vec3i & | get_top_dims () const |
int | get_bottom_dim () const |
HGrid (const CGLA::Vec3i &dims, const T &val=T()) | |
Construct grid of specified dimensions. | |
void | store (const CGLA::Vec3i &p, const T &vox) |
const T & | operator[] (const CGLA::Vec3i &p) const |
CellT & | get_cell (const CGLA::Vec3i &p) |
const CellT & | get_cell (const CGLA::Vec3i &p) const |
CellT & | get_cell (int i) |
const CellT & | get_cell (int i) const |
void | clear () |
Hierarchical voxel grid.
In many cases we wish to save on the storage requirements of volumes. A hierarchical voxel grid is a volume representation where the volume is divided into box shaped regions, and each region is represented only if it contains voxels. This class template is for such a grid.
const T& Geometry::HGrid< T, CellT >::operator[] | ( | const CGLA::Vec3i & | p | ) | const [inline] |
Read only access to a voxel in the grid.
Reimplemented from Geometry::AncestorGrid< T, HGrid< T, CellT > >.
void Geometry::HGrid< T, CellT >::store | ( | const CGLA::Vec3i & | p, |
const T & | vox | ||
) | [inline] |
Store a voxel vox at position p in grid. The Cell will automatically subdivide if it is not already subdivided.
Reimplemented from Geometry::AncestorGrid< T, HGrid< T, CellT > >.