Merge branch 'develop' of https://bitbucket.org/volumesoffun/polyvox into feature/extractor-refactor

Conflicts:
	examples/Basic/main.cpp
This commit is contained in:
David Williams
2014-05-11 16:21:37 +02:00
5 changed files with 145 additions and 93 deletions

View File

@ -23,7 +23,7 @@ freely, subject to the following restrictions:
#include "OpenGLWidget.h"
#include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h"
#include "PolyVoxCore/CubicSurfaceExtractor.h"
#include "PolyVoxCore/MarchingCubesSurfaceExtractor.h"
#include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxCore/SimpleVolume.h"
@ -76,10 +76,10 @@ int main(int argc, char *argv[])
//Create an empty volume and then place a sphere in it
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. 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());
auto mesh = extractCubicSurface(&volData, volData.getEnclosingRegion());
//auto mesh = extractMarchingCubesSurface(&volData, volData.getEnclosingRegion());
//Pass the surface to the OpenGL window
openGLWidget.setSurfaceMeshToRender(mesh);