library: light: add Light trait definition

This commit is contained in:
Bruno BELANYI 2020-03-16 15:18:29 +01:00
parent c0e21d2f66
commit 20d9103d39

View file

@ -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;
}