Trait ncollide2d::shape::CompositeShape
source · pub trait CompositeShape<N: Real> {
fn nparts(&self) -> usize;
fn map_part_at(
&self,
_: usize,
_: &mut dyn FnMut(usize, &Isometry<N>, &dyn Shape<N>)
);
fn map_transformed_part_at(
&self,
_: usize,
m: &Isometry<N>,
_: &mut dyn FnMut(usize, &Isometry<N>, &dyn Shape<N>)
);
fn aabb_at(&self, i: usize) -> AABB<N>;
fn bvt(&self) -> &BVT<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,
_: &mut dyn FnMut(usize, &Isometry<N>, &dyn Shape<N>)
)
fn map_part_at(
&self,
_: usize,
_: &mut dyn FnMut(usize, &Isometry<N>, &dyn Shape<N>)
)
Applies a function to each sub-shape of this concave shape.