diff --git a/lib/common/src/aabb.rs b/lib/common/src/aabb.rs index 5e244d2..7b5e55d 100644 --- a/lib/common/src/aabb.rs +++ b/lib/common/src/aabb.rs @@ -34,6 +34,10 @@ impl Aabb{ self.min-=hs; self.max+=hs; } + pub fn contains(&self,point:Planar64Vec3)->bool{ + let bvec=self.min.lt(point)&point.lt(self.max); + bvec.all() + } pub fn intersects(&self,aabb:&Aabb)->bool{ let bvec=self.min.lt(aabb.max)&aabb.min.lt(self.max); bvec.all()