pub struct ChunkGenerator {
pub config: TerrainConfig,
}Expand description
Generates terrain chunks from scratch for a given coord.
Fields§
§config: TerrainConfigImplementations§
Source§impl ChunkGenerator
impl ChunkGenerator
pub fn new(config: TerrainConfig) -> Self
Sourcepub fn generate(&self, coord: ChunkCoord) -> TerrainChunk
pub fn generate(&self, coord: ChunkCoord) -> TerrainChunk
Generate a fully-initialized chunk for the given coordinate.
Sourcepub fn generate_lod(&self, coord: ChunkCoord, lod: u8) -> TerrainChunk
pub fn generate_lod(&self, coord: ChunkCoord, lod: u8) -> TerrainChunk
Generate a LOD-reduced chunk (lower resolution heightmap).
Auto Trait Implementations§
impl Freeze for ChunkGenerator
impl RefUnwindSafe for ChunkGenerator
impl Send for ChunkGenerator
impl Sync for ChunkGenerator
impl Unpin for ChunkGenerator
impl UnsafeUnpin for ChunkGenerator
impl UnwindSafe for ChunkGenerator
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