pub enum Intersections<T> {
Found(Vec<T>),
Coincident(Vec<T>),
}Expand description
Result of a subdivision-based intersection search: either the finite set of distinct solutions, or a signal that the two shapes coincide/overlap over a shared region rather than meeting at finitely many isolated points.
Overlaps are found directly (see curve_curve::curve_curve_intersect
and curve_surface::curve_surface_intersect), not inferred from a
search reaching max_solutions.
Intersections::Coincident carries, up to max_solutions, the
overlaps’ ends, the isolated crossings and points spread evenly over the
overlaps — some callers detect coincidence some other way and just want
every point regardless (see
geop-lib-booleans’s remesh_edges_x_edges); others want to reuse
them for a follow-up geometric test instead of re-deriving them (see
remesh_edges_x_faces::find_coincident_pair). Use Intersections::into_vec
to get the solutions either way, or match to tell the two cases apart.
Variants§
Found(Vec<T>)
The distinct isolated solutions: the shapes overlap nowhere.
Coincident(Vec<T>)
The shapes overlap along a shared region: points of it, and the isolated solutions besides.
Implementations§
Source§impl<T> Intersections<T>
impl<T> Intersections<T>
Sourcepub fn is_coincident(&self) -> bool
pub fn is_coincident(&self) -> bool
true for Intersections::Coincident.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<T: Clone> Clone for Intersections<T>
impl<T: Clone> Clone for Intersections<T>
Source§fn clone(&self) -> Intersections<T>
fn clone(&self) -> Intersections<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more