pub struct HillshadeLayer { /* private fields */ }Expand description
Backend-owned hillshade styling parameters.
These parameters are consumed by renderers when drawing terrain. The layer itself does not fetch tiles or generate meshes; it only contributes shading state to the frame, similar to a style layer.
Implementations§
Source§impl HillshadeLayer
impl HillshadeLayer
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Create a hillshade layer with conservative MapLibre-like defaults.
Sourcepub fn highlight_color(&self) -> [f32; 4]
pub fn highlight_color(&self) -> [f32; 4]
RGBA colour used for lit slopes.
Sourcepub fn shadow_color(&self) -> [f32; 4]
pub fn shadow_color(&self) -> [f32; 4]
RGBA colour used for shadowed slopes.
Sourcepub fn accent_color(&self) -> [f32; 4]
pub fn accent_color(&self) -> [f32; 4]
RGBA accent colour mixed onto steeper terrain.
Sourcepub fn illumination_direction_deg(&self) -> f32
pub fn illumination_direction_deg(&self) -> f32
Illumination direction in degrees clockwise from north.
Sourcepub fn illumination_altitude_deg(&self) -> f32
pub fn illumination_altitude_deg(&self) -> f32
Illumination altitude in degrees above the horizon.
Sourcepub fn exaggeration(&self) -> f32
pub fn exaggeration(&self) -> f32
Vertical emphasis applied to the hillshade effect only.
Sourcepub fn set_highlight_color(&mut self, color: [f32; 4])
pub fn set_highlight_color(&mut self, color: [f32; 4])
Set highlight colour.
Sourcepub fn set_shadow_color(&mut self, color: [f32; 4])
pub fn set_shadow_color(&mut self, color: [f32; 4])
Set shadow colour.
Sourcepub fn set_accent_color(&mut self, color: [f32; 4])
pub fn set_accent_color(&mut self, color: [f32; 4])
Set accent colour.
Sourcepub fn set_illumination_direction_deg(&mut self, direction_deg: f32)
pub fn set_illumination_direction_deg(&mut self, direction_deg: f32)
Set illumination direction in degrees clockwise from north.
Sourcepub fn set_illumination_altitude_deg(&mut self, altitude_deg: f32)
pub fn set_illumination_altitude_deg(&mut self, altitude_deg: f32)
Set illumination altitude in degrees above the horizon.
Sourcepub fn set_exaggeration(&mut self, exaggeration: f32)
pub fn set_exaggeration(&mut self, exaggeration: f32)
Set hillshade exaggeration multiplier.
Sourcepub fn effective_params(&self) -> HillshadeParams
pub fn effective_params(&self) -> HillshadeParams
Return the effective renderer-facing parameter snapshot.
Trait Implementations§
Source§impl Clone for HillshadeLayer
impl Clone for HillshadeLayer
Source§fn clone(&self) -> HillshadeLayer
fn clone(&self) -> HillshadeLayer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HillshadeLayer
impl Debug for HillshadeLayer
Source§impl Layer for HillshadeLayer
impl Layer for HillshadeLayer
Source§fn set_visible(&mut self, visible: bool)
fn set_visible(&mut self, visible: bool)
Source§fn set_opacity(&mut self, opacity: f32)
fn set_opacity(&mut self, opacity: f32)
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
&mut dyn Any for mutable concrete type access.