java.lang.Object
org.spongepowered.noise.model.Sphere

public class Sphere extends Object
Model that defines the surface of a sphere.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(double lat, double lon)
    Returns the output value from the noise module given the (latitude, longitude) coordinates of the specified input value located on the surface of the sphere.
    Returns the noise module that is used to generate the output values.
    void
    Sets the noise module that is used to generate the output values.

    Methods inherited from class java.lang.Object

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

    • Sphere

      public Sphere(NoiseModule module)
      Constructor
      Parameters:
      module - The noise module that is used to generate the output values.
  • Method Details

    • module

      public NoiseModule module()
      Returns the noise module that is used to generate the output values.
      Returns:
      the module used to generate output values
    • setModule

      public void setModule(NoiseModule module)
      Sets the noise module that is used to generate the output values.
      Parameters:
      module - The noise module that is used to generate the output values. This noise module must exist for the lifetime of this object, until you pass a new noise module to this method.
    • get

      public double get(double lat, double lon)
      Returns the output value from the noise module given the (latitude, longitude) coordinates of the specified input value located on the surface of the sphere.
      Parameters:
      lat - The latitude of the input value, in degrees.
      lon - The longitude of the input value, in degrees.
      Returns:
      The output value from the noise module.