library: texture: add Texture trait definition

This commit is contained in:
Bruno BELANYI 2020-03-17 19:08:56 +01:00
parent 4052dd41d3
commit 63feed70c6

View file

@ -0,0 +1,8 @@
use super::core::LinearColor;
use super::Point2D;
/// Represent an object's texture.
pub trait Texture: std::fmt::Debug {
/// Get the color at a given texel coordinate
fn texel_color(&self, point: Point2D) -> LinearColor;
}