pub struct DirectionalLight {
pub direction: Vec3,
pub color: Rgb,
pub ambient: f32,
}Expand description
A directional light: one direction plus color and strength. 方向光:一个光照方向加上颜色与强度。
Fields§
§direction: Vec3Direction from a surface toward the light; not a position. The shading term
is normal · direction, so the renderer normalizes this and ignores its
length.
从表面指向光源的方向,不是位置。着色项为 normal · direction,因此渲染器会将其
归一化,长度被忽略。
color: RgbLight color and strength. 光的颜色和强度。
ambient: f32Base brightness added to every lit surface. 添加到每个被照亮表面的基础亮度。
Trait Implementations§
Source§impl Clone for DirectionalLight
impl Clone for DirectionalLight
impl Copy for DirectionalLight
Source§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