Rotation is now applied by moving the camera rather than the meshes.

This commit is contained in:
David Williams
2014-05-22 16:51:41 +02:00
parent 7d55e00f76
commit 16cbb94d90
2 changed files with 19 additions and 16 deletions

View File

@ -78,15 +78,15 @@ int main(int argc, char *argv[])
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 = extractCubicSurface(&volData, volData.getEnclosingRegion());
//auto mesh = extractMarchingCubesSurface(&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 = 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)));
//Pass the surface to the OpenGL window
openGLWidget.setSurfaceMeshToRender(mesh);
openGLWidget.setSurfaceMeshToRender(mesh2);
//openGLWidget.setSurfaceMeshToRender(mesh2);
//Run the message pump.
return app.exec();