Trait oxygengine_physics_2d::prelude::ncollide2d::shape::CompositeShape
source · pub trait CompositeShape<N>where
N: RealField + Copy,{
// Required methods
fn nparts(&self) -> usize;
fn map_part_at(
&self,
_: usize,
m: &Isometry<N, Unit<Complex<N>>, 2>,
_: &mut dyn FnMut(&Isometry<N, Unit<Complex<N>>, 2>, &(dyn Shape<N> + 'static))
);
fn map_part_and_preprocessor_at(
&self,
_: usize,
m: &Isometry<N, Unit<Complex<N>>, 2>,
prediction: &ContactPrediction<N>,
_: &mut dyn FnMut(&Isometry<N, Unit<Complex<N>>, 2>, &(dyn Shape<N> + 'static), &dyn ContactPreprocessor<N>)
);
fn aabb_at(&self, i: usize) -> AABB<N>;
fn bvh(&self) -> BVHImpl<'_, N, usize, AABB<N>>;
}
Expand description
Trait implemented by shapes composed of multiple simpler shapes.
A composite shape is composed of several shapes. Typically, it is a convex decomposition of a concave shape.
Required Methods§
sourcefn map_part_at(
&self,
_: usize,
m: &Isometry<N, Unit<Complex<N>>, 2>,
_: &mut dyn FnMut(&Isometry<N, Unit<Complex<N>>, 2>, &(dyn Shape<N> + 'static))
)
fn map_part_at( &self, _: usize, m: &Isometry<N, Unit<Complex<N>>, 2>, _: &mut dyn FnMut(&Isometry<N, Unit<Complex<N>>, 2>, &(dyn Shape<N> + 'static)) )
Applies a transformation matrix and a function to each sub-shape of this concave shape.
sourcefn map_part_and_preprocessor_at(
&self,
_: usize,
m: &Isometry<N, Unit<Complex<N>>, 2>,
prediction: &ContactPrediction<N>,
_: &mut dyn FnMut(&Isometry<N, Unit<Complex<N>>, 2>, &(dyn Shape<N> + 'static), &dyn ContactPreprocessor<N>)
)
fn map_part_and_preprocessor_at( &self, _: usize, m: &Isometry<N, Unit<Complex<N>>, 2>, prediction: &ContactPrediction<N>, _: &mut dyn FnMut(&Isometry<N, Unit<Complex<N>>, 2>, &(dyn Shape<N> + 'static), &dyn ContactPreprocessor<N>) )
Applies a transformation matrix and a function to each sub-shape of this concave shape.