[][src]Trait broccoli::query::Knearest

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

The geometric functions that the user must provide.

Associated Types

type T: Aabb<Num = Self::N>[src]

type N: Num[src]

Loading content...

Required methods

pub fn distance_to_rect(
    &mut self,
    point: Vec2<Self::N>,
    rect: &Rect<Self::N>
) -> Self::N
[src]

Loading content...

Provided methods

pub fn distance_to_bot(
    &mut self,
    point: Vec2<Self::N>,
    bot: &Self::T
) -> Self::N
[src]

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...