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

Wave dune (x, y) function class. More...

#include <functions.hpp>

Inheritance diagram for hmap::WaveDuneFunction:
Collaboration diagram for hmap::WaveDuneFunction:

Public Member Functions

 WaveDuneFunction (Vec2< float > kw, float angle, float xtop, float xbottom, float phase_shift)
 Construct a new Wave Dune Function object.
 
void set_angle (float new_angle)
 Set the angle.
 
- 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.
 
float angle
 Overall rotation angle (in degrees).
 
float xtop
 Relative location of the top of the dune profile (in [0, 1]).
 
float xbottom
 1]).
 
float phase_shift
 Phase shift (in radians).
 

Detailed Description

Wave dune (x, y) function class.

This class models a wave dune function with specific noise wavenumbers, rotation angle, slant ratio, and phase shift. It extends the base Function class.

Constructor & Destructor Documentation

◆ WaveDuneFunction()

hmap::WaveDuneFunction::WaveDuneFunction ( Vec2< float >  kw,
float  angle,
float  xtop,
float  xbottom,
float  phase_shift 
)

Construct a new Wave Dune Function object.

Parameters
kwNoise wavenumbers {kx, ky} for each direction, with respect to a unit domain.
angleOverall rotation angle (in degrees).
xtopRelative location of the top of the dune profile (in [0, 1]).
xbottomRelative location of the foot of the dune profile (in [0, 1]).
phase_shiftPhase shift (in radians).

Member Function Documentation

◆ set_angle()

void hmap::WaveDuneFunction::set_angle ( float  new_angle)
inline

Set the angle.

Parameters
new_angleNew angle.

Member Data Documentation

◆ kw

Vec2<float> hmap::WaveDuneFunction::kw
protected

Frequency scaling vector.

◆ angle

float hmap::WaveDuneFunction::angle
protected

Overall rotation angle (in degrees).

◆ xtop

float hmap::WaveDuneFunction::xtop
protected

Relative location of the top of the dune profile (in [0, 1]).

◆ xbottom

float hmap::WaveDuneFunction::xbottom
protected

1]).

Relative location of the foot of the dune profile (in [0,

◆ phase_shift

float hmap::WaveDuneFunction::phase_shift
protected

Phase shift (in radians).


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