acdream/src/AcDream.App/Rendering/ICameraCollisionProbe.cs
2026-05-29 19:01:21 +02:00

20 lines
852 B
C#

using System.Numerics;
namespace AcDream.App.Rendering;
/// <summary>
/// Sweeps a small sphere from the camera pivot (player head) toward the
/// desired eye and returns the stopped (non-penetrating) eye. The seam that
/// lets <see cref="RetailChaseCamera"/> collide its eye without depending on
/// the physics engine directly (and stay unit-testable with a fake).
/// </summary>
public interface ICameraCollisionProbe
{
/// <summary>
/// Roll a collision sphere from <paramref name="pivot"/> to
/// <paramref name="desiredEye"/>; return the position it reaches without
/// penetrating geometry. Returns <paramref name="desiredEye"/> unchanged
/// when nothing blocks the path or when <paramref name="cellId"/> is 0.
/// </summary>
Vector3 SweepEye(Vector3 pivot, Vector3 desiredEye, uint cellId, uint selfEntityId);
}