Class UniformSampling.Sphere

java.lang.Object
org.joml.sampling.UniformSampling.Sphere
Enclosing class:
UniformSampling

public static class UniformSampling.Sphere extends Object
Generates 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 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.
  • Method Summary

    Modifier and Type
    Method
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Sphere

      public 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.
      Parameters:
      seed - the seed to initialize the random number generator with
      numSamples - the number of samples to generate
      callback - will be called for each sample generated
  • Method Details

    • generate

      public 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.

      Reference: http://mathworld.wolfram.com/

      Parameters:
      numSamples - the number of samples to generate
      callback - will be called for each sample generated