[][src]Trait dinotree_alg::query::Knearest

pub trait Knearest {
    type T: HasAabb<Num = Self::N>;
    type N: NumTrait;
    fn distance_to_rect(
        &self,
        point: Vec2<Self::N>,
        rect: &Rect<Self::N>
    ) -> Self::N; fn distance_to_bot(&self, point: Vec2<Self::N>, bot: &Self::T) -> Self::N { ... } }

The geometric functions that the user must provide.

Associated Types

type T: HasAabb<Num = Self::N>

type N: NumTrait

Loading content...

Required methods

fn distance_to_rect(
    &self,
    point: Vec2<Self::N>,
    rect: &Rect<Self::N>
) -> Self::N

Loading content...

Provided methods

fn distance_to_bot(&self, point: Vec2<Self::N>, bot: &Self::T) -> Self::N

User defined expensive distance function. Here the user can return fine-grained distance of the shape contained in T instead of its bounding box.

Loading content...

Implementors

Loading content...