Package org.joml.sampling
Class UniformSampling.Sphere
java.lang.Object
org.joml.sampling.UniformSampling.Sphere
- Enclosing class:
UniformSampling
Generates uniform samples on a unit sphere.
- Author:
- Kai Burjack
-
Constructor Summary
ConstructorsConstructorDescriptionSphere(long seed, int numSamples, Callback3d callback) Create a new instance ofUniformSampling.Sphere, initialize the random number generator with the givenseedand generatenumSamplesnumber of sample positions on the unit sphere, and call the givencallbackfor each sample generate. -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate(int numSamples, Callback3d callback) CreatenumSamplesnumber of samples which are uniformly distributed on a unit sphere, and call the givencallbackfor each sample generated.
-
Constructor Details
-
Sphere
Create a new instance ofUniformSampling.Sphere, initialize the random number generator with the givenseedand generatenumSamplesnumber of sample positions on the unit sphere, and call the givencallbackfor each sample generate.- Parameters:
seed- the seed to initialize the random number generator withnumSamples- the number of samples to generatecallback- will be called for each sample generated
-
-
Method Details
-
generate
CreatenumSamplesnumber of samples which are uniformly distributed on a unit sphere, and call the givencallbackfor each sample generated.Reference: http://mathworld.wolfram.com/
- Parameters:
numSamples- the number of samples to generatecallback- will be called for each sample generated
-