[][src]Trait oxygengine_physics_2d::prelude::CompositeShape

pub trait CompositeShape<N> where
    N: RealField
{ fn nparts(&self) -> usize;
fn map_part_at(
        &self,
        usize,
        m: &Isometry<N, U2, Unit<Complex<N>>>,
        &mut dyn FnMut(&Isometry<N, U2, Unit<Complex<N>>>, &(dyn Shape<N> + 'static))
    );
fn map_part_and_preprocessor_at(
        &self,
        usize,
        m: &Isometry<N, U2, Unit<Complex<N>>>,
        prediction: &ContactPrediction<N>,
        &mut dyn FnMut(&Isometry<N, U2, Unit<Complex<N>>>, &(dyn Shape<N> + 'static), &dyn ContactPreprocessor<N>)
    );
fn aabb_at(&self, i: usize) -> AABB<N>;
fn bvh(&self) -> BVHImpl<'_, N, 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 shape.

fn map_part_at(
    &self,
    usize,
    m: &Isometry<N, U2, Unit<Complex<N>>>,
    &mut dyn FnMut(&Isometry<N, U2, Unit<Complex<N>>>, &(dyn Shape<N> + 'static))
)

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

fn map_part_and_preprocessor_at(
    &self,
    usize,
    m: &Isometry<N, U2, Unit<Complex<N>>>,
    prediction: &ContactPrediction<N>,
    &mut dyn FnMut(&Isometry<N, U2, Unit<Complex<N>>>, &(dyn Shape<N> + 'static), &dyn ContactPreprocessor<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 bvh(&self) -> BVHImpl<'_, N, usize, AABB<N>>

Gets the acceleration structure of the concave shape.

Loading content...

Implementors

impl<N> CompositeShape<N> for Compound<N> where
    N: RealField
[src]

impl<N> CompositeShape<N> for Polyline<N> where
    N: RealField
[src]

Loading content...