Modified SurfaceExtractor to use template template parameters.

This commit is contained in:
David Williams
2011-04-30 23:51:04 +01:00
parent 36a9be83db
commit 3a171e698b
15 changed files with 174 additions and 168 deletions

View File

@ -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>);

View File

@ -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);