pub struct BoundaryFillHPG {
pub n_visited: usize,
pub seeded: bool,
/* private fields */
}
Fields§
§n_visited: usize
§seeded: bool
Implementations§
Source§impl BoundaryFillHPG
impl BoundaryFillHPG
pub fn new<T>(grid: &Grid<T>, seed_bbox: &AARectangle) -> Self
Sourcepub fn pop(&mut self) -> Option<usize>
pub fn pop(&mut self) -> Option<usize>
Returns the next cell to visit and pops it from the queue, if there are no more cells to visit return None
Sourcepub fn report_position<T>(
&mut self,
index: usize,
position: GeoPosition,
grid: &Grid<T>,
)
pub fn report_position<T>( &mut self, index: usize, position: GeoPosition, grid: &Grid<T>, )
Reports if the cell was inside or outside the boundary of the update
Sourcepub fn reset<T>(self, grid: &Grid<T>, seed_bbox: &AARectangle) -> Self
pub fn reset<T>(self, grid: &Grid<T>, seed_bbox: &AARectangle) -> Self
Resets the state of the boundary fill algorithm, with a new seedbox
Trait Implementations§
Source§impl Clone for BoundaryFillHPG
impl Clone for BoundaryFillHPG
Source§fn clone(&self) -> BoundaryFillHPG
fn clone(&self) -> BoundaryFillHPG
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BoundaryFillHPG
impl RefUnwindSafe for BoundaryFillHPG
impl Send for BoundaryFillHPG
impl Sync for BoundaryFillHPG
impl Unpin for BoundaryFillHPG
impl UnwindSafe for BoundaryFillHPG
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more