pub struct Normal {}Expand description
Almost Identical to the lambertian, but the color is dynamically determined by the normal vector at the hit point.
Implementations§
Trait Implementations§
Source§impl Material for Normal
impl Material for Normal
Source§fn scatter(
&self,
_r_in: &Ray,
rec: &HitRecord,
attenuation: &mut Color,
scattered: &mut Ray,
) -> bool
fn scatter( &self, _r_in: &Ray, rec: &HitRecord, attenuation: &mut Color, scattered: &mut Ray, ) -> bool
Given an incoming ray and a hit record, this function should return a boolean indicating if the ray was scattered, and modify the input variables to reflect the scattered ray, colors, and other properties. Read more
Auto Trait Implementations§
impl Freeze for Normal
impl RefUnwindSafe for Normal
impl Send for Normal
impl Sync for Normal
impl Unpin for Normal
impl UnsafeUnpin for Normal
impl UnwindSafe for Normal
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