[][src]Trait geo::algorithm::intersects::Intersects

pub trait Intersects<Rhs = Self> {
    fn intersects(&self, rhs: &Rhs) -> bool;
}

Checks if the geometry A intersects the geometry B.

Required methods

fn intersects(&self, rhs: &Rhs) -> bool

Checks if the geometry A intersects the geometry B.

Examples

use geo::algorithm::intersects::Intersects;
use geo::line_string;

let line_string_a = line_string![
    (x: 3., y: 2.),
    (x: 7., y: 6.),
];

let line_string_b = line_string![
    (x: 3., y: 4.),
    (x: 8., y: 4.),
];

let line_string_c = line_string![
    (x: 9., y: 2.),
    (x: 11., y: 5.),
];

assert!(line_string_a.intersects(&line_string_b));
assert!(!line_string_a.intersects(&line_string_c));
Loading content...

Implementors

impl<T> Intersects<Line<T>> for Line<T> where
    T: Float
[src]

impl<T> Intersects<Line<T>> for LineString<T> where
    T: Float
[src]

impl<T> Intersects<Line<T>> for Point<T> where
    T: Float
[src]

impl<T> Intersects<Line<T>> for Polygon<T> where
    T: Float
[src]

impl<T> Intersects<LineString<T>> for Line<T> where
    T: Float
[src]

impl<T> Intersects<LineString<T>> for LineString<T> where
    T: Float
[src]

impl<T> Intersects<LineString<T>> for Polygon<T> where
    T: Float
[src]

impl<T> Intersects<Point<T>> for Line<T> where
    T: Float
[src]

impl<T> Intersects<Polygon<T>> for Line<T> where
    T: Float
[src]

impl<T> Intersects<Polygon<T>> for LineString<T> where
    T: Float
[src]

impl<T> Intersects<Polygon<T>> for Polygon<T> where
    T: Float
[src]

impl<T> Intersects<Polygon<T>> for Rect<T> where
    T: Float
[src]

impl<T> Intersects<Rect<T>> for Polygon<T> where
    T: Float
[src]

impl<T> Intersects<Rect<T>> for Rect<T> where
    T: Float
[src]

Loading content...