docs.unity3d.com
    Show / Hide Table of Contents

    Class PoissonDiskSampling

    Utility for generating lists of poisson disk sampled points

    Inheritance
    Object
    PoissonDiskSampling
    Namespace: UnityEngine.Perception.Randomization.Randomizers.Utilities
    Syntax
    public static class PoissonDiskSampling : object

    Methods

    GenerateSamples(Single, Single, Single, UInt32, Int32, Allocator)

    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 = null, int samplingResolution = null, Allocator allocator = null)
    Parameters
    Type Name Description
    Single width

    Width of the sampling area

    Single height

    Height of the sampling area

    Single minimumRadius

    The minimum distance required between each sampled point

    UInt32 seed

    The random seed used to initialize the algorithm state

    Int32 samplingResolution

    The number of potential points sampled around every valid point

    Allocator allocator

    The allocator to use for the samples container

    Returns
    Type Description
    NativeList<float2>

    The list of generated poisson points

    Back to top
    Terms of use
    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