aboutsummaryrefslogtreecommitdiff
path: root/src/spectrum.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/spectrum.rs')
-rw-r--r--src/spectrum.rs13
1 files changed, 13 insertions, 0 deletions
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] }
+ }
+}