// ----------------------------------------------------------------------- // // Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- namespace UnityEngine.U2D.Animation.TriangleNet .IO { using Animation.TriangleNet.Topology; using Animation.TriangleNet.Geometry; /// /// Simple triangle class for input. /// internal class InputTriangle : ITriangle { internal int[] vertices; internal int label; internal double area; public InputTriangle(int p0, int p1, int p2) { this.vertices = new int[] { p0, p1, p2 }; } #region Public properties /// /// Gets the triangle id. /// public int ID { get { return 0; } set {} } /// /// Region ID the triangle belongs to. /// public int Label { get { return label; } set { label = value; } } /// /// Gets the triangle area constraint. /// public double Area { get { return area; } set { area = value; } } /// /// Gets the specified corners vertex. /// public Vertex GetVertex(int index) { return null; // TODO: throw NotSupportedException? } public int GetVertexID(int index) { return vertices[index]; } public ITriangle GetNeighbor(int index) { return null; } public int GetNeighborID(int index) { return -1; } public ISegment GetSegment(int index) { return null; } #endregion } }