Wrapped MarchingCubesSurfaceExtractor with functions (part of unclassing).

This commit is contained in:
David Williams
2014-03-05 16:30:54 +01:00
parent 529e97f71e
commit acbfb184b8
2 changed files with 19 additions and 2 deletions

View File

@ -77,8 +77,9 @@ int main(int argc, char *argv[])
SimpleVolume<uint8_t> volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63)));
createSphereInVolume(volData, 30);
// Extract the surface for the specified region of the volume.
auto mesh = extractCubicSurfaceWithNormals(&volData, volData.getEnclosingRegion());
// Extract the surface for the specified region of the volume. Uncomment the line for the kind of surface extraction you want to see.
//auto mesh = extractCubicSurfaceWithNormals(&volData, volData.getEnclosingRegion());
auto mesh = extractMarchingCubesSurface(&volData, volData.getEnclosingRegion());
//Pass the surface to the OpenGL window
openGLWidget.setSurfaceMeshToRender(mesh);