载入中...
搜索中...
未找到
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
 
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.h11 行定义.

成员函数说明

◆ fbm()

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

在文件 NoiseField.cpp72 行定义.

引用了 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

在文件 NoiseField.cpp84 行定义.

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

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

◆ hash01()

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

在文件 NoiseField.cpp21 行定义.

引用了 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.cpp46 行定义.

引用了 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.cpp99 行定义.

引用了 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.cpp113 行定义.

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

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

◆ valueNoise()

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

在文件 NoiseField.cpp32 行定义.

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

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

◆ warp()

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

在文件 NoiseField.cpp129 行定义.

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

类成员变量说明

◆ periodX

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

在文件 NoiseField.h13 行定义.

被这些函数引用 hash01().

◆ periodY

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

在文件 NoiseField.h14 行定义.

被这些函数引用 hash01().

◆ seed

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

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