Removed remaining use of VoxelTypeTraits.

This commit is contained in:
David Williams
2012-07-08 08:44:54 +02:00
parent 34b134ab0a
commit 1d361c583b
6 changed files with 3 additions and 163 deletions

View File

@ -34,48 +34,7 @@ freely, subject to the following restrictions:
using namespace PolyVox;
void TestVoxels::testVoxelTypeLimits()
{
// It's worth testing these as they are not all explictily defined (e.g. Density8 is just a
// typedef of DensityI8), and in the future we might define then with bitwise magic or something.
/*QCOMPARE(VoxelTypeTraits<Density8>::minDensity(), Density8::DensityType(0));
QCOMPARE(VoxelTypeTraits<Density8>::maxDensity(), Density8::DensityType(255));
QCOMPARE(VoxelTypeTraits<DensityI8>::minDensity(), DensityI8::DensityType(-127));
QCOMPARE(VoxelTypeTraits<DensityI8>::maxDensity(), DensityI8::DensityType(127));
QCOMPARE(VoxelTypeTraits<DensityU8>::minDensity(), DensityU8::DensityType(0));
QCOMPARE(VoxelTypeTraits<DensityU8>::maxDensity(), DensityU8::DensityType(255));
QCOMPARE(VoxelTypeTraits<Density16>::minDensity(), Density16::DensityType(0));
QCOMPARE(VoxelTypeTraits<Density16>::maxDensity(), Density16::DensityType(65535));
QCOMPARE(VoxelTypeTraits<DensityI16>::minDensity(), DensityI16::DensityType(-32767));
QCOMPARE(VoxelTypeTraits<DensityI16>::maxDensity(), DensityI16::DensityType(32767));
QCOMPARE(VoxelTypeTraits<DensityU16>::minDensity(), DensityU16::DensityType(0));
QCOMPARE(VoxelTypeTraits<DensityU16>::maxDensity(), DensityU16::DensityType(65535));
QCOMPARE(VoxelTypeTraits<DensityFloat>::minDensity(), -FLT_MAX);
QCOMPARE(VoxelTypeTraits<DensityFloat>::maxDensity(), FLT_MAX);
QCOMPARE(VoxelTypeTraits<DensityDouble>::minDensity(), -DBL_MAX);
QCOMPARE(VoxelTypeTraits<DensityDouble>::maxDensity(), DBL_MAX);*/
/*fValue = VoxelTypeTraits<DensityFloat>::minDensity();
QCOMPARE(fValue, -FLT_MAX);
fValue = VoxelTypeTraits<DensityFloat>::maxDensity();
QCOMPARE(fValue, FLT_MAX);*/
/*iValue = VoxelTypeTraits<Material8>::minDensity();
QCOMPARE(iValue, 0);
iValue = VoxelTypeTraits<Material8>::maxDensity();
QCOMPARE(iValue, 0);*/
/*iValue = VoxelTypeTraits<MaterialDensityPair44>::minDensity();
QCOMPARE(iValue, 0);
iValue = VoxelTypeTraits<MaterialDensityPair44>::maxDensity();
QCOMPARE(iValue, 15);*/
{
}
QTEST_MAIN(TestVoxels)