Mod.SetSourceMod

Connects a source module to this noise module.

@param index An index value to assign to this source module. @param sourceMod The source module to attach.

@pre The index value ranges from 0 to one less than the number of source modules required by this noise module.

@throw new noise::ExceptionInvalidParam An invalid parameter was specified; see the preconditions for more information.

A noise module mathematically combines the output values from the source modules to generate the value returned by GetValue().

The index value to assign a source module is a unique identifier for that source module. If an index value has already been assigned to a source module, this noise module replaces the old source module with the new source module.

Before an application can call the GetValue() method, it must first connect all required source modules. To determine the number of source modules required by this noise module, call the GetSourceModCount() method.

This source module must exist throughout the lifetime of this noise module unless another source module replaces that source module.

A noise module does not modify a source module; it only modifies its output values.

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

Meta