Skip to main content

voxel_downsample_observed

Function voxel_downsample_observed 

Source
pub fn voxel_downsample_observed<F>(
    cloud: &PointCloud,
    voxel_size: f64,
    progress: F,
) -> Result<PointCloud, CloudError>
where F: FnMut(usize, usize),
Expand description

The same, reporting progress after each internal phase.

progress receives (completed, total) in phases, not in points: the work is a sequence of whole-cloud passes — keys, sort, cell boundaries, centroids — and none of them can report a fraction of itself without giving up the parallelism that makes it fast.

Nothing guarantees the callback ever runs: a cloud that is empty or rejected returns before the first phase. Completion is signalled by the function returning, not by a final call.