CartesianPolygon

Trait CartesianPolygon 

Source
pub trait CartesianPolygon {
    type Point: CartesianPoint2d;

    // Required method
    fn contains_point<P>(&self, point: &P) -> bool
       where P: CartesianPoint2d<Num = <Self::Point as CartesianPoint2d>::Num>;
}
Expand description

Polygon in 2d cartesian coordinates. This trait is auto-implemented for all illegible types.

Required Associated Types§

Source

type Point: CartesianPoint2d

Type of the points of the polygon.

Required Methods§

Source

fn contains_point<P>(&self, point: &P) -> bool
where P: CartesianPoint2d<Num = <Self::Point as CartesianPoint2d>::Num>,

Returns true if the point lies inside or on one of the polygon’s sides.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<P, C, T> CartesianPolygon for T
where P: CartesianPoint2d + Copy, C: ClosedContour<Point = P>, T: Polygon<Contour = C>,

Source§

type Point = P