pub struct PathFinder {
max_visited_nodes: i32,
open_set: NodeHeap,
}Fields§
§max_visited_nodes: i32§open_set: NodeHeapImplementations§
Source§impl PathFinder
impl PathFinder
pub const fn new(max_visited_nodes: i32) -> Self
pub const fn max_visited_nodes(&self) -> i32
pub const fn set_max_visited_nodes(&mut self, max_visited_nodes: i32)
pub fn find_path( &mut self, evaluator: &mut WalkNodeEvaluator, context: &mut PathfindingContext<'_>, collision: &mut impl WalkNodeCollision, request: PathRequest<'_>, ) -> Option<Path>
fn prepare_search( &mut self, evaluator: &mut WalkNodeEvaluator, from: i32, targets: &[BlockPos], ) -> Option<(NodePoint, Vec<PathTarget>)>
fn get_best_h(from: &Node, targets: &mut [PathTarget]) -> f32
fn best_reached_path( evaluator: &WalkNodeEvaluator, targets: &[PathTarget], reached_targets: &[usize], ) -> Option<Path>
fn best_unreached_path( evaluator: &WalkNodeEvaluator, targets: &[PathTarget], ) -> Option<Path>
fn reconstruct_path( evaluator: &WalkNodeEvaluator, closest: Option<i32>, target: BlockPos, reached: bool, ) -> Option<Path>
Trait Implementations§
Source§impl Clone for PathFinder
impl Clone for PathFinder
Source§fn clone(&self) -> PathFinder
fn clone(&self) -> PathFinder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathFinder
impl Debug for PathFinder
Source§impl Default for PathFinder
impl Default for PathFinder
impl Eq for PathFinder
Source§impl PartialEq for PathFinder
impl PartialEq for PathFinder
impl StructuralPartialEq for PathFinder
Auto Trait Implementations§
impl Freeze for PathFinder
impl RefUnwindSafe for PathFinder
impl Send for PathFinder
impl Sync for PathFinder
impl Unpin for PathFinder
impl UnsafeUnpin for PathFinder
impl UnwindSafe for PathFinder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self with key and returns true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>