pub enum LightSource {
Distant {
azimuth: f32,
elevation: f32,
},
Point {
x: f32,
y: f32,
z: f32,
},
Spot {
x: f32,
y: f32,
z: f32,
points_at_x: f32,
points_at_y: f32,
points_at_z: f32,
specular_exponent: f32,
limiting_cone_angle: Option<f32>,
},
}Expand description
Light source configurations for lighting effects.
Defines different types of light sources used in diffuse and specular lighting filter primitives. Each type has different characteristics and use cases.
Variants§
Distant
Distant light source (infinitely far away, like the sun).
All rays are parallel, creating uniform lighting across the surface. Direction is specified using spherical coordinates (azimuth and elevation).
Fields
Point
Point light source at a specific 3D position.
Light radiates uniformly in all directions from a single point. Intensity decreases with distance. Like a light bulb.
Fields
Spot
Spot light with position, direction, and cone angle.
Light emanates from a point in a specific direction with limited spread. Like a flashlight or stage spotlight with adjustable focus.
Trait Implementations§
Source§impl Clone for LightSource
impl Clone for LightSource
Source§fn clone(&self) -> LightSource
fn clone(&self) -> LightSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LightSource
impl Debug for LightSource
Source§impl PartialEq for LightSource
impl PartialEq for LightSource
Source§fn eq(&self, other: &LightSource) -> bool
fn eq(&self, other: &LightSource) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LightSource
Auto Trait Implementations§
impl Freeze for LightSource
impl RefUnwindSafe for LightSource
impl Send for LightSource
impl Sync for LightSource
impl Unpin for LightSource
impl UnsafeUnpin for LightSource
impl UnwindSafe for LightSource
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