Trait ncollide3d::shape::CompositeShape [−][src]
pub trait CompositeShape<N: Real> { fn nparts(&self) -> usize; fn map_part_at(
&self,
_: usize,
_: &mut FnMut(usize, &Isometry<N>, &Shape<N>)
); fn map_transformed_part_at(
&self,
_: usize,
m: &Isometry<N>,
_: &mut FnMut(usize, &Isometry<N>, &Shape<N>)
); fn aabb_at(&self, i: usize) -> AABB<N>; fn bvt(&self) -> &BVT<usize, AABB<N>>; }
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
fn nparts(&self) -> usize
The number of sub-shape in this composide sahpe.
fn map_part_at(&self, _: usize, _: &mut FnMut(usize, &Isometry<N>, &Shape<N>))
Applies a function to each sub-shape of this concave shape.
fn map_transformed_part_at(
&self,
_: usize,
m: &Isometry<N>,
_: &mut FnMut(usize, &Isometry<N>, &Shape<N>)
)
&self,
_: usize,
m: &Isometry<N>,
_: &mut FnMut(usize, &Isometry<N>, &Shape<N>)
)
Applies a transformation matrix and a function to each sub-shape of this concave shape.
fn aabb_at(&self, i: usize) -> AABB<N>
Gets the AABB of the shape identified by the index i
.
fn bvt(&self) -> &BVT<usize, AABB<N>>
Gets the acceleration structure of the concave shape.