diff --git a/examples/Basic/main.cpp b/examples/Basic/main.cpp index 65814645..a7460ce1 100644 --- a/examples/Basic/main.cpp +++ b/examples/Basic/main.cpp @@ -87,8 +87,8 @@ int main(int argc, char *argv[]) //Execute the surface extractor. //surfaceExtractor.execute(); - DefaultIsQuadNeeded< uint8_t > isQuadNeeded; - mesh = extractCubicSurfaceWithNormals< SimpleVolume, DefaultIsQuadNeeded< uint8_t > >(&volData, volData.getEnclosingRegion(), WrapModes::Border, 0, isQuadNeeded); + //DefaultIsQuadNeeded< uint8_t > isQuadNeeded; + mesh = extractCubicSurfaceWithNormals< SimpleVolume >(&volData, volData.getEnclosingRegion()); //Pass the surface to the OpenGL window openGLWidget.setSurfaceMeshToRender(mesh); diff --git a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.h b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.h index 9fc44d7c..ae605cd2 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.h +++ b/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.h @@ -72,6 +72,13 @@ namespace PolyVox extractor.execute(); return result; } + + template + SurfaceMesh extractCubicSurfaceWithNormals(VolumeType* volData, Region region, WrapMode eWrapMode = WrapModes::Border, typename VolumeType::VoxelType tBorderValue = VolumeType::VoxelType()) + { + DefaultIsQuadNeeded isQuadNeeded; + return extractCubicSurfaceWithNormals >(volData, region, eWrapMode, tBorderValue, isQuadNeeded); + } } #include "PolyVoxCore/CubicSurfaceExtractorWithNormals.inl"