Evospace  0.19.0
Modding API
 
Loading...
Searching...
No Matches
NoiseGenerator Class Reference

Wrapper class for FastNoise that is exposed to Lua. More...

Inheritance diagram for NoiseGenerator:
Prototype

Public Member Functions

 NoiseGenerator ()
 Constructor for FastNoiseWrapper. Initializes with Simplex noise by default.
 
void set_seed (int seed)
 Sets the seed for noise generation.
 
float get_noise (float x, float y, float z)
 Generates 3D noise based on the current settings.
 
void set_noise_type (const std::string &noise_type)
 Sets the noise type ("Simplex", "SimplexFractal", "Perlin", "SimplexFractal", "PerlinFractal", "Cellular", "Value", "ValueFractal", "Cubic", "CubicFractal", "White").
 
void set_frequency (float frequency) const
 Sets the frequency for noise generation.
 
void set_fractal_octaves (int octaves) const
 Sets the fractal octaves for noise generation.
 
void set_fractal_gain (float gain)
 Sets the fractal gain for noise generation.
 
void set_fractal_lacunarity (float lacunarity)
 Sets the fractal lacunarity for noise generation.
 
void set_fractal_type (const std::string &fractal_type) const
 Sets the fractal type for noise generation.
 
- Public Member Functions inherited from Prototype

Additional Inherited Members

- Static Public Member Functions inherited from Prototype
static Prototypelua_codegen_cast (Object *parent_inst)
 Object name in database.
 
- Public Attributes inherited from Prototype
- Protected Member Functions inherited from Prototype

Detailed Description

Wrapper class for FastNoise that is exposed to Lua.

Definition at line 14 of file NoiseGenerator.h.

Member Function Documentation

◆ get_noise()

float NoiseGenerator::get_noise ( float x,
float y,
float z )
inline

Generates 3D noise based on the current settings.

Parameters
xThe X coordinate.
yThe Y coordinate.
zThe Z coordinate.
Returns
The noise value.

Definition at line 43 of file NoiseGenerator.h.

◆ set_fractal_gain()

void NoiseGenerator::set_fractal_gain ( float gain)
inline

Sets the fractal gain for noise generation.

Parameters
gainThe gain value.

Definition at line 94 of file NoiseGenerator.h.

◆ set_fractal_lacunarity()

void NoiseGenerator::set_fractal_lacunarity ( float lacunarity)
inline

Sets the fractal lacunarity for noise generation.

Parameters
lacunarityThe lacunarity value.

Definition at line 102 of file NoiseGenerator.h.

◆ set_fractal_octaves()

void NoiseGenerator::set_fractal_octaves ( int octaves) const
inline

Sets the fractal octaves for noise generation.

Parameters
octavesThe number of octaves.

Definition at line 86 of file NoiseGenerator.h.

◆ set_fractal_type()

void NoiseGenerator::set_fractal_type ( const std::string & fractal_type) const
inline

Sets the fractal type for noise generation.

Parameters
fractal_typeThe fractal type (e.g., "BM", "RigidMulti", "Billow").

Definition at line 110 of file NoiseGenerator.h.

◆ set_frequency()

void NoiseGenerator::set_frequency ( float frequency) const
inline

Sets the frequency for noise generation.

Parameters
frequencyThe frequency value.

Definition at line 78 of file NoiseGenerator.h.

◆ set_noise_type()

void NoiseGenerator::set_noise_type ( const std::string & noise_type)
inline

Sets the noise type ("Simplex", "SimplexFractal", "Perlin", "SimplexFractal", "PerlinFractal", "Cellular", "Value", "ValueFractal", "Cubic", "CubicFractal", "White").

Parameters
noise_typeThe type of noise to generate.

Definition at line 54 of file NoiseGenerator.h.

◆ set_seed()

void NoiseGenerator::set_seed ( int seed)
inline

Sets the seed for noise generation.

Parameters
seedThe seed value.

Definition at line 32 of file NoiseGenerator.h.