Skip to main content

Module navmesh

Module navmesh 

Expand description

Zero-Heap Convex NavMesh & A* Pathfinding (navmesh.rs).

Provides deterministic navigation mesh representation and pathfinding:

  • Fixed-capacity convex polygon mesh (up to 128 nodes, max 6 vertices per node)
  • Graph adjacency with shared portal edges
  • Zero-heap A* heuristic graph search using fixed-capacity stack open-set
  • Funnel algorithm (string-pulling) to compute shortest path waypoints

Designed according to AGENTS.md §0 (Zero heap in hot paths).

Structs§

NavPolygon
A single convex polygon in the navigation mesh.
ZeroHeapNavMesh
Zero-heap navigation mesh container.

Constants§

MAX_NAVMESH_NODES
Maximum navigation polygons supported per local sector.
MAX_PATH_WAYPOINTS
Maximum waypoints returned in a single route.
MAX_POLY_VERTICES
Maximum vertices per convex polygon node.

Type Aliases§

Point2D
A 2D point [x, z] on the ground plane.