feat(phys): A6.P3 #98 — GfxObj dump infrastructure (ACDREAM_DUMP_GFXOBJS)
Mirror the existing ACDREAM_DUMP_CELLS pattern for GfxObj-owned geometry:
when ACDREAM_DUMP_GFXOBJS lists a hex GfxObj id, the first
PhysicsDataCache.CacheGfxObj for that id writes the full resolved
polygon table to a JSON fixture under
tests/AcDream.Core.Tests/Fixtures/issue98/0x{id:X8}.gfxobj.json (override
dir via ACDREAM_DUMP_GFXOBJS_DIR).
Motivation: the existing [resolve-bldg] probe captures GfxObj-level
metadata (id, BSP root radius, entity origin) but emits
"hitPoly: n/a (BSP path — side-channel not written)" because the
BSPQuery wire site that would populate LastBspHitPoly never landed.
A polygon-level dump at cache time bypasses that gap — one capture run
yields the FULL polygon table, fixture-loadable by the harness's
RegisterCottageGfxObj helper (next commit).
See docs/research/2026-05-23-a6-p3-issue98-comparison-harness-findings.md
for the cottage GfxObj 0x01000A2B context: landblock-baked static at
entity origin (130.5, 11.5, 94.0), responsible for the head-sphere cap
from below at world Z=94.0 that issue #98 is documenting.
Test baseline: 1183 + 8 pre-existing failures (serial run; +5 new tests
all pass; was 1178 + 8 pre-session).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4d83ba5620
commit
cc3afbcbeb
5 changed files with 484 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using AcDream.Core.Physics;
|
||||
using DatReaderWriter.Enums;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using Xunit;
|
||||
|
||||
|
|
@ -141,4 +142,27 @@ public class PhysicsDiagnosticsTests
|
|||
PhysicsDiagnostics.ProbeStepWalkEnabled = initial;
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// ProbeDumpGfxObjs — parallel of ProbeDumpCells (A6.P3 #98, evening v2).
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
[Fact]
|
||||
public void ProbeDumpGfxObjs_EnabledTracksIdSetNonEmpty()
|
||||
{
|
||||
var initial = PhysicsDiagnostics.ProbeDumpGfxObjIds;
|
||||
try
|
||||
{
|
||||
PhysicsDiagnostics.ProbeDumpGfxObjIds = new HashSet<uint>();
|
||||
Assert.False(PhysicsDiagnostics.ProbeDumpGfxObjsEnabled);
|
||||
|
||||
PhysicsDiagnostics.ProbeDumpGfxObjIds = new HashSet<uint> { 0x01000A2Bu };
|
||||
Assert.True(PhysicsDiagnostics.ProbeDumpGfxObjsEnabled);
|
||||
Assert.Contains(0x01000A2Bu, PhysicsDiagnostics.ProbeDumpGfxObjIds);
|
||||
}
|
||||
finally
|
||||
{
|
||||
PhysicsDiagnostics.ProbeDumpGfxObjIds = initial;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue