33std::vector<float>
gradient1d(
const std::vector<float> &v);
70 Array *p_dx =
nullptr,
71 Array *p_dy =
nullptr);
94 Array *p_dx =
nullptr,
95 Array *p_dy =
nullptr);
112 Array *p_dx =
nullptr,
113 Array *p_dy =
nullptr);
130 Array *p_dx =
nullptr,
131 Array *p_dy =
nullptr);
179void gradient_x(
const Array &array, Array &dx);
202void gradient_y(
const Array &array, Array &dy);
298 float noise_amp = 0.f,
299 int prefilter_ir = -1,
300 float density_factor = 1.f,
301 bool rotate90 =
false,
302 Array *p_gnoise_x =
nullptr,
303 Array *p_gnoise_y =
nullptr);
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
unsigned int uint
Definition array.hpp:14
Definition blending.hpp:151
Array gradient_norm(const Array &array)
See hmap::gradient_norm.
Definition gradient_gpu.cpp:9
Definition algebra.hpp:28
Array gradient_x(const Array &array)
Compute the gradient in the x-direction of a 2D array.
Definition gradient.cpp:132
Array normal_map_to_heightmap(const Tensor &nmap)
Converts a normal map to a heightmap using direct summation of gradients.
Definition normal_map.cpp:32
Array unwrap_phase(const Array &alpha)
Unwraps a 2D phase array to correct discontinuities in phase data.
Definition unwrap_phase.cpp:14
Array gradient_norm_scharr(const Array &array, Array *p_dx=nullptr, Array *p_dy=nullptr)
Compute the gradient norm of a 2D array using the Scharr filter.
Definition gradient.cpp:120
Array gradient_norm(const Array &array, Array *p_dx=nullptr, Array *p_dy=nullptr)
Compute the gradient norm of a 2D array.
Definition gradient.cpp:81
Array gradient_talus(const Array &array)
Compute the gradient talus slope of a 2D array.
Definition gradient.cpp:174
Array phase_field(const Array &array, float kw, int width, uint seed, float noise_amp=0.f, int prefilter_ir=-1, float density_factor=1.f, bool rotate90=false, Array *p_gnoise_x=nullptr, Array *p_gnoise_y=nullptr)
Computes a phase field using spatially varying Gabor noise based on the input heightmap.
Definition phase_field.cpp:16
Array laplacian(const Array &array)
Compute the Laplacian of a 2D array.
Definition gradient.cpp:202
Array gradient_y(const Array &array)
Compute the gradient in the y-direction of a 2D array.
Definition gradient.cpp:153
Array gradient_norm_prewitt(const Array &array, Array *p_dx=nullptr, Array *p_dy=nullptr)
Compute the gradient norm of a 2D array using the Prewitt filter.
Definition gradient.cpp:94
std::vector< float > gradient1d(const std::vector< float > &v)
Compute the gradient of a 1D vector.
Definition vector.cpp:16
Array gradient_norm_sobel(const Array &array, Array *p_dx=nullptr, Array *p_dy=nullptr)
Compute the gradient norm of a 2D array using the Sobel filter.
Definition gradient.cpp:107
Array gradient_angle(const Array &array, bool downward=false)
Compute the polar angle of the gradient of a 2D array.
Definition gradient.cpp:60
Tensor normal_map(const Array &array)
Generates a normal map from a given 2D array.
Definition normal_map.cpp:12
Header file for the Tensor class.