library: light: add Light trait definition
This commit is contained in:
parent
c0e21d2f66
commit
20d9103d39
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in a new issue