HighMap library (C++)
|
Wave triangular (x, y) function class. More...
#include <functions.hpp>
Public Member Functions | |
WaveTriangularFunction (Vec2< float > kw, float angle, float slant_ratio, float phase_shift) | |
Construct a new Wave Triangular Function object. | |
void | set_angle (float new_angle) |
Set the angle. | |
![]() | |
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 | slant_ratio |
Relative location of the triangle apex, in [0, 1]. | |
float | phase_shift |
Phase shift (in radians). | |
Wave triangular (x, y) function class.
This class models a wave triangular function with specific noise wavenumbers, rotation angle, slant ratio, and phase shift. It extends the base Function class.
hmap::WaveTriangularFunction::WaveTriangularFunction | ( | Vec2< float > | kw, |
float | angle, | ||
float | slant_ratio, | ||
float | phase_shift | ||
) |
Construct a new Wave Triangular Function object.
kw | Noise wavenumbers {kx, ky} for each direction, with respect to a unit domain. |
angle | Overall rotation angle (in degrees). |
slant_ratio | Relative location of the triangle apex, in [0, 1]. |
phase_shift | Phase shift (in radians). |
|
inline |
Set the angle.
new_angle | New angle. |
|
protected |
Frequency scaling vector.
|
protected |
Overall rotation angle (in degrees).
|
protected |
Relative location of the triangle apex, in [0, 1].
|
protected |
Phase shift (in radians).