Package org.joml.sampling
Class UniformSampling.Sphere
- java.lang.Object
-
- org.joml.sampling.UniformSampling.Sphere
-
- Enclosing class:
- UniformSampling
public static class UniformSampling.Sphere extends java.lang.ObjectGenerates uniform samples on a unit sphere.- Author:
- Kai Burjack
-
-
Constructor Summary
Constructors Constructor Description Sphere(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerate(int numSamples, Callback3d callback)CreatenumSamplesnumber of samples which are uniformly distributed on a unit sphere, and call the givencallbackfor each sample generated.
-
-
-
Constructor Detail
-
Sphere
public Sphere(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.- 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 Detail
-
generate
public void generate(int numSamples, Callback3d callback)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
-
-