#[non_exhaustive]pub struct LightSpec {
pub azimuth_deg: f32,
pub elevation_deg: f32,
pub intensity: f32,
}Expand description
-light AZIMUTH,ELEVATION,INTENSITY — directional light override
for the 3D→raster renderer.
azimuth and elevation are in degrees; intensity is a unit
scalar in [0.0, ~] multiplied into the diffuse term. The
renderer always also applies a small constant ambient term so
back-faces stay visible.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.azimuth_deg: f32§elevation_deg: f32§intensity: f32Implementations§
Source§impl LightSpec
impl LightSpec
Sourcepub fn new(azimuth_deg: f32, elevation_deg: f32, intensity: f32) -> Self
pub fn new(azimuth_deg: f32, elevation_deg: f32, intensity: f32) -> Self
A directional light from azimuth_deg / elevation_deg at
intensity (clamped to >= 0.0).
Sourcepub fn default_light() -> Self
pub fn default_light() -> Self
Default directional light: from the upper-right-front quadrant
at unit intensity. Matches the renderer baseline so explicit
-light is never required.
Trait Implementations§
impl Copy for LightSpec
impl StructuralPartialEq for LightSpec
Auto Trait Implementations§
impl Freeze for LightSpec
impl RefUnwindSafe for LightSpec
impl Send for LightSpec
impl Sync for LightSpec
impl Unpin for LightSpec
impl UnsafeUnpin for LightSpec
impl UnwindSafe for LightSpec
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