forked from StrafesNET/strafe-client
rename functions
This commit is contained in:
parent
64657e718d
commit
a9f6cc7c29
@ -49,7 +49,7 @@ impl<F:Copy,E:Copy,V:Copy> State<FEV<F,E,V>>{
|
||||
},
|
||||
&FEV::<F,E,V>::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<F:Copy,E:Copy,V:Copy> State<FEV<F,E,V>>{
|
||||
}
|
||||
}
|
||||
//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);
|
||||
|
@ -45,8 +45,8 @@ pub trait MeshQuery<FACE:Clone,EDGE:Clone,VERT:Clone>{
|
||||
fn face_nd(&self,face_id:FACE)->(Planar64Vec3,Planar64);
|
||||
fn vert(&self,vert_id:VERT)->Planar64Vec3;
|
||||
fn face_edges(&self,face_id:FACE)->Cow<Vec<(EDGE,FACE)>>;
|
||||
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<Vec<(EDGE,FACE)>>;
|
||||
}
|
||||
impl MeshQuery<FaceId,EdgeId,VertId> for PhysicsMesh{
|
||||
@ -64,10 +64,10 @@ impl MeshQuery<FaceId,EdgeId,VertId> for PhysicsMesh{
|
||||
fn face_edges(&self,face_id:FaceId)->Cow<Vec<(EdgeId,FaceId)>>{
|
||||
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<Vec<(EdgeId,FaceId)>>{
|
||||
@ -138,10 +138,10 @@ impl MeshQuery<MinkowskiFace,MinkowskiEdge,MinkowskiVert> for MinkowskiMesh<'_>{
|
||||
fn face_edges(&self,face_id:MinkowskiFace)->Cow<Vec<(MinkowskiEdge,MinkowskiFace)>>{
|
||||
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<Vec<(MinkowskiEdge,MinkowskiFace)>>{
|
||||
|
Loading…
Reference in New Issue
Block a user