[][src]Trait tray_rust::texture::Texture

pub trait Texture {
    fn sample_f32(&self, u: f32, v: f32, time: f32) -> f32;
fn sample_color(&self, u: f32, v: f32, time: f32) -> Colorf; }

scalars or Colors can be computed on some image texture or procedural generator

Required methods

fn sample_f32(&self, u: f32, v: f32, time: f32) -> f32

Sample the textured value at texture coordinates u,v at some time. u and v should be in [0, 1]

fn sample_color(&self, u: f32, v: f32, time: f32) -> Colorf

Loading content...

Implementors

impl Texture for AnimatedImage[src]

impl Texture for Image[src]

impl Texture for ConstantColor[src]

impl Texture for ConstantScalar[src]

impl Texture for UVColor[src]

Loading content...