Public Member Functions | Static Public Member Functions

PolyVox::Material< MaterialType > Class Template Reference

This class represents a voxel storing only a material. More...

#include <Material.h>

Collaboration diagram for PolyVox::Material< MaterialType >:

List of all members.

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 ()

Detailed Description

template<typename MaterialType>
class PolyVox::Material< MaterialType >

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.

See also:
Density, MaterialDensityPair

Definition at line 47 of file Material.h.


Constructor & Destructor Documentation

template<typename MaterialType >
PolyVox::Material< MaterialType >::Material (  )  [inline]

Definition at line 50 of file Material.h.

template<typename MaterialType >
PolyVox::Material< MaterialType >::Material ( MaterialType  uMaterial  )  [inline]

Definition at line 51 of file Material.h.


Member Function Documentation

template<typename MaterialType >
uint32_t PolyVox::Material< MaterialType >::getDensity (  )  const throw () [inline]

Definition at line 63 of file Material.h.

Here is the call graph for this function:

template<typename MaterialType >
MaterialType PolyVox::Material< MaterialType >::getMaterial (  )  const throw () [inline]

Definition at line 76 of file Material.h.

template<typename MaterialType >
static uint32_t PolyVox::Material< MaterialType >::getMaxDensity (  )  throw () [inline, static]

Definition at line 81 of file Material.h.

Referenced by PolyVox::Material< MaterialType >::getDensity().

template<typename MaterialType >
static uint32_t PolyVox::Material< MaterialType >::getMinDensity (  )  throw () [inline, static]

Definition at line 82 of file Material.h.

Referenced by PolyVox::Material< MaterialType >::getDensity().

template<typename MaterialType >
static uint32_t PolyVox::Material< MaterialType >::getThreshold (  )  throw () [inline, static]

Definition at line 83 of file Material.h.

template<typename MaterialType >
bool PolyVox::Material< MaterialType >::operator!= ( const Material< MaterialType > &  rhs  )  const throw () [inline]

Definition at line 58 of file Material.h.

template<typename MaterialType >
bool PolyVox::Material< MaterialType >::operator== ( const Material< MaterialType > &  rhs  )  const throw () [inline]

Definition at line 53 of file Material.h.

template<typename MaterialType >
void PolyVox::Material< MaterialType >::setDensity ( uint32_t   )  [inline]

Definition at line 78 of file Material.h.

template<typename MaterialType >
void PolyVox::Material< MaterialType >::setMaterial ( MaterialType  uMaterial  )  [inline]

Definition at line 79 of file Material.h.


The documentation for this class was generated from the following file: