1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
use na::RealField;
use std::any::Any;

/// A signal handler for contact detection.
pub trait BroadPhasePairFilter<N: RealField, Object, Handle>: Any + Send + Sync {
    /// Activate an action for when two objects start or stop to be close to each other.
    fn is_pair_valid(&self, b1: &Object, b2: &Object, h1: Handle, h2: Handle) -> bool;
}

impl<N: RealField, Object, Handle> BroadPhasePairFilter<N, Object, Handle> for () {
    fn is_pair_valid(&self, _: &Object, _: &Object, _: Handle, _: Handle) -> bool {
        true
    }
}