pub fn surface_could_contain<S: Scalar>(
surface: &NurbSurface<S, 4>,
point: &Vector3<S>,
max_nodes: usize,
min_subdivision_size: S,
) -> GeopResult<Option<(S, S)>>Expand description
BFS over subdivisions of surface, exploring every node up to the
max_nodes budget (never stopping early at the first hit) and returning
the union of every converged patch’s own (u, v) domain (each axis as a
single unsharp interval scalar spanning that patch, not a numeric
midpoint — see patch_uv) — a patch converges once its convex hull could
contain point and its
maximum span (max of the u-edge and v-edge of its control net) is no
longer definitely greater than min_subdivision_size. None if no patch
converged within budget.
Exploring to completion (rather than returning on the first match)
matters for the same reason as curve_bisect::curve_could_contain: more than one patch
can independently converge on point (e.g. near a seam, a pole, or
simply because the point is close to more than one subdivision
boundary), and stopping early would silently narrow the answer to
whichever one the BFS happened to visit first.
At each step the patch is split along the longer of its two parameter-domain dimensions, keeping the BFS balanced.