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.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".