HighMap library (C++)
Loading...
Searching...
No Matches
hmap::FbmJordanFunction Class Reference

Jordan layering function class. More...

#include <functions.hpp>

Inheritance diagram for hmap::FbmJordanFunction:
Collaboration diagram for hmap::FbmJordanFunction:

Public Member Functions

 FbmJordanFunction (std::unique_ptr< NoiseFunction > p_base, int octaves, float weight, float persistence, float lacunarity, float warp0, float damp0, float warp_scale, float damp_scale)
 Construct a new Fbm Jordan Function object.
 
void set_warp0 (float new_warp0)
 Set the initial warp.
 
void set_damp0 (float new_damp0)
 Set the initial damp.
 
void set_warp_scale (float new_warp_scale)
 Set the warp scale.
 
void set_damp_scale (float new_damp_scale)
 Set the damp scale.
 
- Public Member Functions inherited from hmap::GenericFractalFunction
 GenericFractalFunction (std::unique_ptr< NoiseFunction > p_base, int octaves, float weight, float persistence, float lacunarity)
 Construct a new GenericFractalFunction object.
 
void set_kw (Vec2< float > new_kw) override
 Set the frequency scaling vector.
 
void set_lacunarity (float new_lacunarity)
 Set the lacunarity of the fractal noise.
 
void set_octaves (int new_octaves)
 Set the number of octaves in the fractal noise.
 
void set_persistence (float new_persistence)
 Set the persistence of the fractal noise.
 
void set_seed (uint new_seed) override
 Set a new random seed for the noise generation.
 
void scale_amp0 (float scale)
 Scale the initial amplitude of the fractal noise.
 
float get_lacunarity () const
 Get the lacunarity of the fractal noise.
 
int get_octaves () const
 Get the number of octaves in the fractal noise.
 
float get_persistence () const
 Get the persistence of the fractal noise.
 
float get_weight () const
 Get the weight of the fractal noise.
 
- Public Member Functions inherited from hmap::NoiseFunction
 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.
 
- 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

float warp0
 Initial warp.
 
float damp0
 Initial damp.
 
float warp_scale
 Warp scale.
 
float damp_scale
 Damp scale.
 
- Protected Attributes inherited from hmap::GenericFractalFunction
std::unique_ptr< NoiseFunctionp_base
 Unique pointer to the base noise function.
 
int octaves
 Number of octaves in the fractal noise.
 
float weight
 Weight of the base noise function.
 
float persistence
 Persistence of the fractal noise.
 
float lacunarity
 Lacunarity of the fractal noise.
 
float amp0
 Initial amplitude of the fractal noise.
 
- Protected Attributes inherited from hmap::NoiseFunction
Vec2< float > kw
 Frequency scaling vector.
 
uint seed
 Random seed for noise generation.
 

Additional Inherited Members

- Protected Member Functions inherited from hmap::GenericFractalFunction
void update_amp0 ()
 Update the initial amplitude (amp0) based on the current octaves and persistence.
 

Detailed Description

Jordan layering function class.

Constructor & Destructor Documentation

◆ FbmJordanFunction()

hmap::FbmJordanFunction::FbmJordanFunction ( std::unique_ptr< NoiseFunction p_base,
int  octaves,
float  weight,
float  persistence,
float  lacunarity,
float  warp0,
float  damp0,
float  warp_scale,
float  damp_scale 
)

Construct a new Fbm Jordan Function object.

Parameters
p_baseUnique pointer to the base noise function.
octavesNumber of octaves.
weightOctave weighting.
persistenceOctave persistence.
lacunarityDefines the wavenumber ratio between each octave.
warp0Initial warp.
damp0Initial damp.
warp_scaleWarp scale.
damp_scaleDamp scale.

Member Function Documentation

◆ set_warp0()

void hmap::FbmJordanFunction::set_warp0 ( float  new_warp0)
inline

Set the initial warp.

Parameters
new_warp0New initial warp.

◆ set_damp0()

void hmap::FbmJordanFunction::set_damp0 ( float  new_damp0)
inline

Set the initial damp.

Parameters
new_damp0New initial damp.

◆ set_warp_scale()

void hmap::FbmJordanFunction::set_warp_scale ( float  new_warp_scale)
inline

Set the warp scale.

Parameters
new_warp_scaleNew warp scale.

◆ set_damp_scale()

void hmap::FbmJordanFunction::set_damp_scale ( float  new_damp_scale)
inline

Set the damp scale.

Parameters
new_damp_scaleNew damp scale.

Member Data Documentation

◆ warp0

float hmap::FbmJordanFunction::warp0
protected

Initial warp.

◆ damp0

float hmap::FbmJordanFunction::damp0
protected

Initial damp.

◆ warp_scale

float hmap::FbmJordanFunction::warp_scale
protected

Warp scale.

◆ damp_scale

float hmap::FbmJordanFunction::damp_scale
protected

Damp scale.


The documentation for this class was generated from the following files: