C# Класс LibNoise.Noise2D

Provides a two-dimensional noise map.
This covers most of the functionality from LibNoise's noiseutils library, but the method calls might not be the same. See the tutorials project if you're wondering which calls are equivalent.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Clear ( ) : void

Clears the noise map.

Clear ( float value ) : void

Clears the noise map.

Dispose ( ) : void

Immediately releases the unmanaged resources used by this object.

GenerateCylindrical ( float angleMin, float angleMax, float heightMin, float heightMax ) : void

Generates a cylindrical projection of the noise map.

GeneratePlanar ( float left, float right, float top, float bottom ) : void

Generates a planar projection of the noise map.

GeneratePlanar ( float left, float right, float top, float bottom, bool seamless ) : void

Generates a non-seamless planar projection of the noise map.

GenerateSpherical ( float south, float north, float west, float east ) : void

Generates a spherical projection of the noise map.

GetNormalMap ( float scale ) : Texture2D

Creates a normal map for the current content of the noise map.

GetTexture ( ) : Texture2D

Creates a grayscale texture map for the current content of the noise map.

GetTexture ( Gradient gradient ) : Texture2D

Creates a texture map for the current content of the noise map.

Noise2D ( int size ) : System

Initializes a new instance of Noise2D.

Noise2D ( int size, ModuleBase generator ) : System

Initializes a new instance of Noise2D.

Noise2D ( int width, int height ) : System

Initializes a new instance of Noise2D.

Noise2D ( int width, int height, ModuleBase generator ) : System

Initializes a new instance of Noise2D.

this ( int x, int y ) : float

Gets or sets a value in the noise map by its position.

Защищенные методы

Метод Описание
Disposing ( ) : bool

Immediately releases the unmanaged resources used by this object.

Noise2D ( ) : System

Initializes a new instance of Noise2D.

Приватные методы

Метод Описание
GenerateCylindrical ( float angle, float height ) : float

Generates a cylindrical projection of a point in the noise map.

GeneratePlanar ( float x, float y ) : float

Generates a planar projection of a point in the noise map.

GenerateSpherical ( float lat, float lon ) : float

Generates a spherical projection of a point in the noise map.

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

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

Clears the noise map.
public Clear ( ) : void
Результат void

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

Clears the noise map.
public Clear ( float value ) : void
value float The constant value to clear the noise map with.
Результат void

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

Immediately releases the unmanaged resources used by this object.
public Dispose ( ) : void
Результат void

Disposing() защищенный Метод

Immediately releases the unmanaged resources used by this object.
protected Disposing ( ) : bool
Результат bool

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

Generates a cylindrical projection of the noise map.
public GenerateCylindrical ( float angleMin, float angleMax, float heightMin, float heightMax ) : void
angleMin float The maximum angle of the clip region.
angleMax float The minimum angle of the clip region.
heightMin float The minimum height of the clip region.
heightMax float The maximum height of the clip region.
Результат void

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

Generates a planar projection of the noise map.
public GeneratePlanar ( float left, float right, float top, float bottom ) : void
left float The clip region to the left.
right float The clip region to the right.
top float The clip region to the top.
bottom float The clip region to the bottom.
Результат void

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

Generates a non-seamless planar projection of the noise map.
public GeneratePlanar ( float left, float right, float top, float bottom, bool seamless ) : void
left float The clip region to the left.
right float The clip region to the right.
top float The clip region to the top.
bottom float The clip region to the bottom.
seamless bool Indicates whether the resulting noise map should be seamless.
Результат void

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

Generates a spherical projection of the noise map.
public GenerateSpherical ( float south, float north, float west, float east ) : void
south float The clip region to the south.
north float The clip region to the north.
west float The clip region to the west.
east float The clip region to the east.
Результат void

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

Creates a normal map for the current content of the noise map.
public GetNormalMap ( float scale ) : Texture2D
scale float The scaling of the normal map values.
Результат UnityEngine.Texture2D

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

Creates a grayscale texture map for the current content of the noise map.
public GetTexture ( ) : Texture2D
Результат UnityEngine.Texture2D

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

Creates a texture map for the current content of the noise map.
public GetTexture ( Gradient gradient ) : Texture2D
gradient Gradient The gradient to color the texture map with.
Результат UnityEngine.Texture2D

Noise2D() защищенный Метод

Initializes a new instance of Noise2D.
protected Noise2D ( ) : System
Результат System

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

Initializes a new instance of Noise2D.
public Noise2D ( int size ) : System
size int The width and height of the noise map.
Результат System

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

Initializes a new instance of Noise2D.
public Noise2D ( int size, ModuleBase generator ) : System
size int The width and height of the noise map.
generator ModuleBase The generator module.
Результат System

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

Initializes a new instance of Noise2D.
public Noise2D ( int width, int height ) : System
width int The width of the noise map.
height int The height of the noise map.
Результат System

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

Initializes a new instance of Noise2D.
public Noise2D ( int width, int height, ModuleBase generator ) : System
width int The width of the noise map.
height int The height of the noise map.
generator ModuleBase The generator module.
Результат System

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

Gets or sets a value in the noise map by its position.
public this ( int x, int y ) : float
x int The position on the x-axis.
y int The position on the y-axis.
Результат float