This class represents a voxel storing only a material. More...
#include <Material.h>
Public Member Functions | |
Material () | |
Material (MaterialType uMaterial) | |
bool | operator== (const Material &rhs) const throw () |
bool | operator!= (const Material &rhs) const throw () |
uint32_t | getDensity () const throw () |
MaterialType | getMaterial () const throw () |
void | setDensity (uint32_t) |
void | setMaterial (MaterialType uMaterial) |
Static Public Member Functions | |
static uint32_t | getMaxDensity () throw () |
static uint32_t | getMinDensity () throw () |
static uint32_t | getThreshold () throw () |
This class represents a voxel storing only a material.
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, although it only actually stores a material value. For the getDensity() function it simply returns the smallest possible density if the material is zero and the largest possible density if the material is not zero.
Definition at line 47 of file Material.h.
PolyVox::Material< MaterialType >::Material | ( | ) | [inline] |
Definition at line 50 of file Material.h.
PolyVox::Material< MaterialType >::Material | ( | MaterialType | uMaterial | ) | [inline] |
Definition at line 51 of file Material.h.
uint32_t PolyVox::Material< MaterialType >::getDensity | ( | ) | const throw () [inline] |
MaterialType PolyVox::Material< MaterialType >::getMaterial | ( | ) | const throw () [inline] |
Definition at line 76 of file Material.h.
static uint32_t PolyVox::Material< MaterialType >::getMaxDensity | ( | ) | throw () [inline, static] |
Definition at line 81 of file Material.h.
Referenced by PolyVox::Material< MaterialType >::getDensity().
static uint32_t PolyVox::Material< MaterialType >::getMinDensity | ( | ) | throw () [inline, static] |
Definition at line 82 of file Material.h.
Referenced by PolyVox::Material< MaterialType >::getDensity().
static uint32_t PolyVox::Material< MaterialType >::getThreshold | ( | ) | throw () [inline, static] |
Definition at line 83 of file Material.h.
bool PolyVox::Material< MaterialType >::operator!= | ( | const Material< MaterialType > & | rhs | ) | const throw () [inline] |
Definition at line 58 of file Material.h.
bool PolyVox::Material< MaterialType >::operator== | ( | const Material< MaterialType > & | rhs | ) | const throw () [inline] |
Definition at line 53 of file Material.h.
void PolyVox::Material< MaterialType >::setDensity | ( | uint32_t | ) | [inline] |
Definition at line 78 of file Material.h.
void PolyVox::Material< MaterialType >::setMaterial | ( | MaterialType | uMaterial | ) | [inline] |
Definition at line 79 of file Material.h.