From 3d5ac0cd6104efc23d08954313edc4a62c29a25a Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 27 Oct 2023 14:19:17 -0700 Subject: [PATCH] Minkowski face_nd --- src/model_physics.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/model_physics.rs b/src/model_physics.rs index c22ea84..5428015 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -113,7 +113,23 @@ impl MeshQuery for MinkowskiMesh<'_>{ todo!() } fn face_nd(&self,face_id:MinkowskiFace)->(Planar64Vec3,Planar64){ - todo!() + match face_id{ + MinkowskiFace::FaceVert(f0,v1)=>{ + let (n,d)=self.mesh0.face_nd(f0); + (n,d+n.dot(self.mesh1.vert(v1))) + }, + MinkowskiFace::EdgeEdge(e0,e1)=>{ + let [e0f0,e0f1]=self.mesh0.edge_faces(e0).into_owned(); + let [e1f0,e1f1]=self.mesh1.edge_faces(e1).into_owned(); + //cross edge faces + //cross crosses + todo!() + }, + MinkowskiFace::VertFace(v0,f1)=>{ + let (n,d)=self.mesh1.face_nd(f1); + (-n,d-n.dot(self.mesh0.vert(v0))) + }, + } } fn vert(&self,vert_id:MinkowskiVert)->Planar64Vec3{ todo!()