pub struct PathFinder<'a, T> { /* private fields */ }Expand description
A* path finder on a hexagon map.
Implementations§
Source§impl<'a, T> PathFinder<'a, T>
impl<'a, T> PathFinder<'a, T>
Sourcepub fn with_passable<F>(self, passable: F) -> Self
pub fn with_passable<F>(self, passable: F) -> Self
pub fn get_point(&self, point: &CubicPoint) -> Option<&T>
pub fn has_point(&self, point: &CubicPoint) -> bool
Sourcepub fn neighbors(
&self,
point: &CubicPoint,
) -> Vec<(CubicPoint, OrderedFloat<f64>)>
pub fn neighbors( &self, point: &CubicPoint, ) -> Vec<(CubicPoint, OrderedFloat<f64>)>
Get all passable neighbors from a point
pub fn solve_points(self) -> (Vec<CubicPoint>, f64)
pub fn solve_joint(self) -> (Vec<Joint>, f64)
Auto Trait Implementations§
impl<'a, T> Freeze for PathFinder<'a, T>
impl<'a, T> !RefUnwindSafe for PathFinder<'a, T>
impl<'a, T> !Send for PathFinder<'a, T>
impl<'a, T> !Sync for PathFinder<'a, T>
impl<'a, T> Unpin for PathFinder<'a, T>
impl<'a, T> !UnwindSafe for PathFinder<'a, T>
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> 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 more