Work on refactoring voxel types.
This commit is contained in:
@ -27,10 +27,10 @@ freely, subject to the following restrictions:
|
||||
#include "PolyVoxCore/Material.h"
|
||||
#include "PolyVoxCore/MaterialDensityPair.h"
|
||||
|
||||
#include "PolyVoxCore/Vector.h"
|
||||
|
||||
#include <QtTest>
|
||||
|
||||
#include <cfloat>
|
||||
|
||||
using namespace PolyVox;
|
||||
|
||||
void TestVoxels::testTraits()
|
||||
@ -38,20 +38,18 @@ void TestVoxels::testTraits()
|
||||
int iValue; float fValue; //Used for temporary storage as the QCOMPARE maro struggles with the complex types.
|
||||
|
||||
|
||||
iValue = VoxelTypeTraits<Density8>::MinDensity;
|
||||
QCOMPARE(iValue, 0);
|
||||
iValue = VoxelTypeTraits<Density8>::MaxDensity;
|
||||
QCOMPARE(iValue, 255);
|
||||
QCOMPARE(VoxelTypeTraits<Density8>::MaxDensity, static_cast<uint8_t>(0));
|
||||
QCOMPARE(VoxelTypeTraits<Density8>::MaxDensity, static_cast<uint8_t>(255));
|
||||
|
||||
fValue = VoxelTypeTraits<DensityFloat>::MinDensity;
|
||||
QCOMPARE(fValue, -1000000.0f);
|
||||
QCOMPARE(fValue, FLT_MIN);
|
||||
fValue = VoxelTypeTraits<DensityFloat>::MaxDensity;
|
||||
QCOMPARE(fValue, 1000000.0f);
|
||||
QCOMPARE(fValue, FLT_MAX);
|
||||
|
||||
iValue = VoxelTypeTraits<Material8>::MinDensity;
|
||||
/*iValue = VoxelTypeTraits<Material8>::MinDensity;
|
||||
QCOMPARE(iValue, 0);
|
||||
iValue = VoxelTypeTraits<Material8>::MaxDensity;
|
||||
QCOMPARE(iValue, 0);
|
||||
QCOMPARE(iValue, 0);*/
|
||||
|
||||
iValue = VoxelTypeTraits<MaterialDensityPair44>::MinDensity;
|
||||
QCOMPARE(iValue, 0);
|
||||
|
Reference in New Issue
Block a user