Renamed extractXxxSurface() to extractXxxMesh()

This commit is contained in:
David Williams
2014-05-22 23:26:40 +02:00
parent f8ce3a5f3d
commit ab741583e4
8 changed files with 19 additions and 19 deletions

View File

@ -77,12 +77,12 @@ 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. Uncomment the line for the kind of surface extraction you want to see.
auto mesh = extractCubicSurface(&volData, volData.getEnclosingRegion());
//auto mesh = extractMarchingCubesSurface(&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 = extractCubicMesh(&volData, volData.getEnclosingRegion());
//auto mesh = extractMarchingCubesMesh(&volData, volData.getEnclosingRegion());
//auto mesh = extractCubicSurface(&volData, PolyVox::Region(Vector3DInt32(0, 0, 0), Vector3DInt32(31, 31, 31)));
//auto mesh2 = extractCubicSurface(&volData, PolyVox::Region(Vector3DInt32(32, 32, 32), Vector3DInt32(63, 63, 63)));
//auto mesh = extractCubicMesh(&volData, PolyVox::Region(Vector3DInt32(0, 0, 0), Vector3DInt32(31, 31, 31)));
//auto mesh2 = extractCubicMesh(&volData, PolyVox::Region(Vector3DInt32(32, 32, 32), Vector3DInt32(63, 63, 63)));
//Pass the surface to the OpenGL window
openGLWidget.setSurfaceMeshToRender(mesh);

View File

@ -186,7 +186,7 @@ int main(int argc, char *argv[])
std::cout << "Compression ratio: 1 to " << (1.0/(volData.calculateCompressionRatio())) << std::endl;
//Extract the surface
auto mesh = extractCubicSurface(&volData, reg);
auto mesh = extractCubicMesh(&volData, reg);
std::cout << "#vertices: " << mesh.getNoOfVertices() << std::endl;
//Pass the surface to the OpenGL window

View File

@ -90,11 +90,11 @@ int main(int argc, char *argv[])
volumeResampler.execute();
//Extract the surface
auto meshLowLOD = extractMarchingCubesSurface(&volDataLowLOD, volDataLowLOD.getEnclosingRegion());
auto meshLowLOD = extractMarchingCubesMesh(&volDataLowLOD, volDataLowLOD.getEnclosingRegion());
meshLowLOD.scaleVertices(/*2.0f*/63.0f / 31.0f);
//Extract the surface
auto meshHighLOD = extractMarchingCubesSurface(&volData, PolyVox::Region(Vector3DInt32(30, 0, 0), Vector3DInt32(63, 63, 63)));
auto meshHighLOD = extractMarchingCubesMesh(&volData, PolyVox::Region(Vector3DInt32(30, 0, 0), Vector3DInt32(63, 63, 63)));
meshHighLOD.translateVertices(Vector3DFloat(30, 0, 0));
//Pass the surface to the OpenGL window