pub trait Knearest<T: Aabb> {
fn distance_to_aaline<A: Axis>(
&mut self,
point: Vec2<T::Num>,
axis: A,
val: T::Num
) -> T::Num;
fn distance_to_broad(
&mut self,
point: Vec2<T::Num>,
a: AabbPin<&mut T>
) -> Option<T::Num>;
fn distance_to_fine(
&mut self,
point: Vec2<T::Num>,
a: AabbPin<&mut T>
) -> T::Num;
}
Expand description
The geometric functions that the user must provide.
Required Methods
User define distance function from a point to an axis aligned line of infinite length.
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.