docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ReducePoints

    ReducePoints<T>(T, float)

    Removes redundant points in a poly line to form a similar shape with fewer points.

    Declaration
    public static List<float3> ReducePoints<T>(T line, float epsilon = 0.15) where T : IList<float3>
    Parameters
    Type Name Description
    T line

    The poly line to act on.

    float epsilon

    The maximum distance from the reduced poly line shape for a point to be discarded.

    Returns
    Type Description
    List<float3>

    Returns a new list with a poly line matching the shape of the original line with fewer points.

    Type Parameters
    Name Description
    T

    The collection type. Usually this will be list or array of float3.

    ReducePoints<T>(T, List<float3>, float)

    Removes redundant points in a poly line to form a similar shape with fewer points.

    Declaration
    public static void ReducePoints<T>(T line, List<float3> results, float epsilon = 0.15) where T : IList<float3>
    Parameters
    Type Name Description
    T line

    The poly line to act on.

    List<float3> results

    A pre-allocated list to be filled with the new reduced line points.

    float epsilon

    The maximum distance from the reduced poly line shape for a point to be discarded.

    Type Parameters
    Name Description
    T

    The collection type. Usually this will be list or array of float3.

    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)