Trait SeparationDistance

Source
pub trait SeparationDistance<T>: DistanceTo<T> {
    // Required methods
    fn separation_distance(&self, other: &T) -> (GeoPosition, f32);
    fn sq_separation_distance(&self, other: &T) -> (GeoPosition, f32);
}
Expand description

Trait for types that can compute the minimum distance to separate self from other of type T.

Required Methods§

Source

fn separation_distance(&self, other: &T) -> (GeoPosition, f32)

In case of a collision between self and other, returns GeoPosition::Interior and the minimum distance to separate the two primitives. Otherwise, returns GeoPosition::Exterior and the minimum distance between the two primitives. (similar to DistanceTo::distance_to)

Source

fn sq_separation_distance(&self, other: &T) -> (GeoPosition, f32)

Implementors§