pub struct FindNearestPolyQuery<'a> { /* private fields */ }Expand description
Finds the nearest polygon to a point.
This is equivalent to the C++ dtFindNearestPolyQuery class.
Implementations§
Source§impl<'a> FindNearestPolyQuery<'a>
impl<'a> FindNearestPolyQuery<'a>
Sourcepub fn new(query: &'a NavMeshQuery<'a>, center: &[f32; 3]) -> Self
pub fn new(query: &'a NavMeshQuery<'a>, center: &[f32; 3]) -> Self
Creates a new FindNearestPolyQuery.
pub fn nearest_ref(&self) -> PolyRef
pub fn nearest_point(&self) -> &[f32; 3]
Sourcepub fn is_over_poly(&self) -> bool
pub fn is_over_poly(&self) -> bool
True if the nearest point is directly over the polygon surface.
pub fn nearest_distance_sqr(&self) -> f32
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FindNearestPolyQuery<'a>
impl<'a> RefUnwindSafe for FindNearestPolyQuery<'a>
impl<'a> Send for FindNearestPolyQuery<'a>
impl<'a> Sync for FindNearestPolyQuery<'a>
impl<'a> Unpin for FindNearestPolyQuery<'a>
impl<'a> UnsafeUnpin for FindNearestPolyQuery<'a>
impl<'a> UnwindSafe for FindNearestPolyQuery<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more