public static class UniformSampling.Sphere extends Object
Constructor and Description |
---|
Sphere(long seed,
int numSamples,
Callback3d callback)
Create a new instance of
UniformSampling.Sphere , initialize the random number generator with the given seed and generate numSamples number of sample
positions on the unit sphere, and call the given callback for each sample generate. |
Modifier and Type | Method and Description |
---|---|
void |
generate(int numSamples,
Callback3d callback)
Create
numSamples number of samples which are uniformly distributed on a unit sphere, and call the given callback for each sample generated. |
public Sphere(long seed, int numSamples, Callback3d callback)
UniformSampling.Sphere
, initialize the random number generator with the given seed
and generate numSamples
number of sample
positions on the unit sphere, and call the given callback
for each sample generate.seed
- the seed to initialize the random number generator withnumSamples
- the number of samples to generatecallback
- will be called for each sample generatedpublic void generate(int numSamples, Callback3d callback)
numSamples
number of samples which are uniformly distributed on a unit sphere, and call the given callback
for each sample generated.
Reference: http://mathworld.wolfram.com/
numSamples
- the number of samples to generatecallback
- will be called for each sample generatedCopyright © 2015–2016 JOML. All rights reserved.