pub struct Naive<'a, T> { /* private fields */ }
Expand description
Easily verifiable naive query algorithms.
Implementations
sourceimpl<'a, T: Aabb> Naive<'a, T>
impl<'a, T: Aabb> Naive<'a, T>
pub fn find_knearest(
&mut self,
point: Vec2<T::Num>,
num: usize,
ktrait: impl Knearest<T>
) -> KResult<'_, T>
pub fn find_knearest_closure(
&mut self,
point: Vec2<T::Num>,
num: usize,
broad: impl FnMut(Vec2<T::Num>, AabbPin<&mut T>) -> Option<T::Num>,
fine: impl FnMut(Vec2<T::Num>, AabbPin<&mut T>) -> T::Num,
xline: impl FnMut(Vec2<T::Num>, T::Num) -> T::Num,
yline: impl FnMut(Vec2<T::Num>, T::Num) -> T::Num
) -> KResult<'_, T>
sourceimpl<'a, T: Aabb> Naive<'a, T>
impl<'a, T: Aabb> Naive<'a, T>
pub fn cast_ray_closure(
&mut self,
ray: Ray<T::Num>,
broad: impl FnMut(&Ray<T::Num>, AabbPin<&mut T>) -> Option<CastResult<T::Num>>,
fine: impl FnMut(&Ray<T::Num>, AabbPin<&mut T>) -> CastResult<T::Num>,
xline: impl FnMut(&Ray<T::Num>, T::Num) -> CastResult<T::Num>,
yline: impl FnMut(&Ray<T::Num>, T::Num) -> CastResult<T::Num>
) -> CastResult<CastAnswer<'_, T>>
pub fn cast_ray<R: RayCast<T>>(
&mut self,
ray: Ray<T::Num>,
ar: R
) -> CastResult<CastAnswer<'_, T>>
sourceimpl<'a, T: Aabb> Naive<'a, T>
impl<'a, T: Aabb> Naive<'a, T>
pub fn find_all_not_in_rect<'b, K: Aabb<Num = T::Num>>(
&'b mut self,
rect: AabbPin<&mut K>,
closure: impl FnMut(AabbPin<&mut K>, AabbPin<&'b mut T>)
)
pub fn find_all_in_rect<'b, K: Aabb<Num = T::Num>>(
&'b mut self,
rect: AabbPin<&mut K>,
closure: impl FnMut(AabbPin<&mut K>, AabbPin<&'b mut T>)
)
pub fn find_all_intersect_rect<'b, K: Aabb<Num = T::Num>>(
&'b mut self,
rect: AabbPin<&mut K>,
closure: impl FnMut(AabbPin<&mut K>, AabbPin<&'b mut T>)
)
sourceimpl<'a, T: Aabb> Naive<'a, T>
impl<'a, T: Aabb> Naive<'a, T>
pub fn handle_nbody<N: Nbody<T = T>>(&mut self, no: &mut N)
sourceimpl<'a, T: Aabb> Naive<'a, T>
impl<'a, T: Aabb> Naive<'a, T>
pub fn new(inner: &'a mut [T]) -> Self
pub fn from_pinned(inner: AabbPin<&'a mut [T]>) -> Self
pub fn iter_mut(&mut self) -> AabbPinIter<'_, T>ⓘNotable traits for AabbPinIter<'a, T>impl<'a, T> Iterator for AabbPinIter<'a, T> type Item = AabbPin<&'a mut T>;
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Naive<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for Naive<'a, T> where
T: Send,
impl<'a, T> Sync for Naive<'a, T> where
T: Sync,
impl<'a, T> Unpin for Naive<'a, T>
impl<'a, T> !UnwindSafe for Naive<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more