Trait iron_shapes::traits::WindingNumber[][src]

pub trait WindingNumber<T> where
    T: CoordinateType
{ fn winding_number(&self, point: Point<T>) -> isize; fn contains_point_non_oriented(&self, point: Point<T>) -> bool { ... }
fn contains_point(&self, point: Point<T>) -> bool { ... } }

Compute the winding number of a geometrical object around a point. The winding number is used to check if a point is contained in a shape.

Required methods

fn winding_number(&self, point: Point<T>) -> isize[src]

Calculate the winding number of the polygon around this point.

TODO: Define how point on edges and vertices is handled.

See: http://geomalgorithms.com/a03-_inclusion.html

Loading content...

Provided methods

fn contains_point_non_oriented(&self, point: Point<T>) -> bool[src]

Check if point is inside the polygon, i.e. the polygons winds around the point a non-zero number of times.

For points on edges the following convention is used: Points on left or bottom edges are inside, points on right or top edges outside.

fn contains_point(&self, point: Point<T>) -> bool[src]

Check if point is inside the polygon, i.e. the polygon winds around the point an odd number of times.

For points on edges the following convention is used: Points on left or bottom edges are inside, points on right or top edges outside.

Loading content...

Implementors

impl<T> WindingNumber<T> for MultiPolygon<T> where
    T: CoordinateType
[src]

impl<T> WindingNumber<T> for Polygon<T> where
    T: CoordinateType
[src]

fn winding_number(&self, point: Point<T>) -> isize[src]

Calculate the winding number of the polygon around this point.

TODO: Define how point on edges and vertices is handled.

See: http://geomalgorithms.com/a03-_inclusion.html

impl<T> WindingNumber<T> for SimplePolygon<T> where
    T: CoordinateType
[src]

fn winding_number(&self, point: Point<T>) -> isize[src]

Calculate the winding number of the polygon around this point.

TODO: Define how point on edges and vertices is handled.

See: http://geomalgorithms.com/a03-_inclusion.html

impl<T> WindingNumber<T> for SimpleRPolygon<T> where
    T: CoordinateType
[src]

fn winding_number(&self, point: Point<T>) -> isize[src]

Calculate the winding number of the polygon around this point.

TODO: Define how point on edges and vertices is handled.

See: http://geomalgorithms.com/a03-_inclusion.html

Loading content...