diff --git a/src/face_crawler.rs b/src/face_crawler.rs index 2e64cc2..f9e75e3 100644 --- a/src/face_crawler.rs +++ b/src/face_crawler.rs @@ -49,7 +49,7 @@ impl State>{ }, &FEV::::Edge(edge_id)=>{ //test each face collision time, ignoring roots with zero or conflicting derivative - for &test_face_id in mesh.edge_side_faces(edge_id).iter(){ + for &test_face_id in mesh.edge_faces(edge_id).iter(){ let (n,d)=mesh.face_nd(test_face_id); for t in zeroes2((n.dot(body.position)-d)*2,n.dot(body.velocity)*2,n.dot(body.acceleration)){ let t=body.time+Time::from(t); @@ -61,7 +61,7 @@ impl State>{ } } //test each vertex collision time, ignoring roots with zero or conflicting derivative - for &(vert_id,test_face_id) in mesh.edge_ends(edge_id).iter(){ + for &(vert_id,test_face_id) in mesh.edge_verts(edge_id).iter(){ let (n,d)=mesh.face_nd(test_face_id); for t in zeroes2((n.dot(body.position)-d)*2,n.dot(body.velocity)*2,n.dot(body.acceleration)){ let t=body.time+Time::from(t); diff --git a/src/model_physics.rs b/src/model_physics.rs index 47ef167..e60e1a9 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -45,8 +45,8 @@ pub trait MeshQuery{ fn face_nd(&self,face_id:FACE)->(Planar64Vec3,Planar64); fn vert(&self,vert_id:VERT)->Planar64Vec3; fn face_edges(&self,face_id:FACE)->Cow>; - fn edge_side_faces(&self,edge_id:EDGE)->Cow<[FACE;2]>; - fn edge_ends(&self,edge_id:EDGE)->Cow<[(VERT,FACE);2]>; + fn edge_faces(&self,edge_id:EDGE)->Cow<[FACE;2]>; + fn edge_verts(&self,edge_id:EDGE)->Cow<[(VERT,FACE);2]>; fn vert_edges(&self,vert_id:VERT)->Cow>; } impl MeshQuery for PhysicsMesh{ @@ -64,10 +64,10 @@ impl MeshQuery for PhysicsMesh{ fn face_edges(&self,face_id:FaceId)->Cow>{ Cow::Borrowed(&self.face_topology[face_id.0].edges) } - fn edge_side_faces(&self,edge_id:EdgeId)->Cow<[FaceId;2]>{ + fn edge_faces(&self,edge_id:EdgeId)->Cow<[FaceId;2]>{ Cow::Borrowed(&self.edge_topology[edge_id.0].faces) } - fn edge_ends(&self,edge_id:EdgeId)->Cow<[(VertId,FaceId);2]>{ + fn edge_verts(&self,edge_id:EdgeId)->Cow<[(VertId,FaceId);2]>{ Cow::Borrowed(&self.edge_topology[edge_id.0].verts) } fn vert_edges(&self,vert_id:VertId)->Cow>{ @@ -138,10 +138,10 @@ impl MeshQuery for MinkowskiMesh<'_>{ fn face_edges(&self,face_id:MinkowskiFace)->Cow>{ todo!() } - fn edge_side_faces(&self,edge_id:MinkowskiEdge)->Cow<[MinkowskiFace;2]>{ + fn edge_faces(&self,edge_id:MinkowskiEdge)->Cow<[MinkowskiFace;2]>{ todo!() } - fn edge_ends(&self,edge_id:MinkowskiEdge)->Cow<[(MinkowskiVert,MinkowskiFace);2]>{ + fn edge_verts(&self,edge_id:MinkowskiEdge)->Cow<[(MinkowskiVert,MinkowskiFace);2]>{ todo!() } fn vert_edges(&self,vert_id:MinkowskiVert)->Cow>{