pub trait ParametricSurface: Send + Sync {
// Required method
fn evaluate(&self, u: f32, v: f32) -> Vec3;
// Provided methods
fn normal(&self, u: f32, v: f32) -> Vec3 { ... }
fn color(&self, _u: f32, _v: f32) -> Vec4 { ... }
}Expand description
A parametric surface defined by a function f(u,v) → position.