pub struct PolygonFeatureView<'a, V: PolyVertex, A = ()> { /* private fields */ }Expand description
A borrowed view of one feature added to a PolygonSlicerAll.
Implementations§
Source§impl<'a, V: PolyVertex, A> PolygonFeatureView<'a, V, A>
impl<'a, V: PolyVertex, A> PolygonFeatureView<'a, V, A>
Sourcepub fn attr(&self) -> &'a A
pub fn attr(&self) -> &'a A
The feature’s attribute, as passed to
add_feature_with.
Sourcepub fn iter_tiles(
&self,
) -> impl Iterator<Item = PolygonTileView<'a, V, A>> + use<'a, V, A>
pub fn iter_tiles( &self, ) -> impl Iterator<Item = PolygonTileView<'a, V, A>> + use<'a, V, A>
Iterate the feature’s edge tiles — every tile a ring edge touches that received geometry — in
row-major order (by y, then x).
Sourcepub fn iter_fill_runs(&self) -> impl Iterator<Item = FillRun> + use<'a, V, A>
pub fn iter_fill_runs(&self) -> impl Iterator<Item = FillRun> + use<'a, V, A>
Iterate the feature’s fully covered tiles as FillRuns, in row-major order. Storage is per
run, not per tile, so a feature covering millions of tiles costs one run per row of them.
Sourcepub fn fill_ring(&self, run: &FillRun) -> [V; 5]
pub fn fill_ring(&self, run: &FillRun) -> [V; 5]
The ring PolygonSlicerOne emits for run’s polygon in each tile
of the run: the tile’s buffered box grown by one unit, tile-local and closed, all synthetic
vertices, wound like the polygon’s exterior. It is the polygon’s only ring there.
Trait Implementations§
Source§impl<V: PolyVertex, A> Clone for PolygonFeatureView<'_, V, A>
impl<V: PolyVertex, A> Clone for PolygonFeatureView<'_, V, A>
impl<V: PolyVertex, A> Copy for PolygonFeatureView<'_, V, A>
Auto Trait Implementations§
impl<'a, V, A> Freeze for PolygonFeatureView<'a, V, A>
impl<'a, V, A> RefUnwindSafe for PolygonFeatureView<'a, V, A>
impl<'a, V, A> Send for PolygonFeatureView<'a, V, A>
impl<'a, V, A> Sync for PolygonFeatureView<'a, V, A>
impl<'a, V, A> Unpin for PolygonFeatureView<'a, V, A>
impl<'a, V, A> UnsafeUnpin for PolygonFeatureView<'a, V, A>
impl<'a, V, A> UnwindSafe for PolygonFeatureView<'a, V, A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more