Merge branch 'develop' into feature/vertex-refactor

Conflicts:
	examples/Basic/main.cpp
	examples/Paging/main.cpp
	examples/SmoothLOD/main.cpp
	library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.h
	tests/TestCubicSurfaceExtractor.cpp
	tests/TestSurfaceExtractor.cpp
	tests/TestVolumeSubclass.cpp
This commit is contained in:
David Williams
2014-05-12 23:04:19 +02:00
8 changed files with 106 additions and 86 deletions

View File

@ -89,16 +89,12 @@ int main(int argc, char *argv[])
VolumeResampler< SimpleVolume<uint8_t>, RawVolume<uint8_t> > volumeResampler(&volData, PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(31, 63, 63)), &volDataLowLOD, volDataLowLOD.getEnclosingRegion());
volumeResampler.execute();
//Extract the surface
SurfaceMesh<MarchingCubesVertex<uint8_t> > meshLowLOD;
MarchingCubesSurfaceExtractor< RawVolume<uint8_t> > surfaceExtractor(&volDataLowLOD, volDataLowLOD.getEnclosingRegion(), &meshLowLOD);
surfaceExtractor.execute();
//Extract the surface
auto meshLowLOD = extractMarchingCubesSurface(&volDataLowLOD, volDataLowLOD.getEnclosingRegion());
meshLowLOD.scaleVertices(/*2.0f*/63.0f / 31.0f);
//Extract the surface
SurfaceMesh<MarchingCubesVertex<uint8_t> > meshHighLOD;
MarchingCubesSurfaceExtractor< SimpleVolume<uint8_t> > surfaceExtractorHigh(&volData, PolyVox::Region(Vector3DInt32(30,0,0), Vector3DInt32(63, 63, 63)), &meshHighLOD);
surfaceExtractorHigh.execute();
auto meshHighLOD = extractMarchingCubesSurface(&volData, PolyVox::Region(Vector3DInt32(30, 0, 0), Vector3DInt32(63, 63, 63)));
meshHighLOD.translateVertices(Vector3DFloat(30, 0, 0));
//Pass the surface to the OpenGL window