Struct dotrix_terrain::Terrain [−][src]
pub struct Terrain {
pub view_distance: f32,
pub max_lod: usize,
pub tile_size: usize,
pub spawn_if_moved_by: f32,
pub force_spawn: bool,
pub heightmap: Box<dyn Heightmap>,
pub texture: Id<Texture>,
pub texture_heights: Vec<f32>,
}
Expand description
Terrain manager (configuration)
Fields
view_distance: f32
How far the terrain chunks should be spawned (default 500.0)
max_lod: usize
The lowest lod number (default 4)
tile_size: usize
Number of polygons per chunk side (default 240)
spawn_if_moved_by: f32
Terrain will be recalclated only if viewer has moved by that value (default 16*16=256)
force_spawn: bool
Flag to perform force terrain recalculation
heightmap: Box<dyn Heightmap>
Heights source
texture: Id<Texture>
Id of the terrain for texturing
texture_heights: Vec<f32>
List of the terrain heights to determine UV of the texture
Implementations
Constructs new terrain manager
Generates terrain mesh
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Terrain
impl !UnwindSafe for Terrain
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more