swap edge faces in VertEdge case

This commit is contained in:
Quaternions 2023-11-20 18:49:36 -08:00
parent 72d8186ba4
commit f4db20c206

View File

@ -472,11 +472,9 @@ impl MeshQuery<MinkowskiFace,MinkowskiDirectedEdge,MinkowskiVert> for MinkowskiM
fn edge_faces(&self,edge_id:MinkowskiEdge)->Cow<[MinkowskiFace;2]>{
match edge_id{
MinkowskiEdge::VertEdge(v0,e1)=>{
//tracking index with an external variable because .enumerate() is not available
let mut i=0;
Cow::Owned(self.mesh1.edge_faces(e1).map(|edge_face_id1|{
let face_parity=i==0;
i+=1;
//faces are listed backwards from the minkowski mesh
let e1f=self.mesh1.edge_faces(e1);
Cow::Owned([(e1f[1],true),(e1f[0],false)].map(|(edge_face_id1,face_parity)|{
let mut best_edge=None;
let mut best_d=Planar64::ZERO;
let edge_face1_n=self.mesh1.face_nd(edge_face_id1).0;
@ -495,6 +493,7 @@ impl MeshQuery<MinkowskiFace,MinkowskiDirectedEdge,MinkowskiVert> for MinkowskiM
}))
},
MinkowskiEdge::EdgeVert(e0,v1)=>{
//tracking index with an external variable because .enumerate() is not available
let mut i=0;
Cow::Owned(self.mesh0.edge_faces(e0).map(|edge_face_id0|{
let face_parity=i==0;