pub struct TerrainSource {
pub enabled: bool,
pub vertical_exaggeration: f64,
pub mesh_resolution: u16,
pub skirt_depth: f64,
pub cache_capacity: usize,
pub factory: TerrainSourceFactory,
}Expand description
Terrain source entry.
Fields§
§enabled: boolWhether terrain is enabled.
vertical_exaggeration: f64Terrain vertical exaggeration.
mesh_resolution: u16Terrain mesh resolution.
skirt_depth: f64Terrain skirt depth in meters.
cache_capacity: usizeTerrain cache capacity.
factory: TerrainSourceFactoryFactory used to build a fresh elevation source each time the style is applied.
Implementations§
Source§impl TerrainSource
impl TerrainSource
Sourcepub fn new(
factory: impl Fn() -> Box<dyn ElevationSource> + Send + Sync + 'static,
) -> Self
pub fn new( factory: impl Fn() -> Box<dyn ElevationSource> + Send + Sync + 'static, ) -> Self
Create a terrain source from an elevation-source factory.
Sourcepub fn with_cache_capacity(self, cache_capacity: usize) -> Self
pub fn with_cache_capacity(self, cache_capacity: usize) -> Self
Set terrain cache capacity.
Sourcepub fn to_terrain_config(&self) -> TerrainConfig
pub fn to_terrain_config(&self) -> TerrainConfig
Convert this style terrain source to a terrain config using a fresh source instance.
Trait Implementations§
Source§impl Clone for TerrainSource
impl Clone for TerrainSource
Source§fn clone(&self) -> TerrainSource
fn clone(&self) -> TerrainSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TerrainSource
impl !RefUnwindSafe for TerrainSource
impl Send for TerrainSource
impl Sync for TerrainSource
impl Unpin for TerrainSource
impl UnsafeUnpin for TerrainSource
impl !UnwindSafe for TerrainSource
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