From 20d9103d39ee096f55519b8e5dc8bf75fc04ee71 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 16 Mar 2020 15:18:29 +0100 Subject: [PATCH] library: light: add Light trait definition --- src/light/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/light/mod.rs b/src/light/mod.rs index e69de29..93c46c7 100644 --- a/src/light/mod.rs +++ b/src/light/mod.rs @@ -0,0 +1,8 @@ +use super::core::LinearColor; +use super::Point; + +/// Represent a light in the scene being rendered. +pub trait Light: std::fmt::Debug { + /// Get the illumination of that light on that point. + fn illumination(&self, point: &Point) -> LinearColor; +}