docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GenerateSamples

    GenerateSamples(float, float, float, uint, int)

    Returns a list of poisson disc sampled points for a given area and density

    Declaration
    public static NativeList<float2> GenerateSamples(float width, float height, float minimumRadius, uint seed = 12345, int samplingResolution = 30)
    Parameters
    Type Name Description
    float width

    Width of the sampling area

    float height

    Height of the sampling area

    float minimumRadius

    The minimum distance required between each sampled point

    uint seed

    The random seed used to initialize the algorithm state

    int samplingResolution

    The number of potential points sampled around every valid point

    Returns
    Type Description
    NativeList<float2>

    The list of generated poisson points

    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)