pub struct DirectionalLight {
pub direction: [f32; 2],
pub color: [f32; 3],
pub intensity: f32,
pub cast_shadows: bool,
}Expand description
Directional (sun) light parameters.
A single infinitely-distant directional light source, equivalent to
Mapbox’s "directional" light type.
Fields§
§direction: [f32; 2]Light direction toward the light source, in world space.
Encoded as [azimuth_deg, altitude_deg]:
azimuth_deg: compass bearing of the sun (0 = north, 90 = east). Default:210.0(south-west, matching Mapbox’s default).altitude_deg: elevation angle above the horizon. Default:45.0.
color: [f32; 3]Directional light colour (linear RGB, 0–1). Default: white.
intensity: f32Directional intensity multiplier. Default: 0.5.
cast_shadows: boolWhether this light should cast shadows (reserved for Phase 7
cascaded shadow maps). Default: false.
Trait Implementations§
Source§impl Clone for DirectionalLight
impl Clone for DirectionalLight
Source§fn clone(&self) -> DirectionalLight
fn clone(&self) -> DirectionalLight
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 moreSource§impl Debug for DirectionalLight
impl Debug for DirectionalLight
Source§impl Default for DirectionalLight
impl Default for DirectionalLight
Source§impl PartialEq for DirectionalLight
impl PartialEq for DirectionalLight
impl StructuralPartialEq for DirectionalLight
Auto Trait Implementations§
impl Freeze for DirectionalLight
impl RefUnwindSafe for DirectionalLight
impl Send for DirectionalLight
impl Sync for DirectionalLight
impl Unpin for DirectionalLight
impl UnsafeUnpin for DirectionalLight
impl UnwindSafe for DirectionalLight
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