pub struct TerrainHeightmapBuilder { /* private fields */ }Expand description
A builder for compositing multiple terrain generation steps.
Implementations§
Source§impl TerrainHeightmapBuilder
impl TerrainHeightmapBuilder
pub fn new(width: usize, height: usize) -> Self
pub fn diamond_square(self, roughness: f32, seed: u64) -> Self
pub fn fractal_noise( self, octaves: usize, lacunarity: f32, persistence: f32, scale: f32, seed: u64, ) -> Self
pub fn voronoi_plates(self, num_plates: usize, seed: u64) -> Self
pub fn perlin(self, octaves: usize, scale: f32, seed: u64) -> Self
pub fn hydraulic_erosion( self, iterations: usize, rain: f32, capacity: f32, evap: f32, seed: u64, ) -> Self
pub fn thermal_erosion(self, iterations: usize, talus: f32) -> Self
pub fn wind_erosion(self, iterations: usize, dir: Vec2) -> Self
pub fn terrace(self, levels: usize) -> Self
pub fn island_mask(self, falloff: f32) -> Self
pub fn normalize(self) -> Self
pub fn blur(self, radius: usize) -> Self
pub fn sharpen(self, amount: f32) -> Self
Auto Trait Implementations§
impl Freeze for TerrainHeightmapBuilder
impl RefUnwindSafe for TerrainHeightmapBuilder
impl Send for TerrainHeightmapBuilder
impl Sync for TerrainHeightmapBuilder
impl Unpin for TerrainHeightmapBuilder
impl UnsafeUnpin for TerrainHeightmapBuilder
impl UnwindSafe for TerrainHeightmapBuilder
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.