Add a EXTRACTORS macro to automate the generation of the extractors

Like with VOLUMETYPES it is centralising the definitions of the volume and
voxel types.
This commit is contained in:
Matt Williams
2012-11-24 15:37:46 +00:00
parent e7daab5bbc
commit bb3d3c4b68
3 changed files with 18 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class TestSurfaceExtractor(unittest.TestCase):
#Set one single voxel to have a reasonably high density
vol.setVoxelAt(PolyVoxCore.Vector3DInt32(5, 5, 5), PolyVoxCore.Density8(200))
self.mesh = PolyVoxCore.SurfaceMeshPositionMaterialNormal()
extractor = PolyVoxCore.SurfaceExtractorSimpleVolumeDensity8(vol, r, self.mesh)
extractor = PolyVoxCore.MarchingCubesSurfaceExtractorSimpleVolumeDensity8(vol, r, self.mesh)
extractor.execute()
def test_num_vertices(self):