From 529e97f71edf21ecd90abb6445b4734de62be034 Mon Sep 17 00:00:00 2001 From: David Williams Date: Wed, 5 Mar 2014 15:58:33 +0100 Subject: [PATCH] Added use of auto for determining mesh type. --- examples/Basic/main.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/examples/Basic/main.cpp b/examples/Basic/main.cpp index a7460ce1..2e17d32a 100644 --- a/examples/Basic/main.cpp +++ b/examples/Basic/main.cpp @@ -77,18 +77,8 @@ int main(int argc, char *argv[]) SimpleVolume volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63))); createSphereInVolume(volData, 30); - //A mesh object to hold the result of surface extraction - SurfaceMesh mesh; - - //Create a surface extractor. Comment out one of the following two lines to decide which type gets created. - //CubicSurfaceExtractorWithNormals< SimpleVolume > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); - //MarchingCubesSurfaceExtractor< SimpleVolume > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); - - //Execute the surface extractor. - //surfaceExtractor.execute(); - - //DefaultIsQuadNeeded< uint8_t > isQuadNeeded; - mesh = extractCubicSurfaceWithNormals< SimpleVolume >(&volData, volData.getEnclosingRegion()); + // Extract the surface for the specified region of the volume. + auto mesh = extractCubicSurfaceWithNormals(&volData, volData.getEnclosingRegion()); //Pass the surface to the OpenGL window openGLWidget.setSurfaceMeshToRender(mesh);