mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
feat(editor): --info-wob-stats + fix weld hash collision bug
Add --info-wob-stats reporting per-group + aggregate triangle counts, surface area, edge analysis, and watertight check for WOB buildings. Same flag surface as --info-mesh-stats including --weld <eps> for true topological closure check on per-face-vertex meshes. Also fixes a correctness bug in the weld implementation of --info-mesh-stats: the previous code used a 64-bit hash of the quantized position as the equality key, which gave false-positive collisions that incorrectly merged distinct vertices. A unit cube's 8 corners collapsed to 2 positions under the buggy hash. Replace with std::map keyed on the actual quantized (qx, qy, qz) tuple so equality is exact. Re-verified: cube 8→8 watertight YES; firepit 240→80 watertight YES (was wrongly reporting 56 unique with 48 non-manifold edges); tent_solid 18→6 watertight YES; tent_fixed 21→9 with 5 boundary edges at the door perimeter (correct — door is intentionally open).
This commit is contained in:
parent
a7989cc7ab
commit
4112b6d257
4 changed files with 208 additions and 12 deletions
|
|
@ -627,6 +627,8 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Aggregate WOM/WOB stats across an entire project (per-zone breakdown + totals)\n");
|
||||
std::printf(" --info-wob <wob-base> [--json]\n");
|
||||
std::printf(" Print WOB building metadata (groups, portals, doodads) and exit\n");
|
||||
std::printf(" --info-wob-stats <wob-base> [--weld <eps>] [--json]\n");
|
||||
std::printf(" Per-group + aggregate geometric stats (surface area, edges, watertight) for a WOB building\n");
|
||||
std::printf(" --info-woc <woc-path> [--json]\n");
|
||||
std::printf(" Print WOC collision metadata (triangle counts, bounds) and exit\n");
|
||||
std::printf(" --info-wot <wot-base> [--json]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue