use num::Signed; use na; use na::{Rotate, Transform}; use support_map::SupportMap; use shape::Capsule; use math::{Point, Vector}; impl SupportMap for Capsule<::Scalar> where P: Point, M: Transform

+ Rotate { #[inline] fn support_point(&self, m: &M, dir: &P::Vect) -> P { let local_dir = m.inverse_rotate(dir); let mut pres = na::origin::

(); if local_dir[1].is_negative() { pres[1] = -self.half_height() } else { pres[1] = self.half_height() } m.transform(&(pres + na::normalize(&local_dir) * self.radius())) } }