acdream/tests/AcDream.Core.Tests/Selection
Erik 3764867566 fix(picker): Cluster A #86 — cell-BSP ray occlusion in WorldPicker
WorldPicker.Pick previously had no occlusion test — any entity along
the click ray within maxDistance was a candidate, including ones
behind walls. Adds the CellBspRayOccluder static helper that
Möller-Trumbore-tests the click ray against every polygon in every
currently-cached EnvCell BSP, returning the nearest wall-hit `t`.
Both Pick overloads gate candidate selection by that wall-t (legacy
ray-sphere via world-space `t`, screen-rect via camera-space clip.W
depth — matching ScreenProjection.TryProjectSphereToScreenRect's
convention).

PhysicsDataCache exposes a new CellStructIds snapshot accessor so the
caller can iterate without needing the private cache dictionary.
CellPhysics.BSP/PhysicsPolygons/Vertices relaxed from required to
nullable so test fixtures can construct a CellPhysics from Resolved
alone without a real DAT BSP object. GameWindow snapshots the loaded
cell physics on each Pick call and passes the occluder callback.

Closes #86.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 14:41:56 +02:00
..
CellBspRayOccluderTests.cs fix(picker): Cluster A #86 — cell-BSP ray occlusion in WorldPicker 2026-05-19 14:41:56 +02:00
ScreenProjectionTests.cs feat(retail): Commit B — retail-faithful AP cadence + screen-rect picker 2026-05-16 13:56:08 +02:00
WorldPickerCellOcclusionTests.cs fix(picker): Cluster A #86 — cell-BSP ray occlusion in WorldPicker 2026-05-19 14:41:56 +02:00
WorldPickerRectOverloadTests.cs feat(retail): Commit B — retail-faithful AP cadence + screen-rect picker 2026-05-16 13:56:08 +02:00
WorldPickerTests.cs fix(B.4b): WorldPicker.Pick — handle inside-sphere origin + document normalize contract 2026-05-13 17:52:45 +02:00