feat(editor): add --bake-zone-collision aggregator

Walks every .wom and .wob under <zoneDir>, optionally welds
each one independently (per-mesh / per-WOB-group), and
appends its triangles to a single WoweeCollision. Useful for
shipping a zone — one .woc artifact holds all object collision
so the server side has just one file to load.

Per-file weld preserves between-object boundaries: two
distinct WOMs sitting at the same world position keep
their topology separate even if their corner positions
happen to overlap.

Same flag surface as the single-file bakers: optional
[out.woc] (defaults to <zoneDir>/zone.woc), --weld <eps>,
--steep <deg> for the walkable/steep slope cutoff.

Smoke tested over /tmp/migtest: scanned 79 WOM + 1 WOB,
produced 9259-triangle WOC (1563 walkable, 1943 steep)
with correct world bounds.
This commit is contained in:
Kelsi 2026-05-09 11:36:38 -07:00
parent 836fab7f2d
commit db2db04ffe
3 changed files with 128 additions and 1 deletions

View file

@ -511,6 +511,8 @@ void printUsage(const char* argv0) {
std::printf(" Convert a WOM into a WOC collision file (raycast / walkability mesh) with optional vertex weld\n");
std::printf(" --bake-wob-collision <wob-base> [out.woc] [--weld <eps>] [--steep <deg>]\n");
std::printf(" Convert a multi-group WOB building into a single WOC collision file (weld is per-group)\n");
std::printf(" --bake-zone-collision <zoneDir> [out.woc] [--weld <eps>] [--steep <deg>]\n");
std::printf(" Walk every .wom + .wob under zoneDir, weld each independently, append to one shared WOC\n");
std::printf(" --audit-watertight <zoneDir|projectDir> [--weld <eps>] [--json]\n");
std::printf(" Walk every .wom under root, run welded watertight check; exit code = failure count (CI-friendly)\n");
std::printf(" --audit-watertight-wob <zoneDir|projectDir> [--weld <eps>] [--json]\n");