2024-01-25 12:46:43 +03:00
|
|
|
using Syntriax.Engine.Core;
|
|
|
|
using Syntriax.Engine.Physics2D.Abstract;
|
|
|
|
|
|
|
|
namespace Syntriax.Engine.Physics2D;
|
|
|
|
|
2024-01-27 00:51:34 +03:00
|
|
|
[System.Diagnostics.DebuggerDisplay("Normal: {Normal.ToString(), nq}, Penetration: {Penetration}")]
|
2024-01-26 23:40:02 +03:00
|
|
|
public readonly struct CollisionDetectionInformation
|
2024-01-25 12:46:43 +03:00
|
|
|
(
|
|
|
|
ICollider2D Left,
|
|
|
|
ICollider2D Right,
|
|
|
|
Vector2D Normal,
|
|
|
|
float Penetration
|
2024-01-26 23:40:02 +03:00
|
|
|
)
|
|
|
|
{
|
|
|
|
public ICollider2D Left { get; init; } = Left;
|
|
|
|
public ICollider2D Right { get; init; } = Right;
|
|
|
|
public Vector2D Normal { get; init; } = Normal;
|
|
|
|
public float Penetration { get; init; } = Penetration;
|
|
|
|
}
|