pub struct Node {}Fields§
§x: i32§y: i32§z: i32§hash: i32§heap_idx: i32§g: f32§h: f32§f: f32§came_from: Option<i32>§closed: bool§walked_distance: f32§cost_malus: f32§path_type: PathTypeImplementations§
Source§impl Node
impl Node
pub const fn new(x: i32, y: i32, z: i32) -> Self
pub const fn clone_and_move(&self, x: i32, y: i32, z: i32) -> Self
pub const fn create_hash(x: i32, y: i32, z: i32) -> i32
pub const fn hash(&self) -> i32
pub fn distance_to(&self, to: &Self) -> f32
pub fn distance_to_pos(&self, pos: BlockPos) -> f32
pub fn distance_manhattan_to_pos(&self, pos: BlockPos) -> f32
pub fn distance_to_sqr(&self, to: &Self) -> f32
pub fn distance_manhattan(&self, to: &Self) -> f32
pub const fn as_block_pos(&self) -> BlockPos
pub fn as_vec3(&self) -> DVec3
pub const fn in_open_set(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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<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<>>