From ebab89b9adac576b0d20fd8cbacf0154e7e74fe4 Mon Sep 17 00:00:00 2001 From: David Williams Date: Thu, 28 May 2015 23:42:50 +0200 Subject: [PATCH] Passing sampled voxel. --- include/PolyVox/MarchingCubesSurfaceExtractor.inl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/PolyVox/MarchingCubesSurfaceExtractor.inl b/include/PolyVox/MarchingCubesSurfaceExtractor.inl index 08564a35..9dc24088 100644 --- a/include/PolyVox/MarchingCubesSurfaceExtractor.inl +++ b/include/PolyVox/MarchingCubesSurfaceExtractor.inl @@ -49,9 +49,8 @@ namespace PolyVox } template< typename VolumeType, typename MeshType, typename ControllerType > - void generateMeshForCell(Region& region, MeshType* result, ControllerType& controller, typename VolumeType::Sampler& sampler, Array<2, Vector3DInt32>& pIndices, Array<2, Vector3DInt32>& pPreviousIndices, uint8_t iCubeIndex, uint32_t uXRegSpace, uint32_t uYRegSpace, uint32_t uZRegSpace, typename ControllerType::DensityType tThreshold) + void generateMeshForCell(Region& region, MeshType* result, ControllerType& controller, typename VolumeType::Sampler& sampler, Array<2, Vector3DInt32>& pIndices, Array<2, Vector3DInt32>& pPreviousIndices, uint8_t iCubeIndex, uint32_t uXRegSpace, uint32_t uYRegSpace, uint32_t uZRegSpace, typename ControllerType::DensityType tThreshold, typename VolumeType::VoxelType& v111) { - auto v111 = sampler.getVoxel(); auto v111Density = controller.convertToDensity(v111); const Vector3DFloat n000 = computeCentralDifferenceGradient(sampler, controller); @@ -324,7 +323,7 @@ namespace PolyVox // occupied cells are really the bottleneck. The large number of parameters is messy though, so it // would be nice to reduce these if we can work out how. generateMeshForCell(region, result, controller, - sampler, pIndices, pPreviousIndices, iCubeIndex, uXRegSpace, uYRegSpace, uZRegSpace, tThreshold); + sampler, pIndices, pPreviousIndices, iCubeIndex, uXRegSpace, uYRegSpace, uZRegSpace, tThreshold, v111); } // For each cell sampler.movePositiveX(); } // For X