use math::{Isometry, Point}; use shape::Shape; use query::{PointProjection, PointQuery}; impl
PointQuery
for Shape
where P: Point, M: Isometry
, { #[inline] fn project_point(&self, m: &M, pt: &P, solid: bool) -> PointProjection
{ self.as_point_query() .expect("No PointQuery implementation for the underlying shape.") .project_point(m, pt, solid) } #[inline] fn distance_to_point(&self, m: &M, pt: &P, solid: bool) -> P::Real { self.as_point_query() .expect("No PointQuery implementation for the underlying shape.") .distance_to_point(m, pt, solid) } #[inline] fn contains_point(&self, m: &M, pt: &P) -> bool { self.as_point_query() .expect("No PointQuery implementation for the underlying shape.") .contains_point(m, pt) } }