Skip to main content

IntersectsAtGlobal

Trait IntersectsAtGlobal 

Source
pub trait IntersectsAtGlobal<S, P, R> {
    // Required method
    fn intersects_at_global(
        &self,
        other: &S,
        r_self: &P,
        o_self: &R,
        r_other: &P,
        o_other: &R,
    ) -> bool;
}
Expand description

Test whether the set of points in one shape intersects with the set of another (in the global frame).

IntersectsAtGlobal supports hard-particle overlap checks for simulations defined in arbitrary metric spaces.

Required Methods§

Source

fn intersects_at_global( &self, other: &S, r_self: &P, o_self: &R, r_other: &P, o_other: &R, ) -> bool

Test whether the set of points in one shape intersects with the set of another (in the global frame).

Each shape (self and other) remain unmodified in their own local coordinate systems. The intersection test is performed in a global coordinate system where self has position/orientation r_self/o_self and other has position/orientation r_other/o_other.

When starting with shapes in the global frame (such as in Monte Carlo simulations), intersects_at_global may be faster than intersects_at as it is able to check whether the bounding spheres of the shapes overlap before transforming into the local coordinate system about self.

Implementors§