Cylinders

Noise module that outputs concentric cylinders.

@image html modulecylinders.png

This noise module outputs concentric cylinders centered on the origin. These cylinders are oriented along the @a y axis similar to the concentric rings of a tree. Each cylinder extends infinitely along the @a y axis.

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

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

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

This noise module, modified with some low-frequency, low-power turbulence, is useful for generating wood-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 cylinders.

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

Variables

m_frequency
double m_frequency;

Frequency of the concentric cylinders.

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