MoonTools.Bonk/Bonk/IShape2D.cs

25 lines
970 B
C#
Raw Normal View History

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-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-09-06 08:11:58 +00:00
AABB AABB(Transform2D transform);
}
}