java.lang.Object
org.spongepowered.noise.model.Sphere
Model that defines the surface of a sphere.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
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.module()
Returns the noise module that is used to generate the output values.void
setModule
(NoiseModule module) Sets the noise module that is used to generate the output values.
-
Constructor Details
-
Sphere
Constructor- Parameters:
module
- The noise module that is used to generate the output values.
-
-
Method Details
-
module
Returns the noise module that is used to generate the output values.- Returns:
- the module used to generate output values
-
setModule
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.
-