public static class BestCandidateSampling.Disk extends Object
| Constructor and Description |
|---|
Disk()
Create a new instance of
BestCandidateSampling.Disk to configure and generate 'best candidate' sample positions on the unit disk. |
| Modifier and Type | Method and Description |
|---|---|
BestCandidateSampling.Disk |
generate(Callback2d callback)
Generate 'best candidate' sample positions and call the given
callback for each generated sample. |
BestCandidateSampling.Disk |
generate(float[] xys)
Generate 'best candidate' sample positions and store the coordinates of all generated samples into the given
xys float array. |
BestCandidateSampling.Disk |
generate(FloatBuffer xys)
Generate 'best candidate' sample positions and store the coordinates of all generated samples into the given
xys FloatBuffer. |
BestCandidateSampling.Disk |
numCandidates(int numCandidates)
Set the number of candidates to try for each generated sample.
|
BestCandidateSampling.Disk |
numSamples(int numSamples)
Set the number of samples to generate.
|
BestCandidateSampling.Disk |
seed(long seed)
Set the seed to initialize the pseudo-random number generator with.
|
public Disk()
BestCandidateSampling.Disk to configure and generate 'best candidate' sample positions on the unit disk.public BestCandidateSampling.Disk seed(long seed)
seed - the seed valuepublic BestCandidateSampling.Disk numSamples(int numSamples)
numSamples - the number of samplespublic BestCandidateSampling.Disk numCandidates(int numCandidates)
numCandidates - the number of candidates to trypublic BestCandidateSampling.Disk generate(float[] xys)
xys float array.
This method performs heap allocations, so should be used sparingly.
xys - will hold the x and y coordinates of all samples in the order XYXYXY....
This array must have a length of at least numSamplespublic BestCandidateSampling.Disk generate(FloatBuffer xys)
xys FloatBuffer.
The samples will be written starting at the current position of the FloatBuffer. The position of the FloatBuffer will not be modified.
This method performs heap allocations, so should be used sparingly.
xys - will hold the x and y coordinates of all samples in the order XYXYXY.... This FloatBuffer must have at least numSamples remaining elements. The
position of the buffer will not be modified by this methodpublic BestCandidateSampling.Disk generate(Callback2d callback)
callback for each generated sample.
This method performs heap allocations, so should be used sparingly.
callback - will be called with the coordinates of each generated sample positionCopyright © 2015–2019 JOML. All rights reserved.