From 08f419f931b7a75a91656343b8fad5e6d982144d Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 8 Jan 2025 20:55:08 -0800 Subject: [PATCH] rename crawl_fev to crawl --- strafe-client/src/face_crawler.rs | 2 +- strafe-client/src/model_physics.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/strafe-client/src/face_crawler.rs b/strafe-client/src/face_crawler.rs index 0ea0159..0640575 100644 --- a/strafe-client/src/face_crawler.rs +++ b/strafe-client/src/face_crawler.rs @@ -111,7 +111,7 @@ impl,Offset=Fixed<4,128>>> FEV } best_transition } - pub fn crawl_fev(mut self,mesh:&M,relative_body:&Body,start_time:Time,time_limit:Time)->CrawlResult{ + pub fn crawl(mut self,mesh:&M,relative_body:&Body,start_time:Time,time_limit:Time)->CrawlResult{ let mut body_time={ let r=(start_time-relative_body.time).to_ratio(); Ratio::new(r.num.fix_4(),r.den.fix_4()) diff --git a/strafe-client/src/model_physics.rs b/strafe-client/src/model_physics.rs index 7d06c6e..d9d30f1 100644 --- a/strafe-client/src/model_physics.rs +++ b/strafe-client/src/model_physics.rs @@ -720,7 +720,7 @@ impl MinkowskiMesh<'_>{ infinity_body.acceleration=vec3::ZERO; //crawl in from negative infinity along a tangent line to get the closest fev // TODO: change crawl_fev args to delta time? Optional values? - match infinity_fev.crawl_fev(self,&infinity_body,Time::MIN/4,infinity_body.time){ + match infinity_fev.crawl(self,&infinity_body,Time::MIN/4,infinity_body.time){ crate::face_crawler::CrawlResult::Miss(fev)=>Some(fev), crate::face_crawler::CrawlResult::Hit(_,_)=>None, } @@ -729,7 +729,7 @@ impl MinkowskiMesh<'_>{ pub fn predict_collision_in(&self,relative_body:&Body,time_limit:Time)->Option<(MinkowskiFace,GigaTime)>{ self.closest_fev_not_inside(relative_body.clone()).map_or(None,|fev|{ //continue forwards along the body parabola - match fev.crawl_fev(self,relative_body,relative_body.time,time_limit){ + match fev.crawl(self,relative_body,relative_body.time,time_limit){ crate::face_crawler::CrawlResult::Miss(_)=>None, crate::face_crawler::CrawlResult::Hit(face,time)=>Some((face,time)), } @@ -745,7 +745,7 @@ impl MinkowskiMesh<'_>{ ); self.closest_fev_not_inside(infinity_body).map_or(None,|fev|{ //continue backwards along the body parabola - match fev.crawl_fev(self,&-relative_body.clone(),-time_limit,-relative_body.time){ + match fev.crawl(self,&-relative_body.clone(),-time_limit,-relative_body.time){ crate::face_crawler::CrawlResult::Miss(_)=>None, crate::face_crawler::CrawlResult::Hit(face,time)=>Some((face,-time)),//no need to test -time{ } fn infinity_in(&self,infinity_body:Body)->Option<(MinkowskiFace,GigaTime)>{ let infinity_fev=self.infinity_fev(-infinity_body.velocity,infinity_body.position); - match infinity_fev.crawl_fev(self,&infinity_body,Time::MIN/4,infinity_body.time){ + match infinity_fev.crawl(self,&infinity_body,Time::MIN/4,infinity_body.time){ crate::face_crawler::CrawlResult::Miss(_)=>None, crate::face_crawler::CrawlResult::Hit(face,time)=>Some((face,time)), }