Skip to main content

Intersects

Trait Intersects 

Source
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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

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

Source§

type Result = (Point<T>, T)

Source§

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

Source§

type Result = (Point<T>, T)

Source§

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

Source§

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