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

@ -141,7 +141,7 @@ const char* const kArgRequired[] = {
"--export-stl", "--import-stl",
"--bake-zone-glb", "--bake-zone-stl", "--bake-zone-obj",
"--bake-project-obj", "--bake-project-stl", "--bake-project-glb",
"--bake-wom-collision", "--bake-wob-collision",
"--bake-wom-collision", "--bake-wob-collision", "--bake-zone-collision",
"--audit-watertight", "--audit-watertight-wob",
"--convert-m2", "--convert-m2-batch",
"--convert-wmo", "--convert-wmo-batch",