pub struct NavSearch { /* private fields */ }Expand description
Incremental Dijkstra search. Each node scan and outgoing edge consumes a path work unit. A mesh edit invalidates the search, including an existing result.
Implementations§
Sourcepub fn step(
&mut self,
mesh: &NavMesh,
budget: &mut WorkBudget,
) -> Result<bool, NavigationError>
pub fn step( &mut self, mesh: &NavMesh, budget: &mut WorkBudget, ) -> Result<bool, NavigationError>
Returns true only when the route is complete; NoPath or mesh edits fail. Up to 2048 distance comparisons select a node; one unit accounts that scan.
pub fn route<'a>( &'a self, mesh: &NavMesh, ) -> Result<&'a [NavWaypoint], NavigationError>
Auto Trait Implementations§
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