[][src]Trait rapier3d::geometry::IntersectionPairFilter

pub trait IntersectionPairFilter: Send + Sync {
    fn filter_intersection_pair(&self, context: &PairFilterContext<'_>) -> bool;
}

User-defined filter for potential intersection pairs detected by the broad-phase.

This can be used to apply custom logic in order to decide whether two colliders should have their intersection computed by the narrow-phase.

Required methods

fn filter_intersection_pair(&self, context: &PairFilterContext<'_>) -> bool[src]

Applies the intersection pair filter.

Note that using an intersection pair filter will replace the default intersection filtering which consists of preventing intersection computation between two non-dynamic bodies.

This filtering method is called after taking into account the colliders collision groups.

If this returns false, then the narrow-phase will ignore this pair and not compute any intersection information for it. If this return true then the narrow-phase will compute intersection information for this pair.

Loading content...

Implementors

Loading content...