From 01d74102e37922e653f3a5d46eaa0f8a12a6ed30 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 27 Oct 2023 16:27:57 -0700 Subject: [PATCH] MinkowskiMesh::edge_verts --- 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 c33398a..0f5c8ab 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -192,7 +192,18 @@ impl MeshQuery for MinkowskiMesh<'_>{ } } fn edge_verts(&self,edge_id:MinkowskiEdge)->Cow<[(MinkowskiVert,MinkowskiFace);2]>{ - todo!() + match edge_id{ + MinkowskiEdge::VertEdge(v0,e1)=>{ + Cow::Owned(self.mesh1.edge_verts(e1).map(|(vert_id1,face_id1)|{ + (MinkowskiVert::VertVert(v0,vert_id1),MinkowskiFace::VertFace(v0,face_id1)) + })) + }, + MinkowskiEdge::EdgeVert(e0,v1)=>{ + Cow::Owned(self.mesh0.edge_verts(e0).map(|(vert_id0,face_id0)|{ + (MinkowskiVert::VertVert(vert_id0,v1),MinkowskiFace::FaceVert(face_id0,v1)) + })) + }, + } } fn vert_edges(&self,vert_id:MinkowskiVert)->Cow>{ todo!()