pub struct DirectionalLight3d { /* private fields */ }Expand description
One directional source whose direction points from a surface toward the light.
Implementations§
Source§impl DirectionalLight3d
impl DirectionalLight3d
Sourcepub fn new(
direction_toward_light: Vec3,
color: Color,
intensity: f32,
) -> Result<Self, Lighting3dError>
pub fn new( direction_toward_light: Vec3, color: Color, intensity: f32, ) -> Result<Self, Lighting3dError>
Normalizes a nonzero finite direction robustly, without generating normals.
Color is normalized opaque linear RGB; intensity must be finite in 0..=1.
Trait Implementations§
Source§impl Clone for DirectionalLight3d
impl Clone for DirectionalLight3d
impl Copy for DirectionalLight3d
Source§impl Debug for DirectionalLight3d
impl Debug for DirectionalLight3d
Source§impl PartialEq for DirectionalLight3d
impl PartialEq for DirectionalLight3d
impl StructuralPartialEq for DirectionalLight3d
Auto Trait Implementations§
impl Freeze for DirectionalLight3d
impl RefUnwindSafe for DirectionalLight3d
impl Send for DirectionalLight3d
impl Sync for DirectionalLight3d
impl Unpin for DirectionalLight3d
impl UnsafeUnpin for DirectionalLight3d
impl UnwindSafe for DirectionalLight3d
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