diff --git a/examples/Basic/main.cpp b/examples/Basic/main.cpp index b3ba51b7..64097731 100644 --- a/examples/Basic/main.cpp +++ b/examples/Basic/main.cpp @@ -26,17 +26,14 @@ freely, subject to the following restrictions: #include "PolyVoxCore/CubicSurfaceExtractorWithNormals.h" #include "PolyVoxCore/MarchingCubesSurfaceExtractor.h" #include "PolyVoxCore/SurfaceMesh.h" -//#include "PolyVoxCore/SimpleVolume.h" -#include "PolyVoxCore/LargeVolume.h" -#include "PolyVoxCore/RLECompressor.h" -#include "PolyVoxCore/FilePager.h" +#include "PolyVoxCore/SimpleVolume.h" #include //Use the PolyVox namespace using namespace PolyVox; -void createSphereInVolume(LargeVolume& volData, float fRadius) +void createSphereInVolume(SimpleVolume& volData, float fRadius) { //This vector hold the position of the center of the volume Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2); @@ -71,32 +68,21 @@ void createSphereInVolume(LargeVolume& volData, float fRadius) int main(int argc, char *argv[]) { - setTraceStream(&(std::cout)); - setDebugStream(&(std::cout)); - setInfoStream(&(std::cout)); - //Create and show the Qt OpenGL window QApplication app(argc, argv); OpenGLWidget openGLWidget(0); openGLWidget.show(); //Create an empty volume and then place a sphere in it - RLECompressor* pCompressor = new RLECompressor(); - FilePager* pFilePager = new FilePager("D:/temp/voldata/"); - - LargeVolume volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(63, 63, 63)), pCompressor, pFilePager, 32); - volData.setMaxNumberOfUncompressedBlocks(2); - volData.setMaxNumberOfBlocksInMemory(4); - - + 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< LargeVolume > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); - //MarchingCubesSurfaceExtractor< LargeVolume > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); + CubicSurfaceExtractorWithNormals< SimpleVolume > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); + //MarchingCubesSurfaceExtractor< SimpleVolume > surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh); //Execute the surface extractor. surfaceExtractor.execute(); @@ -106,4 +92,4 @@ int main(int argc, char *argv[]) //Run the message pump. return app.exec(); -} +} \ No newline at end of file