docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PoissonDiskSampling

    Utility for generating lists of poisson disk sampled points

    Inheritance
    object
    PoissonDiskSampling
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.Randomization.Utilities
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    [MovedFrom("UnityEngine.Perception.Randomization.Randomizers.Utilities")]
    public static class PoissonDiskSampling

    Methods

    GenerateSamples(float, float, float, uint, int, 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 = 12345, int samplingResolution = 30, Allocator allocator = Allocator.TempJob)
    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

    Allocator allocator

    The allocator to use for the samples container

    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)