pub struct RegularGridDetector {
pub params: RegularGridParams,
}Expand description
Configurable regular square-grid detector.
Holds a RegularGridParams. Use RegularGridDetector::default
for the zero-config path or construct one with custom params.
Fields§
§params: RegularGridParamsTuning knobs. See RegularGridParams.
Implementations§
Source§impl RegularGridDetector
impl RegularGridDetector
Sourcepub fn new(params: RegularGridParams) -> Self
pub fn new(params: RegularGridParams) -> Self
Construct a detector with explicit params.
Sourcepub fn detect(
&self,
points: &[Point2<f32>],
) -> Result<RegularGridDetection, RegularGridError>
pub fn detect( &self, points: &[Point2<f32>], ) -> Result<RegularGridDetection, RegularGridError>
Detect a regular square grid in points.
Runs the generic seed → grow → extend → fill → validate pipeline
with an internal open regular-grid policy, applies generic
output cleanup (connectivity pruning, top-left canonicalisation,
(j, i) sort), and returns a RegularGridDetection.
Returns RegularGridError when detection cannot proceed: too
few points, a degenerate cloud with no inferable lattice, or no
valid seed quad.
Sourcepub fn detect_all(&self, points: &[Point2<f32>]) -> Vec<RegularGridDetection>
pub fn detect_all(&self, points: &[Point2<f32>]) -> Vec<RegularGridDetection>
Detect every disjoint regular grid in points.
Multi-component variant of Self::detect: peels off one
component at a time and returns each as its own
RegularGridDetection, in detection order. Each component is
cleaned up independently (pruned, canonicalised, sorted).
Returns an empty Vec when nothing is detected (too few
points, a degenerate cloud, or no seed quad). Unlike
Self::detect, a multi-component sweep has no single failure
mode to report, so this method does not return a
RegularGridError.
Trait Implementations§
Source§impl Clone for RegularGridDetector
impl Clone for RegularGridDetector
Source§fn clone(&self) -> RegularGridDetector
fn clone(&self) -> RegularGridDetector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RegularGridDetector
impl Debug for RegularGridDetector
Source§impl Default for RegularGridDetector
impl Default for RegularGridDetector
Source§fn default() -> RegularGridDetector
fn default() -> RegularGridDetector
Auto Trait Implementations§
impl Freeze for RegularGridDetector
impl RefUnwindSafe for RegularGridDetector
impl Send for RegularGridDetector
impl Sync for RegularGridDetector
impl Unpin for RegularGridDetector
impl UnsafeUnpin for RegularGridDetector
impl UnwindSafe for RegularGridDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.