library: texture: add Texture trait definition
This commit is contained in:
parent
4052dd41d3
commit
63feed70c6
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in a new issue