acdream/tests/AcDream.Core.Tests/Physics
Erik 8252523b8b feat(core): Phase B.3 — CellPortal-based indoor/outdoor transitions in PhysicsEngine
Replace the disabled if(false) outdoor→indoor branch with real portal-plane
crossing logic. LandblockPhysics now carries IReadOnlyList<PortalPlane> Portals
(populated at load time; GameWindow passes Array.Empty for now until Task 3).

Resolve logic:
- Outdoor player: tests all portals where TargetCellId==0xFFFF (outside-facing);
  crossing enters the portal's OwnerCellId.
- Indoor player: tests portals where OwnerCellId==currentCell; crossing to
  TargetCellId==0xFFFF exits to terrain, otherwise transitions room-to-room.
- Landblock boundary crossing: unchanged — candidatePos landblock lookup already
  picks the adjacent block's terrain naturally.

Tests: renamed disabled test → Resolve_OutdoorThroughPortal_TransitionsToIndoor;
added Resolve_IndoorThroughExitPortal_TransitionsToOutdoor and
Resolve_LandblockBoundary_PicksAdjacentTerrain. 274 tests green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 18:22:55 +02:00
..
CellSurfaceTests.cs feat(core): Phase B.3 — CellSurface (indoor floor polygon projection) 2026-04-12 09:51:22 +02:00
PhysicsEngineTests.cs feat(core): Phase B.3 — CellPortal-based indoor/outdoor transitions in PhysicsEngine 2026-04-12 18:22:55 +02:00
PortalPlaneTests.cs feat(core): Phase B.3 — PortalPlane (plane math + crossing detection) 2026-04-12 18:17:48 +02:00
TerrainSurfaceTests.cs feat(core): Phase B.3 — TerrainSurface (outdoor heightmap Z + cell ID) 2026-04-12 09:51:54 +02:00