Skip to main content

gpu_march_cubes_count

Function gpu_march_cubes_count 

Source
pub fn gpu_march_cubes_count(grid: &GpuVoxelGrid) -> usize
Expand description

Count the estimated number of triangles that would be produced by marching cubes on the current occupancy field.

For each cube (formed by 8 adjacent voxel corners), the occupancy of the 8 corners is inspected. A cube with at least one occupied and one empty corner contributes to the surface. This function returns the count of such “active” cubes; each active cube typically produces 1-5 triangles; this function returns the number of active cubes as a lower-bound triangle proxy.