Trait veloren_common::util::find_dist::FindDist

source ·
pub trait FindDist<T> {
    // Required methods
    fn approx_in_range(self, other: T, range: f32) -> bool;
    fn min_distance(self, other: T) -> f32;
}

Required Methods§

source

fn approx_in_range(self, other: T, range: f32) -> bool

Compute roughly whether the other shape is out of range Meant to be a cheap method for initial filtering Must return true if the shape could be within the supplied distance but is allowed to return true if the shape is actually just out of range

source

fn min_distance(self, other: T) -> f32

Find the smallest distance between the two shapes

Implementations on Foreign Types§

source§

impl FindDist<Cylinder> for Vec3<f32>

source§

fn approx_in_range(self, other: Cylinder, range: f32) -> bool

source§

fn min_distance(self, other: Cylinder) -> f32

Implementors§