Added surface extractor tests templatised on voxel type.

This commit is contained in:
unknown
2012-02-19 11:24:46 +01:00
parent 06cee9406a
commit 26ea1d8ad3
5 changed files with 185 additions and 13 deletions

View File

@ -32,19 +32,6 @@ freely, subject to the following restrictions:
namespace PolyVox
{
template<>
class VoxelTypeTraits< uint8_t >
{
public:
typedef uint8_t DensityType;
static const bool HasDensity = true;
static const bool HasMaterial = false;
static bool hasDensity() { return true; }
static bool hasMaterial() { return false; }
static uint8_t minDensity() { return 0; }
static uint8_t maxDensity() { return 255; }
};
template< template<typename> class VolumeType, typename VoxelType>
class SurfaceExtractor
{

View File

@ -88,6 +88,19 @@ namespace PolyVox
{
return voxel;
}
template<>
class VoxelTypeTraits< uint8_t >
{
public:
typedef uint8_t DensityType;
static const bool HasDensity = true;
static const bool HasMaterial = false;
static bool hasDensity() { return true; }
static bool hasMaterial() { return false; }
static uint8_t minDensity() { return 0; }
static uint8_t maxDensity() { return 255; }
};
}
#endif //__PolyVox_Voxel_H__