Skip to main content

IntersectsStrategy

Trait IntersectsStrategy 

Source
pub trait IntersectsStrategy<A, B> {
    // Required method
    fn intersects(&self, a: &A, b: &B) -> bool;
}
Expand description

A strategy for “do these two geometries share at least one point?”.

Mirrors boost::geometry::intersects(g1, g2) from boost/geometry/algorithms/intersects.hpp. The Boost API takes the strategy implicitly through the algorithm’s per-pair dispatch table; the Rust analogue collapses dispatch and strategy onto one trait keyed on the geometry pair.

Required Methods§

Source

fn intersects(&self, a: &A, b: &B) -> bool

true iff a and b share at least one point.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A, B, P> IntersectsStrategy<A, B> for IxLinestringLinestring

Source§

impl<A, B, P> IntersectsStrategy<A, B> for IxPolygonPolygon

Source§

impl<A, B, P> IntersectsStrategy<A, B> for IxSegmentSegment

Source§

impl<A, B, S> IntersectsStrategy<B, A> for Reversed<S>
where S: IntersectsStrategy<A, B>,

Source§

impl<A, B> IntersectsStrategy<A, B> for CartesianIntersects
where A: Geometry, B: Geometry, A::Kind: IntersectsPairStrategy<B::Kind>, <A::Kind as IntersectsPairStrategy<B::Kind>>::S: IntersectsStrategy<A, B>,

Source§

impl<A, B> IntersectsStrategy<A, B> for IxPointPoint

Source§

impl<G, L, P> IntersectsStrategy<G, L> for IxPolygonLinestring

Source§

impl<G, P> IntersectsStrategy<G, P> for IxPolygonPoint

Source§

impl<L, G, P> IntersectsStrategy<L, G> for IxLinestringPolygon

Source§

impl<L, S, P> IntersectsStrategy<L, S> for IxLinestringSegment

Source§

impl<P, G> IntersectsStrategy<P, G> for IxPointPolygon

Source§

impl<P, S> IntersectsStrategy<P, S> for IxPointSegment

Source§

impl<S, L, P> IntersectsStrategy<S, L> for IxSegmentLinestring

Source§

impl<S, P> IntersectsStrategy<S, P> for IxSegmentPoint