Minetest  5.4.0
noise.h File Reference
#include "irr_v3d.h"
#include "exceptions.h"
#include "util/string.h"
+ Include dependency graph for noise.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PseudoRandom
 
class  PcgRandom
 
struct  NoiseParams
 
class  Noise
 

Macros

#define NOISE_FLAG_DEFAULTS   0x01
 
#define NOISE_FLAG_EASED   0x02
 
#define NOISE_FLAG_ABSVALUE   0x04
 
#define NOISE_FLAG_POINTBUFFER   0x08
 
#define NOISE_FLAG_SIMPLEX   0x10
 

Functions

float NoisePerlin2D (NoiseParams *np, float x, float y, s32 seed)
 
float NoisePerlin3D (NoiseParams *np, float x, float y, float z, s32 seed)
 
float NoisePerlin2D_PO (NoiseParams *np, float x, float xoff, float y, float yoff, s32 seed)
 
float NoisePerlin3D_PO (NoiseParams *np, float x, float xoff, float y, float yoff, float z, float zoff, s32 seed)
 
float noise2d (int x, int y, s32 seed)
 
float noise3d (int x, int y, int z, s32 seed)
 
float noise2d_gradient (float x, float y, s32 seed, bool eased=true)
 
float noise3d_gradient (float x, float y, float z, s32 seed, bool eased=false)
 
float noise2d_perlin (float x, float y, s32 seed, int octaves, float persistence, bool eased=true)
 
float noise2d_perlin_abs (float x, float y, s32 seed, int octaves, float persistence, bool eased=true)
 
float noise3d_perlin (float x, float y, float z, s32 seed, int octaves, float persistence, bool eased=false)
 
float noise3d_perlin_abs (float x, float y, float z, s32 seed, int octaves, float persistence, bool eased=false)
 
float easeCurve (float t)
 
float contour (float v)
 

Variables

FlagDesc flagdesc_noiseparams []
 

Macro Definition Documentation

◆ NOISE_FLAG_ABSVALUE

#define NOISE_FLAG_ABSVALUE   0x04

◆ NOISE_FLAG_DEFAULTS

#define NOISE_FLAG_DEFAULTS   0x01

◆ NOISE_FLAG_EASED

#define NOISE_FLAG_EASED   0x02

◆ NOISE_FLAG_POINTBUFFER

#define NOISE_FLAG_POINTBUFFER   0x08

◆ NOISE_FLAG_SIMPLEX

#define NOISE_FLAG_SIMPLEX   0x10

Function Documentation

◆ contour()

float contour ( float  v)

Referenced by OreVein::generate(), and CavesNoiseIntersection::generateCaves().

+ Here is the caller graph for this function:

◆ easeCurve()

float easeCurve ( float  t)
inline

Referenced by biLinearInterpolation(), Sky::render(), triLinearInterpolation(), and Camera::update().

+ Here is the caller graph for this function:

◆ noise2d()

float noise2d ( int  x,
int  y,
s32  seed 
)

References NOISE_MAGIC_SEED, NOISE_MAGIC_X, NOISE_MAGIC_Y, and seed.

Referenced by MapgenV6::getBiome(), Noise::gradientMap2D(), and noise2d_gradient().

+ Here is the caller graph for this function:

◆ noise2d_gradient()

float noise2d_gradient ( float  x,
float  y,
s32  seed,
bool  eased = true 
)

References biLinearInterpolation(), biLinearInterpolationNoEase(), myfloor, noise2d(), and seed.

Referenced by noise2d_perlin(), noise2d_perlin_abs(), and NoisePerlin2D().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ noise2d_perlin()

float noise2d_perlin ( float  x,
float  y,
s32  seed,
int  octaves,
float  persistence,
bool  eased = true 
)

References noise2d_gradient(), and seed.

Referenced by Clouds::gridFilled().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ noise2d_perlin_abs()

float noise2d_perlin_abs ( float  x,
float  y,
s32  seed,
int  octaves,
float  persistence,
bool  eased = true 
)

References noise2d_gradient(), and seed.

+ Here is the call graph for this function:

◆ noise3d()

float noise3d ( int  x,
int  y,
int  z,
s32  seed 
)

References NOISE_MAGIC_SEED, NOISE_MAGIC_X, NOISE_MAGIC_Y, NOISE_MAGIC_Z, and seed.

Referenced by MapBlockMesh::MapBlockMesh(), Noise::gradientMap3D(), and noise3d_gradient().

+ Here is the caller graph for this function:

◆ noise3d_gradient()

float noise3d_gradient ( float  x,
float  y,
float  z,
s32  seed,
bool  eased = false 
)

References myfloor, noise3d(), seed, triLinearInterpolation(), and triLinearInterpolationNoEase().

Referenced by noise3d_perlin(), noise3d_perlin_abs(), and NoisePerlin3D().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ noise3d_perlin()

float noise3d_perlin ( float  x,
float  y,
float  z,
s32  seed,
int  octaves,
float  persistence,
bool  eased = false 
)

References noise3d_gradient(), and seed.

+ Here is the call graph for this function:

◆ noise3d_perlin_abs()

float noise3d_perlin_abs ( float  x,
float  y,
float  z,
s32  seed,
int  octaves,
float  persistence,
bool  eased = false 
)

References noise3d_gradient(), and seed.

+ Here is the call graph for this function:

◆ NoisePerlin2D()

◆ NoisePerlin2D_PO()

float NoisePerlin2D_PO ( NoiseParams np,
float  x,
float  xoff,
float  y,
float  yoff,
s32  seed 
)
inline

References NoisePerlin2D(), seed, and NoiseParams::spread.

Referenced by MapgenV6::baseTerrainLevelFromNoise().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NoisePerlin3D()

float NoisePerlin3D ( NoiseParams np,
float  x,
float  y,
float  z,
s32  seed 
)

◆ NoisePerlin3D_PO()

float NoisePerlin3D_PO ( NoiseParams np,
float  x,
float  xoff,
float  y,
float  yoff,
float  z,
float  zoff,
s32  seed 
)
inline

References NoisePerlin3D(), seed, and NoiseParams::spread.

+ Here is the call graph for this function:

Variable Documentation

◆ flagdesc_noiseparams