Displace

@addtogroup libnoise @{ @addtogroup modules @{ @defgroup transformermodules Transformer Mods @addtogroup transformermodules @{ Noise module that uses three source modules to displace each coordinate of the input value before returning the output value from a source module.

@image html moduledisplace.png

Unlike most other noise modules, the index value assigned to a source module determines its role in the displacement operation: - Source module 0 (left in the diagram) outputs a value. - Source module 1 (lower left in the diagram) specifies the offset to apply to the @a x coordinate of the input value. - Source module 2 (lower center in the diagram) specifies the offset to apply to the @a y coordinate of the input value. - Source module 3 (lower right in the diagram) specifies the offset to apply to the @a z coordinate of the input value.

The GetValue() method modifies the ( @a x, @a y, @a z ) coordinates of the input value using the output values from the three displacement modules before retrieving the output value from the source module.

The module::Turbulence noise module is a special case of the displacement module; internally, there are three Perlin-noise modules that perform the displacement operation.

This noise module requires four source modules.

Constructors

this
this()

Constructor.

Members

Functions

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.
GetXDisplaceMod
const(Mod) GetXDisplaceMod()

Returns the @a x displacement module.

GetYDisplaceMod
const(Mod) GetYDisplaceMod()

Returns the @a y displacement module.

GetZDisplaceMod
const(Mod) GetZDisplaceMod()

Returns the @a z displacement module.

SetDisplaceMods
void SetDisplaceMods(const(Mod) xDisplaceMod, const(Mod) yDisplaceMod, const(Mod) zDisplaceMod)

Sets the @a x, @a y, and @a z displacement modules.

SetXDisplaceMod
void SetXDisplaceMod(const(Mod) xDisplaceMod)

Sets the @a x displacement module.

SetYDisplaceMod
void SetYDisplaceMod(const(Mod) yDisplaceMod)

Sets the @a y displacement module.

SetZDisplaceMod
void SetZDisplaceMod(const(Mod) zDisplaceMod)

Sets the @a z displacement module.

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