ncollide3d::shape

Trait CompositeShape

Source
pub trait CompositeShape<N: RealField + Copy> {
    // Required methods
    fn nparts(&self) -> usize;
    fn map_part_at(
        &self,
        _: usize,
        m: &Isometry<N>,
        _: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>),
    );
    fn map_part_and_preprocessor_at(
        &self,
        _: usize,
        m: &Isometry<N>,
        prediction: &ContactPrediction<N>,
        _: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>, &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§

Source

fn nparts(&self) -> usize

The number of sub-shape in this composide shape.

Source

fn map_part_at( &self, _: usize, m: &Isometry<N>, _: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>), )

Applies a transformation matrix and a function to each sub-shape of this concave shape.

Source

fn map_part_and_preprocessor_at( &self, _: usize, m: &Isometry<N>, prediction: &ContactPrediction<N>, _: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>, &dyn ContactPreprocessor<N>), )

Applies a transformation matrix and a function to each sub-shape of this concave shape.

Source

fn aabb_at(&self, i: usize) -> AABB<N>

Gets the AABB of the shape identified by the index i.

Source

fn bvh(&self) -> BVHImpl<'_, N, usize, AABB<N>>

Gets the acceleration structure of the concave shape.

Implementors§