Deterministic value-noise helpers for pixel textures. When periodX/periodY > 0, lattice wraps for seamless tiling. 更多...
#include <NoiseField.h>
Public 成员函数 | |
| float | hash01 (int ix, int iy) const |
| float | valueNoise (float x, float y) const |
| float | perlinNoise (float x, float y) const |
| Classic 2D Perlin gradient noise, remapped to [0, 1]. | |
| float | fbm (float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const |
| float | fbmPerlin (float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const |
| float | ridged (float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const |
| float | ridgedPerlin (float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const |
| float | warp (float x, float y, float amp, int octaves=3) const |
Public 属性 | |
| uint32_t | seed = 1 |
| int | periodX = 0 |
| int | periodY = 0 |
详细描述
Deterministic value-noise helpers for pixel textures. When periodX/periodY > 0, lattice wraps for seamless tiling.
在文件 NoiseField.h 第 11 行定义.
成员函数说明
◆ fbm()
◆ fbmPerlin()
| float eve::procgen::NoiseField::fbmPerlin | ( | float | x, |
| float | y, | ||
| int | octaves = 4, |
||
| float | lacunarity = 2.f, |
||
| float | gain = 0.5f |
||
| ) | const |
在文件 NoiseField.cpp 第 84 行定义.
引用了 perlinNoise(), x , 以及 y.
◆ hash01()
| float eve::procgen::NoiseField::hash01 | ( | int | ix, |
| int | iy | ||
| ) | const |
在文件 NoiseField.cpp 第 21 行定义.
引用了 h, periodX, periodY , 以及 seed.
被这些函数引用 perlinNoise() , 以及 valueNoise().
◆ perlinNoise()
| float eve::procgen::NoiseField::perlinNoise | ( | float | x, |
| float | y | ||
| ) | const |
Classic 2D Perlin gradient noise, remapped to [0, 1].
在文件 NoiseField.cpp 第 46 行定义.
引用了 h, hash01(), n, px, x , 以及 y.
被这些函数引用 fbmPerlin(), ridgedPerlin() , 以及 eve::procgen::TerrainSampler::sample().
◆ ridged()
| float eve::procgen::NoiseField::ridged | ( | float | x, |
| float | y, | ||
| int | octaves = 4, |
||
| float | lacunarity = 2.f, |
||
| float | gain = 0.5f |
||
| ) | const |
在文件 NoiseField.cpp 第 99 行定义.
引用了 n, valueNoise(), x , 以及 y.
◆ ridgedPerlin()
| float eve::procgen::NoiseField::ridgedPerlin | ( | float | x, |
| float | y, | ||
| int | octaves = 4, |
||
| float | lacunarity = 2.f, |
||
| float | gain = 0.5f |
||
| ) | const |
在文件 NoiseField.cpp 第 113 行定义.
引用了 n, perlinNoise(), x , 以及 y.
◆ valueNoise()
| float eve::procgen::NoiseField::valueNoise | ( | float | x, |
| float | y | ||
| ) | const |
◆ warp()
| float eve::procgen::NoiseField::warp | ( | float | x, |
| float | y, | ||
| float | amp, | ||
| int | octaves = 3 |
||
| ) | const |
在文件 NoiseField.cpp 第 129 行定义.
类成员变量说明
◆ periodX
| int eve::procgen::NoiseField::periodX = 0 |
在文件 NoiseField.h 第 13 行定义.
被这些函数引用 hash01().
◆ periodY
| int eve::procgen::NoiseField::periodY = 0 |
在文件 NoiseField.h 第 14 行定义.
被这些函数引用 hash01().
◆ seed
| uint32_t eve::procgen::NoiseField::seed = 1 |
该结构体的文档由以下文件生成:
- src/modules/procgen/texture/NoiseField.h
- src/modules/procgen/texture/NoiseField.cpp