Crate grid_pathfinding
source ·Expand description
§grid_pathfinding
A grid-based pathfinding system. Implements Jump Point Search with improved pruning rules for speedy pathfinding. Note that this assumes a uniform-cost grid. Pre-computes connected components to avoid flood-filling behaviour if no path exists.
Structs§
- PathingGrid maintains information about components using a UnionFind structure in addition to the raw bool grid values in the BoolGrid that determine whether a space is occupied (true) or empty (false). It also records neighbours in u8 format for fast lookups during search. Implements Grid by building on BoolGrid.
Functions§
- Turns waypoints into a path on the grid which can be followed step by step. Due to symmetry this is typically one of many ways to follow the waypoints.