acdream/src/AcDream.Runtime/Physics/RuntimeRemoteMotionContracts.cs
Erik 7e6033d0ad refactor(runtime): own per-session physics simulation
Move the sole PhysicsEngine, production cache, collision admissions, canonical bodies and hosts, remote components, ordinary/remote worksets, simulation, cell commits, and shadow synchronization under RuntimeEntityObjectLifetime. Keep App as the prepared-asset, animation-input, and render-projection adapter while preserving the named-retail update and collision order.

Add exact-incarnation, object-clock, callback-reentrancy, GUID-reuse, two-runtime isolation, source ownership, collision publication, and graphical projection coverage. Release build and the complete 8,588-test solution pass.

Co-authored-by: Codex <noreply@openai.com>
2026-07-26 13:39:57 +02:00

42 lines
1 KiB
C#

using System.Numerics;
using AcDream.Core.Physics;
using AcDream.Core.Physics.Motion;
namespace AcDream.Runtime.Physics;
public interface IRuntimeRemoteMotion
{
PhysicsBody Body { get; }
}
public interface IRuntimePhysicsHostConsumer
{
void BindPhysicsHost(Func<IPhysicsObjHost?> read);
}
public interface IRuntimeCanonicalPhysicsConsumer
{
void BindCanonicalRuntime(
Func<IPhysicsObjHost?> readPhysicsHost,
Func<uint> readCell,
Action<uint> writeCell);
}
public interface IRuntimeCanonicalCellConsumer
{
void BindCanonicalCell(Func<uint> read, Action<uint> write);
}
public interface IRuntimeRemotePlacement :
IRuntimeRemoteMotion,
IRuntimeCanonicalCellConsumer
{
uint CellId { get; set; }
bool Airborne { get; set; }
Vector3 LastServerPosition { get; set; }
double LastServerPositionTime { get; set; }
Vector3 LastShadowSyncPosition { get; set; }
Quaternion LastShadowSyncOrientation { get; set; }
void HitGround();
void LeaveGround();
}