Class Segment | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    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
    IEdge.Label

    P0

    Gets the first endpoints index.

    Declaration
    public int P0 { get; }
    Property Value
    Type Description
    System.Int32
    Implements
    IEdge.P0

    P1

    Gets the second endpoints index.

    Declaration
    public int P1 { get; }
    Property Value
    Type Description
    System.Int32
    Implements
    IEdge.P1

    Methods

    GetTriangle(Int32)

    WARNING: not implemented.

    Declaration
    public ITriangle GetTriangle(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    ITriangle
    Implements
    ISegment.GetTriangle(Int32)

    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
    Implements
    ISegment.GetVertex(Int32)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023