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

Perlin 'half' (x, y) function class. More...

#include <functions.hpp>

Inheritance diagram for hmap::PerlinHalfFunction:
Collaboration diagram for hmap::PerlinHalfFunction:

Public Member Functions

 PerlinHalfFunction (Vec2< float > kw, uint seed, float k)
 Construct a new Perlin Function object.
 
void set_seed (uint new_seed)
 Set the seed attribute.
 
- 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.
 
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.
 

Public Attributes

float k
 

Additional Inherited Members

- Protected Attributes inherited from hmap::NoiseFunction
Vec2< float > kw
 Frequency scaling vector.
 
uint seed
 Random seed for noise generation.
 

Detailed Description

Perlin 'half' (x, y) function class.

Constructor & Destructor Documentation

◆ PerlinHalfFunction()

hmap::PerlinHalfFunction::PerlinHalfFunction ( Vec2< float >  kw,
uint  seed,
float  k 
)

Construct a new Perlin Function object.

Parameters
kwNoise wavenumbers {kx, ky} for each directions, with respect to a unit domain.
seedRandom seed number.
kSmoothing factor.

Member Function Documentation

◆ set_seed()

void hmap::PerlinHalfFunction::set_seed ( uint  new_seed)
inlinevirtual

Set the seed attribute.

Parameters
new_seedNew seed.

Reimplemented from hmap::NoiseFunction.

Member Data Documentation

◆ k

float hmap::PerlinHalfFunction::k

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