use crate::int::binder::SteinerInference;
use crate::int::solver::{ContourSolver, ShapeSolver, ShapesSolver};
use crate::int::triangulation::RawIntTriangulation;
use i_overlay::i_float::int::point::IntPoint;
use i_overlay::i_shape::int::shape::{IntContour, IntShape, IntShapes};
pub trait IntUncheckedTriangulatable {
fn uncheck_triangulate(&self) -> RawIntTriangulation;
fn uncheck_triangulate_with_steiner_points(&self, points: &[IntPoint]) -> RawIntTriangulation;
}
impl IntUncheckedTriangulatable for IntContour {
#[inline]
fn uncheck_triangulate(&self) -> RawIntTriangulation {
ContourSolver::uncheck_triangulate(self)
}
#[inline]
fn uncheck_triangulate_with_steiner_points(&self, points: &[IntPoint]) -> RawIntTriangulation {
ContourSolver::uncheck_triangulate_with_steiner_points(self, points)
}
}
impl IntUncheckedTriangulatable for IntShape {
#[inline]
fn uncheck_triangulate(&self) -> RawIntTriangulation {
ShapeSolver::uncheck_triangulate(self)
}
#[inline]
fn uncheck_triangulate_with_steiner_points(&self, points: &[IntPoint]) -> RawIntTriangulation {
ShapeSolver::uncheck_triangulate_with_steiner_points(self, points)
}
}
impl IntUncheckedTriangulatable for IntShapes {
#[inline]
fn uncheck_triangulate(&self) -> RawIntTriangulation {
ShapesSolver::uncheck_triangulate(self)
}
#[inline]
fn uncheck_triangulate_with_steiner_points(&self, points: &[IntPoint]) -> RawIntTriangulation {
let group = self.group_by_shapes(points);
ShapesSolver::uncheck_triangulate_with_steiner_points(self, &group)
}
}