Spheres

Noise module that outputs concentric spheres.

@image html modulespheres.png

This noise module outputs concentric spheres centered on the origin like the concentric rings of an onion.

The first sphere has a radius of 1.0. Each subsequent sphere has a radius that is 1.0 unit larger than the previous sphere.

The output value from this noise module is determined by the distance between the input value and the the nearest spherical surface. The input values that are located on a spherical surface are given the output value 1.0 and the input values that are equidistant from two spherical surfaces are given the output value -1.0.

An application can change the frequency of the concentric spheres. Increasing the frequency reduces the distances between spheres. To specify the frequency, call the SetFrequency() method.

This noise module, modified with some low-frequency, low-power turbulence, is useful for generating agate-like textures.

This noise module does not require any source modules.

Constructors

this
this()

Constructor.

Members

Functions

GetFrequency
double GetFrequency()

Returns the frequency of the concentric spheres.

GetSourceModCount
int GetSourceModCount()
Undocumented in source. Be warned that the author may not have intended to support it.
GetValue
double GetValue(double x, double y, double z)
Undocumented in source. Be warned that the author may not have intended to support it.
SetFrequency
void SetFrequency(double frequency)

Sets the frequenct of the concentric spheres.

Variables

m_frequency
double m_frequency;

Frequency of the concentric spheres.

Inherited Members

From Mod

~this
~this()

Destructor.

GetSourceMod
const(Mod) GetSourceMod(int index)

Returns a reference to a source module connected to this noise module.

GetSourceModCount
int GetSourceModCount()

Returns the number of source modules required by this noise module.

GetValue
double GetValue(double x, double y, double z)

Generates an output value given the coordinates of the specified input value.

SetSourceMod
void SetSourceMod(int index, const(Mod)* sourceMod)

Connects a source module to this noise module.

m_pSourceMod
const(Mod)*[] m_pSourceMod;

An array containing the pointers to each source module required by this noise module.

Meta