feat(nav): 17.3 - a map in square tiles (nav_tiled, nav_tile_build; a tile must be a whole number of cells or its seams never join, and the shim refuses one that is not; 64-bit polygon refs for 16384 tiles), ground as a NavGround with boulders as convex footprints, one save format for one tile or many, and nav_random_near - a reachable point from the caller's seed, bit-identical on the Mac and the PC. 10 tests on both
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9b8606483d
commit
e6893f58be
16 changed files with 436 additions and 109 deletions
|
|
@ -1,6 +1,8 @@
|
|||
# native.ludic - the shim's symbols (native/shim/nav_shim.cpp). A navmesh is a handle the package
|
||||
# keeps; points come back through a float buffer it owns. None of this is exported.
|
||||
extern function nvc_build(v: pointer, nv: int, t: pointer, nt: int, area: pointer, cyl: pointer, nc: int, c: pointer) -> pointer = "nav_build"
|
||||
extern function nvc_build(v: pointer, nv: int, t: pointer, nt: int, area: pointer, cyl: pointer, nc: int, foot: pointer, nf: int, c: pointer) -> pointer = "nav_build"
|
||||
extern function nvc_tiled(ox: float, oz: float, tile: float, max_tiles: int, max_polys: int) -> pointer = "nav_tiled"
|
||||
extern function nvc_tile_build(h: pointer, tx: int, tz: int, v: pointer, nv: int, t: pointer, nt: int, area: pointer, cyl: pointer, nc: int, foot: pointer, nf: int, c: pointer) -> int = "nav_tile_build"
|
||||
extern function nvc_save(h: pointer, buf: pointer, cap: int) -> int = "nav_save"
|
||||
extern function nvc_load(buf: pointer, size: int) -> pointer = "nav_load"
|
||||
extern function nvc_free(h: pointer) -> void = "nav_free"
|
||||
|
|
@ -10,3 +12,4 @@ extern function nvc_area_cost(h: pointer, area: int, cost: float) -> void = "nav
|
|||
extern function nvc_path(h: pointer, sx: float, sy: float, sz: float, ex: float, ey: float, ez: float, out: pointer, max: int) -> int = "nav_path"
|
||||
extern function nvc_partial(h: pointer) -> int = "nav_partial"
|
||||
extern function nvc_raycast(h: pointer, sx: float, sy: float, sz: float, ex: float, ez: float) -> int = "nav_raycast"
|
||||
extern function nvc_random_near(h: pointer, x: float, y: float, z: float, r: float, seed: int, out: pointer) -> int = "nav_random_near"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue