This commit is contained in:
2025-12-02 10:12:46 -08:00
parent ae7582704b
commit cb9307bdf2

View File

@@ -584,6 +584,9 @@ impl MinkowskiMesh<'_>{
}
/// This function drops a vertex down to an edge or a face if the path from infinity did not cross any vertex-edge boundaries but the point is supposed to have already crossed a boundary down from a vertex
fn crawl_to_closest_fev(&self,simplex:Simplex<3>,point:Planar64Vec3)->FEV::<Self>{
// naively start at the closest vertex
// the closest vertex is not necessarily the one with the fewest boundary hops
// but it doesn't matter, we will get there regardless.
let (vert_id,best_distance_squared)=simplex.into_iter().map(|vert_id|{
let diff=point-self.vert(vert_id);
(vert_id,diff.dot(diff))