pub trait ImplicitSurface {
// Required method
fn eval(&self, p: [f64; 3]) -> f64;
// Provided method
fn gradient(&self, p: [f64; 3]) -> [f64; 3] { ... }
}Expand description
Trait for implicit surface representations (Signed Distance Functions).
Implementors define a scalar field f: ℝ³ → ℝ where:
- f(p) < 0 means p is inside the surface
- f(p) = 0 means p is on the surface
- f(p) > 0 means p is outside the surface
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".