Refactoring of basic voxel types.

This commit is contained in:
unknown
2012-02-02 16:34:06 +01:00
parent a796672645
commit 1ab1d9bed3
12 changed files with 118 additions and 76 deletions

View File

@ -49,11 +49,11 @@ namespace PolyVox
const bool VoxelTypeTraits< DensityFloat >::HasDensity = true;
const bool VoxelTypeTraits< DensityFloat >::HasMaterial = false;
const DensityFloat::DensityType VoxelTypeTraits< DensityFloat >::MinDensity = FLT_MIN;
const DensityFloat::DensityType VoxelTypeTraits< DensityFloat >::MinDensity = -FLT_MAX;
const DensityFloat::DensityType VoxelTypeTraits< DensityFloat >::MaxDensity = FLT_MAX;
const bool VoxelTypeTraits< DensityDouble >::HasDensity = true;
const bool VoxelTypeTraits< DensityDouble >::HasMaterial = false;
const DensityDouble::DensityType VoxelTypeTraits< DensityDouble >::MinDensity = DBL_MIN;
const DensityDouble::DensityType VoxelTypeTraits< DensityDouble >::MinDensity = -DBL_MAX;
const DensityDouble::DensityType VoxelTypeTraits< DensityDouble >::MaxDensity = DBL_MAX;
}

View File

@ -29,10 +29,16 @@ namespace PolyVox
{
const bool VoxelTypeTraits< MaterialU8 >::HasDensity = false;
const bool VoxelTypeTraits< MaterialU8 >::HasMaterial = true;
const MaterialU8::DensityType VoxelTypeTraits< MaterialU8 >::MinDensity = 0;
const MaterialU8::DensityType VoxelTypeTraits< MaterialU8 >::MaxDensity = 0;
const bool VoxelTypeTraits< MaterialU16 >::HasDensity = false;
const bool VoxelTypeTraits< MaterialU16 >::HasMaterial = true;
const MaterialU16::DensityType VoxelTypeTraits< MaterialU16 >::MinDensity = 0;
const MaterialU16::DensityType VoxelTypeTraits< MaterialU16 >::MaxDensity = 0;
const bool VoxelTypeTraits< MaterialU32 >::HasDensity = false;
const bool VoxelTypeTraits< MaterialU32 >::HasMaterial = true;
const MaterialU32::DensityType VoxelTypeTraits< MaterialU32 >::MinDensity = 0;
const MaterialU32::DensityType VoxelTypeTraits< MaterialU32 >::MaxDensity = 0;
}

View File

@ -29,4 +29,9 @@ namespace PolyVox
const bool VoxelTypeTraits<Type>::HasDensity = false;
template<typename Type>
const bool VoxelTypeTraits<Type>::HasMaterial = false;
template<typename Type>
const typename Type::DensityType VoxelTypeTraits< Type >::MinDensity = 0;
template<typename Type>
const typename Type::DensityType VoxelTypeTraits< Type >::MaxDensity = 0;
}