From ee4e6dbbaf380db665f96fc832bae587cb4b403e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 27 Oct 2023 16:23:35 -0700 Subject: [PATCH] MinkowskiMesh::edge_faces --- src/model_physics.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/model_physics.rs b/src/model_physics.rs index 3ed1a45..c33398a 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -178,7 +178,18 @@ impl MeshQuery for MinkowskiMesh<'_>{ } } fn edge_faces(&self,edge_id:MinkowskiEdge)->Cow<[MinkowskiFace;2]>{ - todo!() + match edge_id{ + MinkowskiEdge::VertEdge(v0,e1)=>{ + Cow::Owned(self.mesh1.edge_faces(e1).map(|face_id1|{ + MinkowskiFace::VertFace(v0,face_id1) + })) + }, + MinkowskiEdge::EdgeVert(e0,v1)=>{ + Cow::Owned(self.mesh0.edge_faces(e0).map(|face_id0|{ + MinkowskiFace::FaceVert(face_id0,v1) + })) + }, + } } fn edge_verts(&self,edge_id:MinkowskiEdge)->Cow<[(MinkowskiVert,MinkowskiFace);2]>{ todo!()