C# Class LibNoise.Transformer.Turbulence

Noise module that randomly displaces the input value before returning the output value from a source module. Turbulence is the pseudo-random displacement of the input value. The GetValue() method randomly displaces the ( x, y, z ) coordinates of the input value before retrieving the output value from the source module. The power of the turbulence determines the scaling factor that is applied to the displacement amount. To specify the power, use the Power property. Use of this noise module may require some trial and error. Assuming that you are using a generator module as the source module, you should first set the power to the reciprocal of the frequency. Displacing the input values result in more realistic terrain and textures. If you are generating elevations for terrain height maps, you can use this noise module to produce more realistic mountain ranges or terrain features that look like flowing lava rock. If you are generating values for textures, you can use this noise module to produce realistic marble-like or "oily" textures. Internally, there are three noise modules that displace the input value; one for the x, one for the y, and one for the z coordinate.
Inheritance: TransformerModule, IModule3D
Afficher le fichier Open project: everbytes/LibNoise

Protected Properties

Свойство Type Description
_power float
_sourceModule IModule
_xDistortModule IModule
_yDistortModule IModule
_zDistortModule IModule

Méthodes publiques

Méthode Description
GetValue ( float x, float y, float z ) : float

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

Turbulence ( )

Create a new noise module with default values

Turbulence ( IModule source )

Create a new noise module with the given values

Turbulence ( IModule source, IModule xDistortModule, IModule yDistortModule, IModule zDistortModule, float power )

Create a new noise module with the given values.

Method Details

GetValue() public méthode

Generates an output value given the coordinates of the specified input value.
public GetValue ( float x, float y, float z ) : float
x float The input coordinate on the x-axis.
y float The input coordinate on the y-axis.
z float The input coordinate on the z-axis.
Résultat float

Turbulence() public méthode

Create a new noise module with default values
public Turbulence ( )

Turbulence() public méthode

Create a new noise module with the given values
public Turbulence ( IModule source )
source IModule the source module

Turbulence() public méthode

Create a new noise module with the given values.
public Turbulence ( IModule source, IModule xDistortModule, IModule yDistortModule, IModule zDistortModule, float power )
source IModule the source module
xDistortModule IModule the noise module that displaces the x coordinate
yDistortModule IModule the noise module that displaces the y coordinate
zDistortModule IModule the noise module that displaces the z coordinate
power float the power of the turbulence

Property Details

_power protected_oe property

The power (scale) of the displacement.
protected float _power
Résultat float

_sourceModule protected_oe property

The source input module
protected IModule _sourceModule
Résultat IModule

_xDistortModule protected_oe property

Noise module that displaces the x coordinate.
protected IModule _xDistortModule
Résultat IModule

_yDistortModule protected_oe property

Noise module that displaces the y coordinate.
protected IModule _yDistortModule
Résultat IModule

_zDistortModule protected_oe property

Noise module that displaces the z coordinate.
protected IModule _zDistortModule
Résultat IModule