1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::bounding_volume::{HasBoundingVolume, AABB};
use crate::math::{Isometry, Point};
use crate::num::Bounded;
use crate::shape::Plane;
use na::{self, RealField};
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for Plane<N> {
#[inline]
fn bounding_volume(&self, _: &Isometry<N>) -> AABB<N> {
self.local_bounding_volume()
}
#[inline]
fn local_bounding_volume(&self) -> AABB<N> {
let max = Point::max_value() * na::convert(0.5f64);
AABB::new(-max, max)
}
}