Clamp

Noise module that clamps the output value from a source module to a range of values.

@image html moduleclamp.png

The range of values in which to clamp the output value is called the <i>clamping range</i>.

If the output value from the source module is less than the lower bound of the clamping range, this noise module clamps that value to the lower bound. If the output value from the source module is greater than the upper bound of the clamping range, this noise module clamps that value to the upper bound.

To specify the upper and lower bounds of the clamping range, call the SetBounds() method.

This noise module requires one source module.

Constructors

this
this()

Constructor.

Members

Functions

GetLowerBound
double GetLowerBound()

Returns the lower bound of the clamping range.

GetSourceModCount
int GetSourceModCount()
Undocumented in source. Be warned that the author may not have intended to support it.
GetUpperBound
double GetUpperBound()

Returns the upper bound of the clamping range.

GetValue
double GetValue(double x, double y, double z)
Undocumented in source. Be warned that the author may not have intended to support it.
SetBounds
void SetBounds(double lowerBound, double upperBound)

Sets the lower and upper bounds of the clamping range.

Variables

m_lowerBound
double m_lowerBound;

Lower bound of the clamping range.

m_upperBound
double m_upperBound;

Upper bound of the clamping range.

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