use fj_math::Point;
use crate::{
objects::{Shell, Solid},
operations::{
build::{BuildShell, TetrahedronShell},
insert::{Insert, IsInsertedYes},
update::UpdateSolid,
},
Core,
};
pub trait BuildSolid {
fn empty() -> Solid {
Solid::new([])
}
fn tetrahedron(
points: [impl Into<Point<3>>; 4],
core: &mut Core,
) -> Tetrahedron {
let shell = Shell::tetrahedron(points, core).insert(core);
let solid = Solid::empty().add_shells([shell.shell.clone()], core);
Tetrahedron { solid, shell }
}
}
impl BuildSolid for Solid {}
pub struct Tetrahedron {
pub solid: Solid,
pub shell: TetrahedronShell<IsInsertedYes>,
}