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.