Modified SurfaceExtractor to use template template parameters.
This commit is contained in:
@ -91,4 +91,4 @@ int main(int argc, char *argv[])
|
||||
|
||||
//Run the message pump.
|
||||
return app.exec();
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ void OpenGLWidget::setVolume(PolyVox::LargeVolume<MaterialDensityPair44>* volDat
|
||||
//extractSurface(m_volData, 0, PolyVox::Region(regLowerCorner, regUpperCorner), meshCurrent);
|
||||
|
||||
polyvox_shared_ptr< SurfaceMesh<PositionMaterialNormal> > mesh(new SurfaceMesh<PositionMaterialNormal>);
|
||||
SurfaceExtractor<MaterialDensityPair44> surfaceExtractor(volData, PolyVox::Region(regLowerCorner, regUpperCorner), mesh.get());
|
||||
SurfaceExtractor<LargeVolume, MaterialDensityPair44> surfaceExtractor(volData, PolyVox::Region(regLowerCorner, regUpperCorner), mesh.get());
|
||||
surfaceExtractor.execute();
|
||||
|
||||
polyvox_shared_ptr< SurfaceMesh<PositionMaterialNormal> > decimatedMesh(new SurfaceMesh<PositionMaterialNormal>);
|
||||
|
@ -101,8 +101,8 @@ int main(int argc, char *argv[])
|
||||
createCubeInVolume(volData, Vector3DInt32(midPos-10, midPos-10 ,1), Vector3DInt32(midPos+10, midPos+10, maxPos-1), MaterialDensityPair44::getMaxDensity());
|
||||
|
||||
//Smooth part of the volume
|
||||
smoothRegion<MaterialDensityPair44>(volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(127, 127, 127)));
|
||||
smoothRegion<MaterialDensityPair44>(volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(127, 127, 127)));
|
||||
smoothRegion<LargeVolume, MaterialDensityPair44>(volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(127, 127, 127)));
|
||||
smoothRegion<LargeVolume, MaterialDensityPair44>(volData, PolyVox::Region(Vector3DInt32(62, 62, 62), Vector3DInt32(127, 127, 127)));
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
|
@ -287,7 +287,7 @@ int main(int argc, char *argv[])
|
||||
//Extract the surface
|
||||
SurfaceMesh<PositionMaterialNormal> mesh;
|
||||
//CubicSurfaceExtractorWithNormals<MaterialDensityPair44> surfaceExtractor(&volData, volData.getEnclosingRegion(), &mesh);
|
||||
SurfaceExtractor<MaterialDensityPair44> surfaceExtractor(&volData, reg, &mesh);
|
||||
SurfaceExtractor<LargeVolume, MaterialDensityPair44> surfaceExtractor(&volData, reg, &mesh);
|
||||
//CubicSurfaceExtractorWithNormals<MaterialDensityPair44> surfaceExtractor(&volData, reg, &mesh);
|
||||
surfaceExtractor.execute();
|
||||
std::cout << "#vertices: " << mesh.getNoOfVertices() << std::endl;
|
||||
|
Reference in New Issue
Block a user