C# Класс 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.
Наследование: TransformerModule, IModule3D
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_power float
_sourceModule IModule
_xDistortModule IModule
_yDistortModule IModule
_zDistortModule IModule

Открытые методы

Метод Описание
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.

Описание методов

GetValue() публичный Метод

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.
Результат float

Turbulence() публичный Метод

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

Turbulence() публичный Метод

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

Turbulence() публичный Метод

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

Описание свойств

_power защищенное свойство

The power (scale) of the displacement.
protected float _power
Результат float

_sourceModule защищенное свойство

The source input module
protected IModule _sourceModule
Результат IModule

_xDistortModule защищенное свойство

Noise module that displaces the x coordinate.
protected IModule _xDistortModule
Результат IModule

_yDistortModule защищенное свойство

Noise module that displaces the y coordinate.
protected IModule _yDistortModule
Результат IModule

_zDistortModule защищенное свойство

Noise module that displaces the z coordinate.
protected IModule _zDistortModule
Результат IModule