Skip to main content

conspire/geometry/mesh/tessellation/from/
mod.rs

1#[cfg(test)]
2pub mod test;
3
4mod grid;
5
6use crate::geometry::mesh::{
7    Mesh,
8    tessellation::{D, Tessellation},
9};
10use std::cell::OnceCell;
11
12impl From<Mesh<D>> for Tessellation {
13    fn from(mesh: Mesh<D>) -> Self {
14        let normals = mesh.normals();
15        Self {
16            mesh,
17            normals,
18            bvh: OnceCell::new(),
19        }
20    }
21}