From a7299c423fea977c338ac542b30b76c8271da94d Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 20 Nov 2023 15:34:21 -0800 Subject: [PATCH] debug crap --- src/face_crawler.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/face_crawler.rs b/src/face_crawler.rs index 0db837f..5b38d91 100644 --- a/src/face_crawler.rs +++ b/src/face_crawler.rs @@ -10,7 +10,7 @@ enum Transition{ Hit(F,Time), } - fn next_transition(fev:&FEV,time:Time,mesh:&impl MeshQuery,body:&Body,time_limit:Time)->Transition{ + fn next_transition(fev:&FEV,time:Time,mesh:&impl MeshQuery,body:&Body,time_limit:Time)->Transition{ //conflicting derivative means it crosses in the wrong direction. //if the transition time is equal to an already tested transition, do not replace the current best. let mut best_time=time_limit; @@ -61,7 +61,7 @@ enum Transition{ //edge_n gets parity from the order of edge_faces let n=face_n.cross(edge_n)*((i as i64)*2-1); let d=n.dot(vert_sum); - println!("Edge Face n={} d={}",n,d/2); + println!("Edge Face={:?} n={} d={}",edge_face_id,n,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)){ let t=body.time+Time::from(t); @@ -97,7 +97,7 @@ enum Transition{ //edge is directed away from vertex, but we want the dot product to turn out negative let n=-mesh.directed_edge_n(directed_edge_id); let d=n.dot(mesh.vert(vert_id)); - println!("Vert Edge n={} d={}",n,d); + println!("Vert Edge={:?} n={} d={}",directed_edge_id,n,d); 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); println!("dt={} low={} upp={} into={}",t-body.time,time<=t,t