2019-09-06 08:11:58 +00:00
|
|
|
|
using System;
|
2019-10-31 23:19:30 +00:00
|
|
|
|
using System.Numerics;
|
2019-09-06 08:11:58 +00:00
|
|
|
|
using MoonTools.Core.Structs;
|
|
|
|
|
|
|
|
|
|
namespace MoonTools.Core.Bonk
|
|
|
|
|
{
|
|
|
|
|
public interface IShape2D : IEquatable<IShape2D>
|
|
|
|
|
{
|
2019-12-30 06:19:10 +00:00
|
|
|
|
AABB AABB { get; }
|
|
|
|
|
|
2019-10-25 21:01:36 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A Minkowski support function. Gives the farthest point on the edge of a shape along the given direction.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="direction">A normalized Vector2.</param>
|
|
|
|
|
/// <param name="transform">A Transform for transforming the shape vertices.</param>
|
|
|
|
|
/// <returns>The farthest point on the edge of the shape along the given direction.</returns>
|
2019-09-06 08:11:58 +00:00
|
|
|
|
Vector2 Support(Vector2 direction, Transform2D transform);
|
|
|
|
|
|
2019-10-25 21:01:36 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns a bounding box based on the shape.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="transform">A Transform for transforming the shape vertices.</param>
|
|
|
|
|
/// <returns>Returns a bounding box based on the shape.</returns>
|
2019-12-30 06:19:10 +00:00
|
|
|
|
AABB TransformedAABB(Transform2D transform);
|
2019-09-06 08:11:58 +00:00
|
|
|
|
}
|
|
|
|
|
}
|