forked from StrafesNET/strafe-client
absurdly swap everything everywhere
This commit is contained in:
parent
38731c4a10
commit
26e4d8cab1
@ -54,7 +54,7 @@ enum Transition<F,E:DirectedEdge,V>{
|
|||||||
for (i,&edge_face_id) in mesh.edge_faces(edge_id).iter().enumerate(){
|
for (i,&edge_face_id) in mesh.edge_faces(edge_id).iter().enumerate(){
|
||||||
let face_n=mesh.face_nd(edge_face_id).0;
|
let face_n=mesh.face_nd(edge_face_id).0;
|
||||||
//edge_n gets parity from the order of edge_faces
|
//edge_n gets parity from the order of edge_faces
|
||||||
let n=edge_n.cross(face_n)*((i as i64)*2-1);
|
let n=face_n.cross(edge_n)*((i as i64)*2-1);
|
||||||
let d=n.dot(vert_sum);
|
let d=n.dot(vert_sum);
|
||||||
//WARNING yada yada d *2
|
//WARNING yada yada d *2
|
||||||
for t in zeroes2((n.dot(body.position))*2-d,n.dot(body.velocity)*2,n.dot(body.acceleration)){
|
for t in zeroes2((n.dot(body.position))*2-d,n.dot(body.velocity)*2,n.dot(body.acceleration)){
|
||||||
|
@ -441,7 +441,7 @@ impl MinkowskiMesh<'_>{
|
|||||||
for (i,&face_id) in self.edge_faces(edge_id).iter().enumerate(){
|
for (i,&face_id) in self.edge_faces(edge_id).iter().enumerate(){
|
||||||
let face_n=self.face_nd(face_id).0;
|
let face_n=self.face_nd(face_id).0;
|
||||||
//edge-face boundary nd, n facing out of the face towards the edge
|
//edge-face boundary nd, n facing out of the face towards the edge
|
||||||
let boundary_n=edge_n.cross(face_n)*(i as i64*2-1);
|
let boundary_n=face_n.cross(edge_n)*(i as i64*2-1);
|
||||||
let boundary_d=boundary_n.dot(vert_sum);
|
let boundary_d=boundary_n.dot(vert_sum);
|
||||||
// point.dot(boundary_n) is multiplied by two because vert_sum sums two vertices.
|
// point.dot(boundary_n) is multiplied by two because vert_sum sums two vertices.
|
||||||
if infinity_dir.dot(boundary_n)==Planar64::ZERO&&point.dot(boundary_n)*2<=boundary_d{
|
if infinity_dir.dot(boundary_n)==Planar64::ZERO&&point.dot(boundary_n)*2<=boundary_d{
|
||||||
|
Loading…
Reference in New Issue
Block a user