using TraceCad.Core.Geometry;

namespace TraceCad.Vision.Calibration;

public sealed record ReferenceMarkerDefinition(int Id, Point2 TopLeftMm, double SizeMm)
{
    public Point2 TopRightMm => new(TopLeftMm.X + SizeMm, TopLeftMm.Y);

    public Point2 BottomRightMm => new(TopLeftMm.X + SizeMm, TopLeftMm.Y + SizeMm);

    public Point2 BottomLeftMm => new(TopLeftMm.X, TopLeftMm.Y + SizeMm);

    public IReadOnlyList<Point2> CornersMm => new[]
    {
        TopLeftMm,
        TopRightMm,
        BottomRightMm,
        BottomLeftMm
    };
}
