pub struct Ring<P: PointTrait, const CLOCKWISE: bool = true, const CLOSED: bool = true>(pub Vec<P>);Expand description
Default Ring — a Vec<P> newtype carrying closure and traversal
direction as const generics.
Mirrors boost::geometry::model::ring<Point, ClockWise, Closed>
from boost/geometry/geometries/ring.hpp:56-99. The defaults
(CLOCKWISE = true, CLOSED = true) match Boost’s defaults
(boost/geometry/geometries/ring.hpp:59).
Tuple Fields§
§0: Vec<P>Implementations§
Source§impl<P: PointTrait, const CW: bool, const CL: bool> Ring<P, CW, CL>
impl<P: PointTrait, const CW: bool, const CL: bool> Ring<P, CW, CL>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct an empty ring.
Mirrors the default ring() constructor at
boost/geometry/geometries/ring.hpp:71-73.
Trait Implementations§
Source§impl<P: Clone + PointTrait, const CLOCKWISE: bool, const CLOSED: bool> Clone for Ring<P, CLOCKWISE, CLOSED>
impl<P: Clone + PointTrait, const CLOCKWISE: bool, const CLOSED: bool> Clone for Ring<P, CLOCKWISE, CLOSED>
Source§impl<P: Debug + PointTrait, const CLOCKWISE: bool, const CLOSED: bool> Debug for Ring<P, CLOCKWISE, CLOSED>
impl<P: Debug + PointTrait, const CLOCKWISE: bool, const CLOSED: bool> Debug for Ring<P, CLOCKWISE, CLOSED>
Source§impl<P: PointTrait, const CW: bool, const CL: bool> Geometry for Ring<P, CW, CL>
Tag this concrete type as a Ring. Mirrors the
traits::tag<model::ring<...>> specialisation at
boost/geometry/geometries/ring.hpp:108-118.
impl<P: PointTrait, const CW: bool, const CL: bool> Geometry for Ring<P, CW, CL>
Tag this concrete type as a Ring. Mirrors the
traits::tag<model::ring<...>> specialisation at
boost/geometry/geometries/ring.hpp:108-118.
Source§impl<P: PartialEq + PointTrait, const CLOCKWISE: bool, const CLOSED: bool> PartialEq for Ring<P, CLOCKWISE, CLOSED>
impl<P: PartialEq + PointTrait, const CLOCKWISE: bool, const CLOSED: bool> PartialEq for Ring<P, CLOCKWISE, CLOSED>
Source§impl<A, const D: usize, OldCs, T, Cs, const CW: bool, const CL: bool> RebindGeometry<T, Cs> for Ring<Point<A, D, OldCs>, CW, CL>
impl<A, const D: usize, OldCs, T, Cs, const CW: bool, const CL: bool> RebindGeometry<T, Cs> for Ring<Point<A, D, OldCs>, CW, CL>
Source§impl<P: PointTrait, const CW: bool, const CL: bool> Ring for Ring<P, CW, CL>
Wire the Ring concept up. The points() iterator hands back
self.0.iter() — slice::Iter is already
ExactSizeIterator + Clone. The closure() and point_order()
methods read the two const-generic booleans, mirroring the four
traits::point_order / traits::closure specialisations at
boost/geometry/geometries/ring.hpp:121-168 that dispatch on the
same two template parameters.
impl<P: PointTrait, const CW: bool, const CL: bool> Ring for Ring<P, CW, CL>
Wire the Ring concept up. The points() iterator hands back
self.0.iter() — slice::Iter is already
ExactSizeIterator + Clone. The closure() and point_order()
methods read the two const-generic booleans, mirroring the four
traits::point_order / traits::closure specialisations at
boost/geometry/geometries/ring.hpp:121-168 that dispatch on the
same two template parameters.