pub enum LightType {
Ambient,
Directional {
direction: Vec3D,
},
Point {
position: Vec3D,
},
}
Expand description
Type of light, determines how the normal of a face affects its illumination
Variants§
Ambient
Lights the entire scene equally. It’s good to have at least one of these so your models don’t go completely dark.
Directional
Lights the scene from a specific direction. A surface facing the specified direction will be lit with the most intensity and a surface facing away from the direction will be lit with the least intensity or no intensity at all
Point
Light comes from a postion in 3D space. This light type does not currently dissipate over distance, so can be represented with a single position
Trait Implementations§
impl Copy for LightType
impl StructuralPartialEq for LightType
Auto Trait Implementations§
impl Freeze for LightType
impl RefUnwindSafe for LightType
impl Send for LightType
impl Sync for LightType
impl Unpin for LightType
impl UnwindSafe for LightType
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