Removed the use of clever SFINAE tricks to resolve ambiguous functions. It was proving complex with the cubic surface extractor, so we remove it from the marching cubes version as well.

For now, we just rename the ambiguous functions differently to avoid the ambiguity but could come back to this in the future.
This commit is contained in:
David Williams
2014-08-18 15:38:18 +02:00
parent ba6685289d
commit 3c82652f46
2 changed files with 5 additions and 9 deletions

View File

@ -152,7 +152,7 @@ void TestSurfaceExtractor::testExecute()
// use a default for the second-to-last parameter but noot use a default for the last parameter.
auto intVol = createAndFillVolume<int8_t>();
Mesh< MarchingCubesVertex< int8_t >, uint16_t > intMesh;
extractMarchingCubesMesh(intVol, intVol->getEnclosingRegion(), &intMesh);
extractMarchingCubesMeshCustom(intVol, intVol->getEnclosingRegion(), &intMesh);
QCOMPARE(intMesh.getNoOfVertices(), uint16_t(11718)); // Verifies size of mesh and that we have 16-bit indices
QCOMPARE(intMesh.getNoOfIndices(), uint32_t(34041)); // Verifies size of mesh
QCOMPARE(intMesh.getIndex(100), uint16_t(29)); // Verifies that we have 16-bit indices
@ -162,7 +162,7 @@ void TestSurfaceExtractor::testExecute()
auto doubleVol = createAndFillVolume<double>();
CustomMarchingCubesController doubleCustomController;
Mesh< MarchingCubesVertex< double >, uint16_t > doubleMesh;
extractMarchingCubesMesh(doubleVol, doubleVol->getEnclosingRegion(), &doubleMesh, doubleCustomController);
extractMarchingCubesMeshCustom(doubleVol, doubleVol->getEnclosingRegion(), &doubleMesh, doubleCustomController);
QCOMPARE(doubleMesh.getNoOfVertices(), uint16_t(16113)); // Verifies size of mesh and that we have 32-bit indices
QCOMPARE(doubleMesh.getNoOfIndices(), uint32_t(22053)); // Verifies size of mesh
QCOMPARE(doubleMesh.getIndex(100), uint16_t(26)); // Verifies that we have 32-bit indices