Class Segment
Represents a straight line segment in 2D space.
Inheritance
System.Object
Segment
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: UnityEngine.Experimental.U2D.TriangleNet.Geometry
Syntax
public class Segment : ISegment, IEdge
Constructors
Segment(Vertex, Vertex)
Initializes a new instance of the Segment class.
Declaration
public Segment(Vertex v0, Vertex v1)
Parameters
Type | Name | Description |
---|---|---|
Vertex | v0 | |
Vertex | v1 |
Segment(Vertex, Vertex, Int32)
Initializes a new instance of the Segment class.
Declaration
public Segment(Vertex v0, Vertex v1, int label)
Parameters
Type | Name | Description |
---|---|---|
Vertex | v0 | |
Vertex | v1 | |
System.Int32 | label |
Properties
Label
Gets or sets the segments boundary mark.
Declaration
public int Label { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Implements
P0
Gets the first endpoints index.
Declaration
public int P0 { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Implements
P1
Gets the second endpoints index.
Declaration
public int P1 { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Implements
Methods
GetTriangle(Int32)
WARNING: not implemented.
Declaration
public ITriangle GetTriangle(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type | Description |
---|---|
ITriangle |
Implements
GetVertex(Int32)
Gets the specified segment endpoint.
Declaration
public Vertex GetVertex(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The endpoint index (0 or 1). |
Returns
Type | Description |
---|---|
Vertex |