pub trait Intersects<S> {
    type Result;

    // Required method
    fn intersects(&self, shape: S) -> Option<Self::Result>;
}
Expand description

Trait for shape intersection operations.

Required Associated Types§

source

type Result

The result of the intersection.

Required Methods§

source

fn intersects(&self, shape: S) -> Option<Self::Result>

Returns an intersection result based on the shape or None if there is no intersection.

Implementors§

source§

impl<T: Float> Intersects<Line<T>> for Line<T>

§

type Result = (Point<T>, T)

source§

impl<T: Float> Intersects<Line<T>> for Rect<T>

§

type Result = (Point<T>, T)

source§

impl<T: Num> Intersects<Rect<T>> for Rect<T>

§

type Result = ()

source§

impl<T: Num> Intersects<Sphere<T>> for Sphere<T>

§

type Result = ()