pub struct HeightMap {
pub height: u32,
pub width: u32,
pub seed: u32,
pub data: HeightMapData,
}Fields§
§height: u32§width: u32§seed: u32§data: HeightMapDataImplementations§
Source§impl HeightMap
impl HeightMap
Sourcepub fn new(height: u32, width: u32, seed: u32) -> HeightMap
pub fn new(height: u32, width: u32, seed: u32) -> HeightMap
Creates a new HeightMap instance.
§Examples
use world_gen::heightmap::HeightMap;
let height = 300;
let width = 400;
let seed = 12345;
let map = HeightMap::new(height, width, seed);
for x in 0..height {
for y in 0..width {
// Iterates over each point in the heightmap
}
}Auto Trait Implementations§
impl Freeze for HeightMap
impl RefUnwindSafe for HeightMap
impl Send for HeightMap
impl Sync for HeightMap
impl Unpin for HeightMap
impl UnsafeUnpin for HeightMap
impl UnwindSafe for HeightMap
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> 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