载入中...
搜索中...
未找到
eve::procgen::NoiseField结构体 参考

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
 Hash 01.
 
float valueNoise (float x, float y) const
 Value noise.
 
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
 Fbm.
 
float fbmPerlin (float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
 Fbm perlin.
 
float ridged (float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
 Ridged.
 
float ridgedPerlin (float x, float y, int octaves=4, float lacunarity=2.f, float gain=0.5f) const
 Ridged perlin.
 
float warp (float x, float y, float amp, int octaves=3) const
 Warp.
 

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 第 13 行定义.

成员函数说明

◆ fbm()

float eve::procgen::NoiseField::fbm ( float  x,
float  y,
int  octaves = 4,
float  lacunarity = 2.f,
float  gain = 0.5f 
) const

Fbm.

在文件 NoiseField.cpp 第 72 行定义.

引用了 valueNoise(), x , 以及 y.

被这些函数引用 warp().

◆ fbmPerlin()

float eve::procgen::NoiseField::fbmPerlin ( float  x,
float  y,
int  octaves = 4,
float  lacunarity = 2.f,
float  gain = 0.5f 
) const

Fbm perlin.

在文件 NoiseField.cpp 第 84 行定义.

引用了 ox, oy, perlinNoise(), x , 以及 y.

被这些函数引用 eve::procgen::TerrainSampler::sample().

◆ hash01()

float eve::procgen::NoiseField::hash01 ( int  ix,
int  iy 
) const

Hash 01.

在文件 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 行定义.

引用了 dx, dy, h, hash01(), n, px, py, 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

Ridged.

在文件 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

Ridged perlin.

在文件 NoiseField.cpp 第 113 行定义.

引用了 n, ox, oy, perlinNoise(), x , 以及 y.

被这些函数引用 eve::procgen::TerrainSampler::sample().

◆ valueNoise()

float eve::procgen::NoiseField::valueNoise ( float  x,
float  y 
) const

Value noise.

在文件 NoiseField.cpp 第 32 行定义.

引用了 hash01(), x , 以及 y.

被这些函数引用 fbm() , 以及 ridged().

◆ warp()

float eve::procgen::NoiseField::warp ( float  x,
float  y,
float  amp,
int  octaves = 3 
) const

Warp.

在文件 NoiseField.cpp 第 129 行定义.

引用了 fbm(), wx, wy, x , 以及 y.

类成员变量说明

◆ periodX

int eve::procgen::NoiseField::periodX = 0

在文件 NoiseField.h 第 15 行定义.

被这些函数引用 hash01().

◆ periodY

int eve::procgen::NoiseField::periodY = 0

在文件 NoiseField.h 第 16 行定义.

被这些函数引用 hash01().

◆ seed

uint32_t eve::procgen::NoiseField::seed = 1

该结构体的文档由以下文件生成: