Wrapper class for FastNoise that is exposed to Lua.
More...
|
| 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.
|
|
|
static Prototype * | lua_codegen_cast (Object *parent_inst) |
| Object name in database.
|
|
Wrapper class for FastNoise that is exposed to Lua.
Definition at line 14 of file NoiseGenerator.h.
◆ get_noise()
float NoiseGenerator::get_noise |
( |
float | x, |
|
|
float | y, |
|
|
float | z ) |
|
inline |
Generates 3D noise based on the current settings.
- Parameters
-
x | The X coordinate. |
y | The Y coordinate. |
z | The 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
-
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
-
lacunarity | The 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
-
octaves | The 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_type | The 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
-
frequency | The 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_type | The 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
-
Definition at line 32 of file NoiseGenerator.h.