using System.Numerics; namespace AcDream.App.Rendering; /// /// Result of a camera spring-arm sweep: the collided eye position AND the cell the swept /// viewer-sphere ended in (retail viewer_cell = sphere_path.curr_cell, update_viewer /// pc:92871). The cell is graph-tracked by the transition — no AABB, no grace frames — so it /// is the robust per-frame "which cell is the camera in?" answer that roots the render. /// public readonly record struct CameraSweepResult(Vector3 Eye, uint ViewerCellId); /// /// Sweeps a small sphere from the camera pivot (player head) toward the /// desired eye and returns the stopped (non-penetrating) eye + its cell. The seam that /// lets collide its eye without depending on /// the physics engine directly (and stay unit-testable with a fake). /// public interface ICameraCollisionProbe { /// /// Roll a collision sphere from to /// ; return the position it reaches without /// penetrating geometry AND the cell it ended in. Mirrors retail /// SmartBox::update_viewer: when is indoor the /// sweep's start cell is seated at the pivot, and when there is no start cell or /// the sweep fails the eye snaps to (retail /// set_viewer(player_pos), viewer cell null). /// CameraSweepResult SweepEye(Vector3 pivot, Vector3 desiredEye, uint cellId, uint selfEntityId, Vector3 playerPos); }