pub enum SegmentIntersection<P> {
Disjoint,
Single(P),
Collinear {
from: P,
to: P,
},
OutOfRange,
}Expand description
The outcome of intersecting two segments.
Mirrors the three shapes Boost’s
strategy::intersection::cartesian_segments can produce: no
intersection, exactly one point, or a collinear overlap delimited by
two points (intersection.hpp, the segment_intersection_points
count of 0 / 1 / 2). A fourth variant records the robustness-gate
rejection that the “no rescale” policy requires
.
Variants§
Disjoint
The segments do not meet.
Single(P)
The segments meet at exactly one point.
Collinear
The segments are collinear and overlap along the closed
stretch from from to to (a single shared endpoint collapses
to from == to, but that case is reported as Self::Single).
Fields
from: POne end of the shared collinear stretch.
to: PThe other end of the shared collinear stretch.
OutOfRange
An endpoint fell outside the safe arithmetic range; per the no-rescale policy the intersection is refused rather than computed with an untrustworthy sign.
Trait Implementations§
Source§impl<P: Clone> Clone for SegmentIntersection<P>
impl<P: Clone> Clone for SegmentIntersection<P>
Source§fn clone(&self) -> SegmentIntersection<P>
fn clone(&self) -> SegmentIntersection<P>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more