Revert "Passing sampled voxel."

This reverts commit ebab89b9adac576b0d20fd8cbacf0154e7e74fe4.
This commit is contained in:
David Williams 2015-05-29 17:28:01 +02:00
parent ebab89b9ad
commit 942bb37981

View File

@ -49,8 +49,9 @@ namespace PolyVox
} }
template< typename VolumeType, typename MeshType, typename ControllerType > 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, typename VolumeType::VoxelType& v111) 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)
{ {
auto v111 = sampler.getVoxel();
auto v111Density = controller.convertToDensity(v111); auto v111Density = controller.convertToDensity(v111);
const Vector3DFloat n000 = computeCentralDifferenceGradient(sampler, controller); const Vector3DFloat n000 = computeCentralDifferenceGradient(sampler, controller);
@ -323,7 +324,7 @@ namespace PolyVox
// occupied cells are really the bottleneck. The large number of parameters is messy though, so it // 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. // would be nice to reduce these if we can work out how.
generateMeshForCell<VolumeType, MeshType, ControllerType>(region, result, controller, generateMeshForCell<VolumeType, MeshType, ControllerType>(region, result, controller,
sampler, pIndices, pPreviousIndices, iCubeIndex, uXRegSpace, uYRegSpace, uZRegSpace, tThreshold, v111); sampler, pIndices, pPreviousIndices, iCubeIndex, uXRegSpace, uYRegSpace, uZRegSpace, tThreshold);
} // For each cell } // For each cell
sampler.movePositiveX(); sampler.movePositiveX();
} // For X } // For X