using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D;
///
/// Represents a 2D physics engine.
///
public interface IPhysicsEngine2D
{
///
/// Event triggered when the has done a single physics iteration.
///
Event OnPhysicsIteration { get; }
///
/// Event triggered when the has done a full physics step/>.
///
Event OnPhysicsStep { get; }
///
/// The number of iterations the performs per step.
///
int IterationPerStep { get; set; }
///
/// Advances the physics simulation by the specified time.
///
/// The time step.
void Step(float deltaTime);
///
/// Advances the physics simulation by the specified time on a single .
///
/// The to be progressed individually.
/// The time step.
void StepIndividual(IRigidBody2D rigidBody, float deltaTime);
readonly record struct PhysicsIterationArguments(IPhysicsEngine2D sender, float iterationDeltaTime);
readonly record struct PhysicsStepArguments(IPhysicsEngine2D sender, float stepDeltaTime);
}