feat(editor): add --info-mesh-stats geometric audit

Reports total surface area, per-triangle area histogram
(min/max/mean/median), edge analysis (boundary / manifold /
non-manifold counts), watertight check, and degenerate
triangle count for a single WOM.

Watertightness here is the topological notion: every edge
must be shared by exactly 2 triangles via shared vertex
indices. This is what collision bakes and physics queries
actually need — visually-closed primitives whose adjacent
faces don't weld vertices will (correctly) report as
non-watertight.

Already caught a real defect in handleTent's door-fan
triangulation: the fan covers the door cutout area with
a stray triangle and leaves a vertex unreferenced.
Edge analysis is gated by triCount <= 2M to keep the
unordered_map bounded for huge baked terrain meshes.
This commit is contained in:
Kelsi 2026-05-09 10:41:58 -07:00
parent 17a53f192f
commit 5e404a9fe6
3 changed files with 148 additions and 1 deletions

View file

@ -13,7 +13,7 @@ const char* const kArgRequired[] = {
"--list-project-textures",
"--info-zone-models-total", "--info-project-models-total",
"--list-zone-meshes-detail", "--list-project-meshes-detail", "--info-mesh",
"--info-mesh-storage-budget",
"--info-mesh-storage-budget", "--info-mesh-stats",
"--info-wob", "--info-woc", "--info-wot",
"--info-creatures", "--info-objects", "--info-quests",
"--info-extract", "--info-extract-tree", "--info-extract-budget",