GEL  2
GEL is a library for Geometry and Linear Algebra
Public Types | Public Member Functions
Geometry::HGrid< T, CellT > Class Template Reference

Hierarchical voxel grid. More...

#include <HGrid.h>

Inherits Geometry::AncestorGrid< T, HGrid< T, CellT > >.

List of all members.

Public Types

typedef T DataType
typedef CellT CellType

Public Member Functions

const CGLA::Vec3iget_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 ()

Detailed Description

template<class T, class CellT = DefaultCell<T,8>>
class Geometry::HGrid< T, CellT >

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.


Member Function Documentation

template<class T, class CellT = DefaultCell<T,8>>
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 > >.

template<class T, class CellT = DefaultCell<T,8>>
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 > >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations