Skip to main content

DistanceField

Trait DistanceField 

Source
pub trait DistanceField: Send + Sync {
    // Required methods
    fn field_kind(&self) -> FieldKind;
    fn dimension(&self) -> u32;
    fn distance(&self, point: [f32; 4]) -> f32;
    fn error_at(&self, point: [f32; 4]) -> f32;

    // Provided method
    fn gradient(&self, point: [f32; 4]) -> [f32; 4] { ... }
}
Expand description

distance returns the Euclidean value described by field_kind in the first dimension coordinates, off by at most error_at at the query point.

Required Methods§

Source

fn field_kind(&self) -> FieldKind

Source

fn dimension(&self) -> u32

Source

fn distance(&self, point: [f32; 4]) -> f32

Source

fn error_at(&self, point: [f32; 4]) -> f32

Provided Methods§

Source

fn gradient(&self, point: [f32; 4]) -> [f32; 4]

Implementors§