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

pub trait Knearest {
    type T: Aabb<Num = Self::N>;
    type N: Num;
    pub fn distance_to_aaline<A: Axis>(
        &mut self,
        point: Vec2<Self::N>,
        axis: A,
        val: Self::N
    ) -> Self::N;
pub fn distance_to_broad(
        &mut self,
        point: Vec2<Self::N>,
        a: PMut<'_, Self::T>
    ) -> Option<Self::N>;
pub fn distance_to_fine(
        &mut self,
        point: Vec2<Self::N>,
        a: PMut<'_, 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_aaline<A: Axis>(
    &mut self,
    point: Vec2<Self::N>,
    axis: A,
    val: Self::N
) -> Self::N
[src]

User define distance function from a point to an axis aligned line of infinite length.

pub fn distance_to_broad(
    &mut self,
    point: Vec2<Self::N>,
    a: PMut<'_, Self::T>
) -> Option<Self::N>
[src]

User defined inexpensive distance function that that can be overly conservative. It may be that the precise distance function is fast enough, in which case you can simply return None. If None is desired, every call to this function for a particular element must always return None.

pub fn distance_to_fine(
    &mut self,
    point: Vec2<Self::N>,
    a: PMut<'_, 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...