[−][src]Trait worldgen::noisemap::NoiseMapGeneratorBase
Base trait for noise maps. This trait containts functions relevent to the actual map generation, and is all that is required for constraints to generate a world.
NoiseMap
, ScaledNoiseMap
, and NoiseMapCombination
all implement
this trait.
Required methods
fn generate_chunk(&self, x: i64, y: i64) -> Vec<Vec<f64>>
Generates a specific chunk of the noise map.
This can be used to generate a larger map in smaller parts.
Example
for y in 0 .. 5 { for row in nm.generate_chunk(0, y).iter() { for value in row.iter() { print!("{}", value); } println!(""); } }
fn generate_sized_chunk(&self, size: Size, x: i64, y: i64) -> Vec<Vec<f64>>
Generate a chunk with a given size instead of the noisemap's size.
This is used when generating a world.
fn id(&self) -> u64
Return the unique id of the noisemap.