include edges with zero dot to support crawling flush minkowksi faces

This commit is contained in:
Quaternions 2023-11-17 18:40:28 -08:00
parent e2777852d1
commit 9a2b033241

View File

@ -556,14 +556,14 @@ impl MeshQuery<MinkowskiFace,MinkowskiDirectedEdge,MinkowskiVert> for MinkowskiM
let v1f=self.mesh1.vert_faces(v1);
for &directed_edge_id in self.mesh0.vert_edges(v0).iter(){
let n=self.mesh0.directed_edge_n(directed_edge_id);
if v1f.iter().any(|&face_id|n.dot(self.mesh1.face_nd(face_id).0)<Planar64::ZERO){
if v1f.iter().any(|&face_id|n.dot(self.mesh1.face_nd(face_id).0)<=Planar64::ZERO){
edges.push(MinkowskiDirectedEdge::EdgeVert(directed_edge_id,v1));
}
}
let v0f=self.mesh0.vert_faces(v0);
for &directed_edge_id in self.mesh1.vert_edges(v1).iter(){
let n=self.mesh1.directed_edge_n(directed_edge_id);
if v0f.iter().any(|&face_id|n.dot(self.mesh0.face_nd(face_id).0)<Planar64::ZERO){
if v0f.iter().any(|&face_id|n.dot(self.mesh0.face_nd(face_id).0)<=Planar64::ZERO){
edges.push(MinkowskiDirectedEdge::VertEdge(v0,directed_edge_id));
}
}