[][src]Trait myelin_geometry::Intersects

pub trait Intersects<Other: ?Sized = Self> {
    pub fn intersects(&self, other: &Other) -> bool;
}

Tests wether wether this shape touches, contains or is contained in another shape

┼─────────────────────────────────────── x
│
│   ┌─────────────┐
│   │             │
│   │          ┌──│───────┐
│   └─────────────┘       │
│              └──────────┘
y

Required methods

pub fn intersects(&self, other: &Other) -> bool[src]

Returns wether this shape touches, contains or is contained in another shape

┼─────────────────────────────────────── x
│
│   ┌─────────────┐
│   │             │
│   │          ┌──│───────┐
│   └─────────────┘       │
│              └──────────┘
y
Loading content...

Implementors

impl Intersects<Aabb> for Aabb[src]

pub fn intersects(&self, other: &Aabb) -> bool[src]

Returns wether the bounds of another Aabb are touching or inside this Aabb.

┼─────────────────────────────────────── x
│
│   ┌─────────────┐
│   │             │
│   │          ┌──│───────┐
│   └─────────────┘       │
│              └──────────┘
y

impl Intersects<Polygon> for Polygon[src]

pub fn intersects(&self, other: &Polygon) -> bool[src]

Returns wether this polygon touches, contains or is contained in another polygon

Loading content...