C# Class LibNoise.Model.Sphere

Model that defines the surface of a sphere. This model returns an output value from a noise module given the coordinates of an input value located on the surface of a sphere. To generate an output value, pass the (latitude, longitude) coordinates of an input value to the GetValue() method. This model is useful for creating: - seamless textures that can be mapped onto a sphere - terrain height maps for entire planets This sphere has a radius of 1.0 unit and its center is located at the origin.
Inheritance: AbstractModel
Show file Open project: everbytes/LibNoise Class Usage Examples

Public Methods

Method Description
GetValue ( float lat, float lon ) : float

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. Use a negative latitude if the input value is located on the southern hemisphere. Use a negative longitude if the input value is located on the western hemisphere.

Sphere ( )

Default constructor

Sphere ( IModule3D module )

Constructor

Method Details

GetValue() public method

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. Use a negative latitude if the input value is located on the southern hemisphere. Use a negative longitude if the input value is located on the western hemisphere.
public GetValue ( float lat, float lon ) : float
lat float The latitude of the input value, in degrees
lon float The longitude of the input value, in degrees
return float

Sphere() public method

Default constructor
public Sphere ( )

Sphere() public method

Constructor
public Sphere ( IModule3D module )
module IModule3D The noise module that is used to generate the output values