common: Aabb::contains(point)
This commit is contained in:
parent
2cf1547423
commit
19e65802f6
@ -34,6 +34,10 @@ impl Aabb{
|
|||||||
self.min-=hs;
|
self.min-=hs;
|
||||||
self.max+=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{
|
pub fn intersects(&self,aabb:&Aabb)->bool{
|
||||||
let bvec=self.min.lt(aabb.max)&aabb.min.lt(self.max);
|
let bvec=self.min.lt(aabb.max)&aabb.min.lt(self.max);
|
||||||
bvec.all()
|
bvec.all()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user