refactor(render): SweepEye returns (Eye, ViewerCellId) — surface the swept viewer cell
The camera spring-arm sweep already resolves the collided eye's cell (ResolveResult.CellId = sp.CurCellId = retail viewer_cell = sphere_path.curr_cell, update_viewer pc:92871). Return it from SweepEye so the render can root on the viewer cell (Phase W single-viewpoint V1, Task 1). Pure plumbing — behavior unchanged; callers extract .Eye. 174 App tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b7375c6563
commit
832001d289
6 changed files with 28 additions and 14 deletions
|
|
@ -140,7 +140,7 @@ public class CameraCollisionIndoorTests
|
|||
pivot: PivotWorld,
|
||||
desiredEye: DesiredEye,
|
||||
cellId: IndoorCellId,
|
||||
selfEntityId: 0u);
|
||||
selfEntityId: 0u).Eye;
|
||||
|
||||
// The eye should be stopped before the exterior wall at Y=4.0.
|
||||
// Expected stopped eye Y ≈ 4.0 - ViewerSphereRadius = 3.7.
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public class PhysicsCameraCollisionProbeTests
|
|||
|
||||
var result = probe.SweepEye(pivot, eye, cellId: 0, selfEntityId: 0);
|
||||
|
||||
Assert.Equal(eye, result);
|
||||
Assert.Equal(eye, result.Eye);
|
||||
Assert.Equal(0u, result.ViewerCellId); // cellId==0 → returned unchanged
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -452,10 +452,11 @@ public class RetailChaseCameraTests
|
|||
{
|
||||
public int Calls;
|
||||
public Vector3 ReturnEye;
|
||||
public Vector3 SweepEye(Vector3 pivot, Vector3 desiredEye, uint cellId, uint selfEntityId)
|
||||
public uint ReturnCell;
|
||||
public CameraSweepResult SweepEye(Vector3 pivot, Vector3 desiredEye, uint cellId, uint selfEntityId)
|
||||
{
|
||||
Calls++;
|
||||
return ReturnEye;
|
||||
return new CameraSweepResult(ReturnEye, ReturnCell);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -538,10 +539,10 @@ public class RetailChaseCameraTests
|
|||
{
|
||||
public int Calls;
|
||||
public Vector3 ClampEye;
|
||||
public Vector3 SweepEye(Vector3 pivot, Vector3 desiredEye, uint cellId, uint selfEntityId)
|
||||
public CameraSweepResult SweepEye(Vector3 pivot, Vector3 desiredEye, uint cellId, uint selfEntityId)
|
||||
{
|
||||
Calls++;
|
||||
return Calls == 1 ? ClampEye : desiredEye;
|
||||
return new CameraSweepResult(Calls == 1 ? ClampEye : desiredEye, cellId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue