From 3ef8f4d918406eec6bdc29e0ebd883fabfac9b2e Mon Sep 17 00:00:00 2001 From: Julian T Date: Thu, 5 Aug 2021 15:44:40 +0200 Subject: Add picture for c5505ab84820248c6dba35fc06aef9e0ced183de --- src/material/diffuse_light.rs | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/material/diffuse_light.rs (limited to 'src/material/diffuse_light.rs') diff --git a/src/material/diffuse_light.rs b/src/material/diffuse_light.rs deleted file mode 100644 index fe462a8..0000000 --- a/src/material/diffuse_light.rs +++ /dev/null @@ -1,27 +0,0 @@ -use super::Material; -use crate::core::{Ray, Spectrum}; -use crate::Float; - -pub struct DiffuseLight { - color: Spectrum, -} - -impl DiffuseLight { - pub fn new(c: Spectrum) -> Self { - Self { - color: c, - } - } - - pub fn new_white(s: Float) -> Self { - Self { - color: Spectrum::new_rgb(s, s, s), - } - } -} - -impl Material for DiffuseLight { - fn emitted(&self, _: &Ray) -> Option { - Some(self.color) - } -} -- cgit v1.2.3