Trait geo::algorithm::winding_order::Winding [−][src]
Determine and operate on how a LineString
is
wound. This functionality, and our implementation is
based on CGAL’s Polygon_2::orientation.
Associated Types
Loading content...Required methods
fn winding_order(&self) -> Option<WindingOrder>
[src]
Return the winding order of this object if it
contains at least three distinct coordinates, and
None
otherwise.
fn points_cw(&self) -> Points<'_, Self::Scalar>ⓘ
[src]
Iterate over the points in a clockwise order
The object isn’t changed, and the points are returned either in order, or in reverse order, so that the resultant order makes it appear clockwise
fn points_ccw(&self) -> Points<'_, Self::Scalar>ⓘ
[src]
Iterate over the points in a counter-clockwise order
The object isn’t changed, and the points are returned either in order, or in reverse order, so that the resultant order makes it appear counter-clockwise
fn make_cw_winding(&mut self)
[src]
Change this objects’s points so they are in clockwise winding order
fn make_ccw_winding(&mut self)
[src]
Change this line’s points so they are in counterclockwise winding order
Provided methods
fn is_cw(&self) -> bool
[src]
True iff this is wound clockwise
fn is_ccw(&self) -> bool
[src]
True iff this is wound counterclockwise
fn clone_to_winding_order(&self, winding_order: WindingOrder) -> Self where
Self: Sized + Clone,
[src]
Self: Sized + Clone,
Return a clone of this object, but in the specified winding order
fn make_winding_order(&mut self, winding_order: WindingOrder)
[src]
Change the winding order so that it is in this winding order
Implementors
impl<T, K> Winding for LineString<T> where
T: HasKernel<Ker = K>,
K: Kernel<T>,
[src]
T: HasKernel<Ker = K>,
K: Kernel<T>,
type Scalar = T
fn winding_order(&self) -> Option<WindingOrder>
[src]
fn points_cw(&self) -> Points<'_, Self::Scalar>ⓘ
[src]
Iterate over the points in a clockwise order
The Linestring isn’t changed, and the points are returned either in order, or in reverse order, so that the resultant order makes it appear clockwise
fn points_ccw(&self) -> Points<'_, Self::Scalar>ⓘ
[src]
Iterate over the points in a counter-clockwise order
The Linestring isn’t changed, and the points are returned either in order, or in reverse order, so that the resultant order makes it appear counter-clockwise
fn make_cw_winding(&mut self)
[src]
Change this line’s points so they are in clockwise winding order
fn make_ccw_winding(&mut self)
[src]
Change this line’s points so they are in counterclockwise winding order