Struct hexagon_map::PathFinder
source · 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) -> Selfwhere
F: Fn(&AxialPoint, &T) -> bool + 'static,
pub fn with_passable<F>(self, passable: F) -> Selfwhere F: Fn(&AxialPoint, &T) -> bool + 'static,
sourcepub fn with_action(self, action: f64) -> Self
pub fn with_action(self, action: f64) -> Self
pub fn get_point(&self, point: &AxialPoint) -> Option<&T>
pub fn has_point(&self, point: &AxialPoint) -> bool
pub fn distance_to_start(&self, point: &AxialPoint) -> usize
pub fn distance_to_end(&self, point: &AxialPoint) -> usize
sourcepub fn neighbors(&self, point: &AxialPoint) -> Vec<AxialPoint>
pub fn neighbors(&self, point: &AxialPoint) -> Vec<AxialPoint>
Get all passable neighbors from a point