dedup_mesh 0.2.0

Deduplicates vertices in a 3d mesh
Documentation
// SPDX-License-Identifier: MIT OR Apache-2.0
// Copyright (c) 2025 lacklustr@protonmail.com https://github.com/eadf

use crate::CheckFinitePolicy;
#[cfg(doc)]
use crate::prelude::*;

pub trait CheckFiniteKernel {
    const CHECK_FINITE: bool;
}

/// Tells the algorithm to perform value test of each vertex scalar.
///
/// Used with the [`CheckFinitePolicy`] type parameter in [`dedup`], and [`dedup_exact`].
pub struct CheckFinite;
impl CheckFiniteKernel for CheckFinite {
    const CHECK_FINITE: bool = true;
}

/// Tells the algorithm to skip value test of each vertex scalar.
///
/// Used with the [`CheckFinitePolicy`] type parameter in [`dedup`], and [`dedup_exact`].
pub struct SkipCheckFinite;
impl CheckFiniteKernel for SkipCheckFinite {
    const CHECK_FINITE: bool = false;
}

impl<T: CheckFiniteKernel> CheckFinitePolicy for T {}