docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GenerateIndices

    GenerateIndices(List<int>, List<Vector3>, float)

    Generates a List of indices from the given parameters, forming a triangle fan. The convexPolygon is assumed to be convex.

    Declaration
    public static bool GenerateIndices(List<int> indices, List<Vector3> convexPolygon, float areaTolerance = 1E-06)
    Parameters
    Type Name Description
    List<int> indices

    The List to write results to.

    List<Vector3> convexPolygon

    The vertices of the plane's boundary, in plane-space.

    float areaTolerance

    If any triangle in the generated mesh is less than this, then the entire mesh is ignored.

    Returns
    Type Description
    bool

    True if the indices were generated, False if a triangle whose area is less than areaTolerance is found.

    Remarks

    convexPolygon is not checked for its convexness. Concave polygons will produce incorrect results.

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Friday, September 22, 2023