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

    Class TriangleWriter

    Helper methods for writing Triangle file formats.

    Inheritance
    System.Object
    TriangleWriter
    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.IO
    Syntax
    public class TriangleWriter

    Methods

    Write(Mesh, String)

    Number the vertices and write them to a .node file.

    Declaration
    public void Write(Mesh mesh, string filename)
    Parameters
    Type Name Description
    Mesh mesh
    System.String filename

    WriteEdges(Mesh, String)

    Write the edges to an .edge file.

    Declaration
    public void WriteEdges(Mesh mesh, string filename)
    Parameters
    Type Name Description
    Mesh mesh
    System.String filename

    WriteElements(Mesh, String)

    Write the triangles to an .ele file.

    Declaration
    public void WriteElements(Mesh mesh, string filename)
    Parameters
    Type Name Description
    Mesh mesh
    System.String filename

    WriteNeighbors(Mesh, String)

    Write the triangle neighbors to a .neigh file.

    Declaration
    public void WriteNeighbors(Mesh mesh, string filename)
    Parameters
    Type Name Description
    Mesh mesh
    System.String filename
    Remarks

    WARNING: Be sure WriteElements has been called before, so the elements are numbered right!

    WriteNodes(Mesh, String)

    Number the vertices and write them to a .node file.

    Declaration
    public void WriteNodes(Mesh mesh, string filename)
    Parameters
    Type Name Description
    Mesh mesh
    System.String filename

    WritePoly(IPolygon, String)

    Write the segments and holes to a .poly file.

    Declaration
    public void WritePoly(IPolygon polygon, string filename)
    Parameters
    Type Name Description
    IPolygon polygon

    Data source.

    System.String filename

    File name.

    Remarks

    If the nodes should not be written into this file, make sure a .node file was written before, so that the nodes are numbered right.

    WritePoly(Mesh, String)

    Write the segments and holes to a .poly file.

    Declaration
    public void WritePoly(Mesh mesh, string filename)
    Parameters
    Type Name Description
    Mesh mesh
    System.String filename

    WritePoly(Mesh, String, Boolean)

    Write the segments and holes to a .poly file.

    Declaration
    public void WritePoly(Mesh mesh, string filename, bool writeNodes)
    Parameters
    Type Name Description
    Mesh mesh

    Data source.

    System.String filename

    File name.

    System.Boolean writeNodes

    Write nodes into this file.

    Remarks

    If the nodes should not be written into this file, make sure a .node file was written before, so that the nodes are numbered right.

    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