This class represents a voxel storing only a density. More...
#include <MaterialDensityPair.h>
Public Member Functions | |
MaterialDensityPair () | |
MaterialDensityPair (Type uMaterial, Type uDensity) | |
bool | operator== (const MaterialDensityPair &rhs) const throw () |
bool | operator!= (const MaterialDensityPair &rhs) const throw () |
Type | getDensity () const throw () |
Type | getMaterial () const throw () |
void | setDensity (Type uDensity) |
void | setMaterial (Type uMaterial) |
Static Public Member Functions | |
static Type | getMaxDensity () throw () |
static Type | getMinDensity () throw () |
static Type | getThreshold () throw () |
This class represents a voxel storing only a density.
In order to perform a surface extraction on a LargeVolume, PolyVox needs the underlying voxel type to provide both getDensity() and getMaterial() functions. The getDensity() function is used to determine if a voxel is 'solid', and if it is then the getMaterial() funtion is used to determine what material should be assigned to the resulting mesh.
This class meets these requirements, and does so by storing and returning both a material and a density value. Via the template parameters it is possible to control how much precision is given to each. For example, if you create a class with 8 bits of storage, you might choose to allocate 6 bits for the density and 2 bits for the material.
Definition at line 46 of file MaterialDensityPair.h.
PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::MaterialDensityPair | ( | ) | [inline] |
Definition at line 49 of file MaterialDensityPair.h.
PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::MaterialDensityPair | ( | Type | uMaterial, | |
Type | uDensity | |||
) | [inline] |
Definition at line 50 of file MaterialDensityPair.h.
Type PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::getDensity | ( | ) | const throw () [inline] |
Definition at line 62 of file MaterialDensityPair.h.
Type PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::getMaterial | ( | ) | const throw () [inline] |
Definition at line 63 of file MaterialDensityPair.h.
static Type PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::getMaxDensity | ( | ) | throw () [inline, static] |
Definition at line 68 of file MaterialDensityPair.h.
static Type PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::getMinDensity | ( | ) | throw () [inline, static] |
Definition at line 69 of file MaterialDensityPair.h.
static Type PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::getThreshold | ( | ) | throw () [inline, static] |
Definition at line 70 of file MaterialDensityPair.h.
bool PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::operator!= | ( | const MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits > & | rhs | ) | const throw () [inline] |
Definition at line 57 of file MaterialDensityPair.h.
bool PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::operator== | ( | const MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits > & | rhs | ) | const throw () [inline] |
Definition at line 52 of file MaterialDensityPair.h.
void PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::setDensity | ( | Type | uDensity | ) | [inline] |
Definition at line 65 of file MaterialDensityPair.h.
void PolyVox::MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits >::setMaterial | ( | Type | uMaterial | ) | [inline] |
Definition at line 66 of file MaterialDensityPair.h.