diff --git a/math_explorer/src/applied/isosurface/marching_cubes.rs b/math_explorer/src/applied/isosurface/marching_cubes.rs index 7e5a21f..5118904 100644 --- a/math_explorer/src/applied/isosurface/marching_cubes.rs +++ b/math_explorer/src/applied/isosurface/marching_cubes.rs @@ -143,6 +143,8 @@ pub fn extract_isosurface(grid: &VoxelGrid, threshold: f32) -> Result = None; + // Cache for "Right Face" values of previous iteration. + let mut cached_values: Option<[f32; 4]> = None; for x in 0..grid.width - 1 { let base_idx = zy_base + x; @@ -150,8 +152,6 @@ pub fn extract_isosurface(grid: &VoxelGrid, threshold: f32) -> Result Result Result