pathtracer/src/material/mod.rs
Bruno BELANYI d785800bfe library: material: split Material into trait
The former `Material` type is now `UniformMaterial` and implements the
`Material` trait.
2020-03-17 19:29:05 +01:00

14 lines
413 B
Rust

use super::core::color::LinearColor;
use super::Point2D;
/// Represent the physical light properties of an object in the scene;
pub trait Material: std::fmt::Debug {
/// The diffuse component on a texel point.
fn diffuse(&self, point: Point2D) -> LinearColor;
/// The specular component on a texel point.
fn specular(&self, point: Point2D) -> LinearColor;
}
pub mod uniform;
pub use uniform::*;