Skip to main content

Sdf

pub trait Sdf: Send + Sync {
    // Required method
    fn dist(&self, p: [f64; 3]) -> f64;
}
Expand description

Signed distance function trait.

Implementors return the signed distance from point p to the surface: negative inside, zero on surface, positive outside.

Required Methods§

Source

fn dist(&self, p: [f64; 3]) -> f64

Evaluate the signed distance at p.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§