using UnityEngine;
using UnityEngine.TestTools;
///
/// This data structure is used to represent a point during triangulation.
///
public class TriangulationPoint: IBinSortable
{
///
/// 2D coordinates of the point on the triangulation plane
///
public Vector2 coords;
///
/// Bin used for sorting points in grid
///
public int bin { get; set; }
///
/// Original index prior to sorting
///
public int index = 0;
///
/// Instantiates a new triangulation point
///
/// The index of the point in the original point list
/// The 2D coordinates of the point in the triangulation plane
public TriangulationPoint(int index, Vector2 coords)
{
this.index = index;
this.coords = coords;
}
[ExcludeFromCoverage]
public override string ToString()
{
return $"{coords} -> {bin}";
}
}