pub struct BuildingGenerator<'a> { /* private fields */ }Expand description
Generator for Buildings
Implementations§
Source§impl<'a> BuildingGenerator<'a>
impl<'a> BuildingGenerator<'a>
Sourcepub fn new(
scale_factor: f64,
part: i32,
part_count: i32,
) -> BuildingGenerator<'static>
pub fn new( scale_factor: f64, part: i32, part_count: i32, ) -> BuildingGenerator<'static>
Creates a new BuildingGenerator with the given scale factor
Note the generator’s lifetime is &'static. See BuildingGenerator for
more details.
Sourcepub fn new_with_distributions_and_text_pool<'b>(
scale_factor: f64,
part: i32,
part_count: i32,
distributions: &'b Distributions,
text_pool: &'b TextPool,
spatial_gen: SpatialGenerator,
) -> BuildingGenerator<'b>
pub fn new_with_distributions_and_text_pool<'b>( scale_factor: f64, part: i32, part_count: i32, distributions: &'b Distributions, text_pool: &'b TextPool, spatial_gen: SpatialGenerator, ) -> BuildingGenerator<'b>
Creates a BuildingGenerator with specified distributions and text pool
Sourcepub fn calculate_row_count(scale_factor: f64, part: i32, part_count: i32) -> i64
pub fn calculate_row_count(scale_factor: f64, part: i32, part_count: i32) -> i64
Return the row count for the given scale factor and generator part count
Sourcepub fn iter(&self) -> BuildingGeneratorIterator<'a> ⓘ
pub fn iter(&self) -> BuildingGeneratorIterator<'a> ⓘ
Returns an iterator over the part rows
Trait Implementations§
Source§impl<'a> Clone for BuildingGenerator<'a>
impl<'a> Clone for BuildingGenerator<'a>
Source§fn clone(&self) -> BuildingGenerator<'a>
fn clone(&self) -> BuildingGenerator<'a>
Returns a duplicate 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 moreSource§impl<'a> Debug for BuildingGenerator<'a>
impl<'a> Debug for BuildingGenerator<'a>
Source§impl<'a> IntoIterator for &'a BuildingGenerator<'a>
impl<'a> IntoIterator for &'a BuildingGenerator<'a>
Auto Trait Implementations§
impl<'a> !Freeze for BuildingGenerator<'a>
impl<'a> RefUnwindSafe for BuildingGenerator<'a>
impl<'a> Send for BuildingGenerator<'a>
impl<'a> Sync for BuildingGenerator<'a>
impl<'a> Unpin for BuildingGenerator<'a>
impl<'a> UnsafeUnpin for BuildingGenerator<'a>
impl<'a> UnwindSafe for BuildingGenerator<'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
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