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

Jordan layering function class. More...

#include <functions.hpp>

Inheritance diagram for hmap::FbmJordanFunction< BaseFn >:
Collaboration diagram for hmap::FbmJordanFunction< BaseFn >:

Public Member Functions

float operator() (float x, float y, float ctrl_param=0.f) const
 FbmJordanFunction (BaseFn 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< BaseFn >
 GenericFractalFunction (BaseFn base, int octaves, float weight, float persistence, float lacunarity)
 Construct a new GenericFractalFunction object.
void set_kw (glm::vec2 new_kw)
 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 (std::uint32_t new_seed)
 Set a new random seed for the noise generation.
void scale_amp0 (float scale)
 Scale the initial amplitude of the fractal noise.
void set_stretch (float new_angle, float new_stretch, float new_stretch_decay=0.f)
 Configure directional stretching for 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 (glm::vec2 kw)
 Constructor to initialize with specific frequency scaling.
 NoiseFunction (glm::vec2 kw, std::uint32_t seed)
 Constructor to initialize with specific frequency scaling and seed.
glm::vec2 get_kw () const
 Get the frequency scaling vector.
std::uint32_t get_seed () const
 Get the random seed.
void set_seed (std::uint32_t new_seed)
 Set a new random seed for noise generation.
void set_kw (glm::vec2 new_kw)
 Set a new frequency scaling vector.

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< BaseFn >
BaseFn 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.
float angle = 0.f
 Direction angle in degrees.
float stretch = 1.f
 Stretching factor along the direction.
float stretch_decay = 0.f
 Stretching decay across octaves.
float cos_a = 1.f
 Cosine of direction angle.
float sin_a = 0.f
 Sine of direction angle.
Protected Attributes inherited from hmap::NoiseFunction
glm::vec2 kw
 Frequency scaling vector.
std::uint32_t seed
 Random seed for noise generation.

Additional Inherited Members

Protected Member Functions inherited from hmap::GenericFractalFunction< BaseFn >
void update_amp0 ()
 Update the initial amplitude (amp0) based on the current octaves and persistence.
void apply_stretch (float &x, float &y, int octave) const
 Apply directional stretching to coordinates for a given octave.

Detailed Description

template<typename BaseFn>
class hmap::FbmJordanFunction< BaseFn >

Jordan layering function class.

Constructor & Destructor Documentation

◆ FbmJordanFunction()

template<typename BaseFn>
hmap::FbmJordanFunction< BaseFn >::FbmJordanFunction ( BaseFn 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

◆ operator()()

template<typename BaseFn>
float hmap::FbmJordanFunction< BaseFn >::operator() ( float x,
float y,
float ctrl_param = 0.f ) const

◆ set_warp0()

template<typename BaseFn>
void hmap::FbmJordanFunction< BaseFn >::set_warp0 ( float new_warp0)
inline

Set the initial warp.

Parameters
new_warp0New initial warp.

◆ set_damp0()

template<typename BaseFn>
void hmap::FbmJordanFunction< BaseFn >::set_damp0 ( float new_damp0)
inline

Set the initial damp.

Parameters
new_damp0New initial damp.

◆ set_warp_scale()

template<typename BaseFn>
void hmap::FbmJordanFunction< BaseFn >::set_warp_scale ( float new_warp_scale)
inline

Set the warp scale.

Parameters
new_warp_scaleNew warp scale.

◆ set_damp_scale()

template<typename BaseFn>
void hmap::FbmJordanFunction< BaseFn >::set_damp_scale ( float new_damp_scale)
inline

Set the damp scale.

Parameters
new_damp_scaleNew damp scale.

Member Data Documentation

◆ warp0

template<typename BaseFn>
float hmap::FbmJordanFunction< BaseFn >::warp0
protected

Initial warp.

◆ damp0

template<typename BaseFn>
float hmap::FbmJordanFunction< BaseFn >::damp0
protected

Initial damp.

◆ warp_scale

template<typename BaseFn>
float hmap::FbmJordanFunction< BaseFn >::warp_scale
protected

Warp scale.

◆ damp_scale

template<typename BaseFn>
float hmap::FbmJordanFunction< BaseFn >::damp_scale
protected

Damp scale.


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