From 33a35c50c20e863123642c8c9ea31dfc006945f6 Mon Sep 17 00:00:00 2001 From: Julian T Date: Mon, 25 Jan 2021 14:43:46 +0100 Subject: Started work on implementing vectors bounding and film --- src/spectrum.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/spectrum.rs (limited to 'src/spectrum.rs') diff --git a/src/spectrum.rs b/src/spectrum.rs new file mode 100644 index 0000000..aa37056 --- /dev/null +++ b/src/spectrum.rs @@ -0,0 +1,13 @@ +use crate::Float; + +// TODO implement SampledSpectrum instead for nicer images + +pub struct Spectrum { + c: [Float; 3], +} + +impl Spectrum { + fn from_rgb(r: Float, g: Float, b: Float) -> Spectrum { + Spectrum { c: [r, g, b] } + } +} -- cgit v1.2.3