hierarchical_pathfinding 0.5.0

Quickly approximate Paths on a Grid
Documentation
use crate::{path::PathSegment, NodeID, NodeIDMap, Point};

#[derive(Clone, Debug)]
pub struct Node {
    pub id: NodeID,
    pub pos: Point,
    pub walk_cost: usize,
    pub edges: NodeIDMap<PathSegment>,
}

impl Node {
    pub fn new(id: NodeID, pos: Point, walk_cost: usize) -> Node {
        Node {
            id,
            pos,
            walk_cost,
            edges: NodeIDMap::default(),
        }
    }
}