Class PoissonDiskSampling
Utility for generating lists of poisson disk sampled points
Inherited Members
Namespace: UnityEngine.Experimental.Perception.Randomization.Randomizers.SampleRandomizers
Syntax
public static class PoissonDiskSampling
Methods
GenerateSamples(Single, Single, Single, UInt32, Int32)
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 = 12345U, int samplingResolution = 30)
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 |
Returns
Type | Description |
---|---|
NativeList<Unity.Mathematics.float2> | The list of generated poisson points |