LibGame  v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
fnl_state Struct Reference

Data Fields

int seed
 
float frequency
 
fnl_noise_type noise_type
 
fnl_rotation_type_3d rotation_type_3d
 
fnl_fractal_type fractal_type
 
int octaves
 
float lacunarity
 
float gain
 
float weighted_strength
 
float ping_pong_strength
 
fnl_cellular_distance_func cellular_distance_func
 
fnl_cellular_return_type cellular_return_type
 
float cellular_jitter_mod
 
fnl_domain_warp_type domain_warp_type
 
float domain_warp_amp
 

Detailed Description

Structure containing entire noise system state.

Note
Must only be created using fnlCreateState(optional: seed). To ensure defaults are set.

Field Documentation

◆ seed

int fnl_state::seed

Seed used for all noise types.

Remarks
Default: 1337

◆ frequency

float fnl_state::frequency

The frequency for all noise types.

Remarks
Default: 0.01

◆ noise_type

fnl_noise_type fnl_state::noise_type

The noise algorithm to be used by GetNoise(...).

Remarks
Default: FNL_NOISE_OPENSIMPLEX2

◆ rotation_type_3d

fnl_rotation_type_3d fnl_state::rotation_type_3d

Sets noise rotation type for 3D.

Remarks
Default: FNL_ROTATION_NONE

◆ fractal_type

fnl_fractal_type fnl_state::fractal_type

The method used for combining octaves for all fractal noise types.

Remarks
Default: None
FNL_FRACTAL_DOMAIN_WARP_... only effects fnlDomainWarp...

◆ octaves

int fnl_state::octaves

The octave count for all fractal noise types.

Remarks
Default: 3

◆ lacunarity

float fnl_state::lacunarity

The octave lacunarity for all fractal noise types.

Remarks
Default: 2.0

◆ gain

float fnl_state::gain

The octave gain for all fractal noise types.

Remarks
Default: 0.5

◆ weighted_strength

float fnl_state::weighted_strength

The octave weighting for all none Domaain Warp fractal types.

Remarks
Default: 0.0

◆ ping_pong_strength

float fnl_state::ping_pong_strength

The strength of the fractal ping pong effect.

Remarks
Default: 2.0

◆ cellular_distance_func

fnl_cellular_distance_func fnl_state::cellular_distance_func

The distance function used in cellular noise calculations.

Remarks
Default: FNL_CELLULAR_DISTANCE_EUCLIDEANSQ

◆ cellular_return_type

fnl_cellular_return_type fnl_state::cellular_return_type

The cellular return type from cellular noise calculations.

Remarks
Default: FNL_CELLULAR_RETURN_TYPE_DISTANCE

◆ cellular_jitter_mod

float fnl_state::cellular_jitter_mod

The maximum distance a cellular point can move from it's grid position.

Remarks
Default: 1.0
Note
Setting this higher than 1 will cause artifacts.

◆ domain_warp_type

fnl_domain_warp_type fnl_state::domain_warp_type

The warp algorithm when using fnlDomainWarp...

Remarks
Default: OpenSimplex2

◆ domain_warp_amp

float fnl_state::domain_warp_amp

The maximum warp distance from original position when using fnlDomainWarp...

Remarks
Default: 1.0

The documentation for this struct was generated from the following file: