Skip to main content

surface_bbox

Function surface_bbox 

Source
pub fn surface_bbox(
    sdf: &dyn ImplicitSurface,
    bounds: [[f64; 2]; 3],
    res: usize,
    threshold: f64,
) -> [[f64; 2]; 3]
Expand description

Compute the axis-aligned bounding box of a level-set surface by sampling.

Samples the SDF on a uniform grid within bounds at resolution res per axis and returns [[xmin,xmax\], [ymin,ymax], [zmin,zmax]] of all points where |f(p)| < threshold.