Interface ITriangle
Triangle interface.
Namespace: UnityEngine.Experimental.U2D.TriangleNet.Geometry
Syntax
public interface ITriangle
Properties
Area
Gets or sets the triangle area constraint.
Declaration
double Area { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ID
Gets or sets the triangle ID.
Declaration
int ID { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Label
Gets or sets a general-purpose label.
Declaration
int Label { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This is used for region information.
Methods
GetNeighbor(Int32)
Gets the neighbor triangle at given index.
Declaration
ITriangle GetNeighbor(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The local index (0, 1 or 2). |
Returns
Type | Description |
---|---|
ITriangle | The neighbor triangle. |
GetNeighborID(Int32)
Gets the ID of the neighbor triangle at given index.
Declaration
int GetNeighborID(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The local index (0, 1 or 2). |
Returns
Type | Description |
---|---|
System.Int32 | The neighbor triangle ID. |
GetSegment(Int32)
Gets the segment at given index.
Declaration
ISegment GetSegment(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The local index (0, 1 or 2). |
Returns
Type | Description |
---|---|
ISegment | The segment. |
GetVertex(Int32)
Gets the vertex at given index.
Declaration
Vertex GetVertex(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The local index (0, 1 or 2). |
Returns
Type | Description |
---|---|
Vertex | The vertex. |
GetVertexID(Int32)
Gets the ID of the vertex at given index.
Declaration
int GetVertexID(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The local index (0, 1 or 2). |
Returns
Type | Description |
---|---|
System.Int32 | The vertex ID. |