|
HighMap library (C++)
|
A class for generating noise functions. More...
#include <functions.hpp>


Public Member Functions | |
| NoiseFunction () | |
| Default constructor. Initializes with default frequency scaling and seed. | |
| NoiseFunction (Vec2< float > kw) | |
| Constructor to initialize with specific frequency scaling. | |
| NoiseFunction (Vec2< float > kw, uint seed) | |
| Constructor to initialize with specific frequency scaling and seed. | |
| Vec2< float > | get_kw () const |
| Get the frequency scaling vector. | |
| uint | get_seed () const |
| Get the random seed. | |
| virtual void | set_seed (uint new_seed) |
| Set a new random seed for noise generation. | |
| virtual void | set_kw (Vec2< float > new_kw) |
| Set a new frequency scaling vector. | |
Public Member Functions inherited from hmap::Function | |
| Function () | |
| Default constructor. Initializes the delegate function to a default that returns 0. | |
| virtual | ~Function ()=default |
| Virtual destructor to ensure proper cleanup in derived classes. | |
| Function (HMAP_FCT_XY_TYPE delegate) | |
| Constructor to initialize with a specific delegate function. | |
| HMAP_FCT_XY_TYPE | get_delegate () const |
| Get the current delegate function. | |
| float | get_value (float x, float y, float ctrl_param) const |
| Call the delegate function with given arguments. | |
| void | set_delegate (HMAP_FCT_XY_TYPE new_delegate) |
| Set a new delegate function. | |
Protected Attributes | |
| Vec2< float > | kw |
| Frequency scaling vector. | |
| uint | seed |
| Random seed for noise generation. | |
A class for generating noise functions.
The NoiseFunction class provides an interface for generating noise-based functions. It inherits from the Function class and adds parameters for frequency scaling (kw) and a random seed (seed) to customize the noise generation.
|
inline |
Default constructor. Initializes with default frequency scaling and seed.
|
inline |
Constructor to initialize with specific frequency scaling.
| kw | Frequency scaling vector. |
Constructor to initialize with specific frequency scaling and seed.
| kw | Frequency scaling vector. |
| seed | Random seed for noise generation. |
|
inline |
Get the frequency scaling vector.
|
inline |
Get the random seed.
|
inlinevirtual |
Set a new random seed for noise generation.
| new_seed | The new random seed. |
Reimplemented in hmap::PerlinFunction, hmap::PerlinBillowFunction, hmap::PerlinHalfFunction, hmap::PerlinMixFunction, hmap::Simplex2Function, hmap::Simplex2SFunction, hmap::ValueNoiseFunction, hmap::ValueCubicNoiseFunction, hmap::ValueDelaunayNoiseFunction, hmap::ValueLinearNoiseFunction, hmap::WorleyFunction, hmap::WorleyDoubleFunction, hmap::GenericFractalFunction, and hmap::ParberryFunction.
|
inlinevirtual |
Set a new frequency scaling vector.
| new_kw | The new frequency scaling vector. |
Reimplemented in hmap::ValueDelaunayNoiseFunction, hmap::ValueLinearNoiseFunction, and hmap::GenericFractalFunction.
|
protected |
Frequency scaling vector.
|
protected |
Random seed for noise generation.