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
ConstructorDescriptionSphere
(long seed, int numSamples, Callback3d callback) Create a new instance ofUniformSampling.Sphere
, initialize the random number generator with the givenseed
and generatenumSamples
number of sample positions on the unit sphere, and call the givencallback
for each sample generate. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generate
(int numSamples, Callback3d callback) CreatenumSamples
number of samples which are uniformly distributed on a unit sphere, and call the givencallback
for each sample generated.
-
Constructor Details
-
Sphere
Create a new instance ofUniformSampling.Sphere
, initialize the random number generator with the givenseed
and generatenumSamples
number of sample positions on the unit sphere, and call the givencallback
for 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
CreatenumSamples
number of samples which are uniformly distributed on a unit sphere, and call the givencallback
for each sample generated.Reference: http://mathworld.wolfram.com/
- Parameters:
numSamples
- the number of samples to generatecallback
- will be called for each sample generated
-