Moved OpenGLWidget into common folder so it can be used by other examples.
This commit is contained in:
parent
4f7e1e6846
commit
d34fd6b3c8
@ -26,7 +26,7 @@ PROJECT(BasicExample)
|
|||||||
#Projects source files
|
#Projects source files
|
||||||
SET(SRC_FILES
|
SET(SRC_FILES
|
||||||
main.cpp
|
main.cpp
|
||||||
OpenGLWidget.cpp
|
../common/OpenGLWidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
#Projects headers files
|
#Projects headers files
|
||||||
|
@ -78,15 +78,15 @@ int main(int argc, char *argv[])
|
|||||||
createSphereInVolume(volData, 30);
|
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.
|
// 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 = extractCubicMesh(&volData, volData.getEnclosingRegion());
|
||||||
//auto mesh = extractMarchingCubesMesh(&volData, volData.getEnclosingRegion());
|
//auto mesh = extractMarchingCubesMesh(&volData, volData.getEnclosingRegion());
|
||||||
|
|
||||||
auto mesh = extractCubicMesh(&volData, PolyVox::Region(Vector3DInt32(0, 0, 0), Vector3DInt32(31, 31, 31)));
|
//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)));
|
//auto mesh2 = extractCubicMesh(&volData, PolyVox::Region(Vector3DInt32(32, 32, 32), Vector3DInt32(63, 63, 63)));
|
||||||
|
|
||||||
//Pass the surface to the OpenGL window
|
//Pass the surface to the OpenGL window
|
||||||
openGLWidget.addMesh(mesh);
|
openGLWidget.addMesh(mesh);
|
||||||
openGLWidget.addMesh(mesh2);
|
//openGLWidget.addMesh(mesh2);
|
||||||
openGLWidget.setViewableRegion(volData.getEnclosingRegion());
|
openGLWidget.setViewableRegion(volData.getEnclosingRegion());
|
||||||
|
|
||||||
//Run the message pump.
|
//Run the message pump.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user