From 63feed70c629ace27011fcaf738d0bd0c07402f0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 17 Mar 2020 19:08:56 +0100 Subject: [PATCH] library: texture: add Texture trait definition --- src/texture/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/texture/mod.rs b/src/texture/mod.rs index e69de29..dd0b924 100644 --- a/src/texture/mod.rs +++ b/src/texture/mod.rs @@ -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; +}