use crate::math::Vect;
use rapier::parry::shape::ConvexPolyhedron;
#[derive(Copy, Clone)]
pub struct ConvexPolyhedronView<'a> {
pub raw: &'a ConvexPolyhedron,
}
impl<'a> ConvexPolyhedronView<'a> {
pub fn points(&self) -> impl ExactSizeIterator<Item = Vect> + '_ {
self.raw.points().iter().map(|pt| (*pt).into())
}
}
pub struct ConvexPolyhedronViewMut<'a> {
pub raw: &'a mut ConvexPolyhedron,
}
impl<'a> ConvexPolyhedronViewMut<'a> {
pub fn points(&self) -> impl ExactSizeIterator<Item = Vect> + '_ {
self.raw.points().iter().map(|pt| (*pt).into())
}
}