Module grid2d
Expand description
Deterministic 2D Navigation and Group Movement Engine (grid2d.rs).
Provides bounded, zero-heap pathfinding and formation movement for:
- Multi-agent simulations and RTS game loops
- Spatial auto-routing
- Dynamic obstruction updates (buildings, gates, bridges)
- Flocking / boids collision separation forces
Adheres strictly to AGENTS.md §0 (Zero heap in hot paths).
Structs§
- Navigation
Grid - Bounded deterministic 2D navigation grid.
Enums§
- Path
Result - Detailed outcome of an A* pathfinding query.
Constants§
- MAX_
PATH_ LENGTH - Maximum path length returned in a single query.
- NAV_
GRID_ MAX_ CELLS - NAV_
GRID_ MAX_ DIM - Maximum dimensions for navigation grid.
Functions§
- compute_
boids_ separation - Computes a continuous 2D boids / crowd separation steering vector for an agent given neighboring agent positions.