Skip to main content

BlendingField

Trait BlendingField 

Source
pub trait BlendingField:
    Copy
    + Send
    + Sync
    + 'static {
    // Required method
    fn weight(&self, p: Vec3) -> f32;

    // Provided method
    fn gradient(&self, p: Vec3) -> Vec3 { ... }
}
Expand description

weight is 0 for pure A and 1 for pure B, and must be C¹: the integrator differentiates it.

Required Methods§

Source

fn weight(&self, p: Vec3) -> f32

Implementations must clamp to [0, 1].

Provided Methods§

Source

fn gradient(&self, p: Vec3) -> Vec3

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§