pub struct DirectionalLight {
pub direction: Vec3,
pub color: Rgb,
pub ambient: f32,
}Expand description
A directional light: a parallel light ray direction plus color/strength. 方向光:一条平行光线方向加上颜色/强度。
Fields§
§direction: Vec3Ray direction (not a position); will be normalized by the renderer. 光线方向(不是位置);渲染器会将其归一化。
color: RgbLight color and strength. 光的颜色和强度。
ambient: f32Base brightness added to every lit surface. 添加到每个被照亮表面的基础亮度。
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl 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