docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method TriangulatePolygon

    TriangulatePolygon(List<int>, int, bool)

    Generates a standard triangle buffer with a given number of indices and adds it to the specified list.

    Declaration
    public static void TriangulatePolygon(List<int> indices, int vertCount, bool reverse = false)
    Parameters
    Type Name Description
    List<int> indices

    The list to which to add the triangle buffer. The list is not cleared.

    int vertCount

    The number of perimeter vertices.

    bool reverse

    (Optional) Whether to reverse the winding order of the vertices.

    Remarks

    Set reverse true to reverse the normal winding order.

    Example winding orders:

    Normal winding Reverse winding
    0, 1, 2, 0, 2, 1,
    0, 2, 3, 0, 3, 2,
    0, 3, 4, 0, 4, 3,
    ... ...
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)