Trait pix_engine::core::shape::Intersects[][src]

pub trait Intersects<T, const N: usize> {
    type Shape;
    fn intersects_line<L>(&self, _line: L) -> Option<(Point<T, N>, T)>
    where
        L: Into<Line<T, N>>
;
fn intersects_shape<O>(&self, _other: O) -> bool
    where
        O: Into<Self::Shape>
; }
Expand description

Trait for shape intersection operations.

Associated Types

The shape type. e.g. Rect.

Required methods

Returns the closest intersection point with a given line and distance along the line or None if there is no intersection.

Returns whether this shape intersects with another shape of the same type.

Implementors