56 float max_displacement,
76 float contrast = 0.5f,
77 float brightness = 0.5f);
264 glm::vec2 center = {0.5f, 0.5f},
467 const Array &array_blend);
471 bool ridge_select =
false,
538 float gradient_weight = 1.f,
539 float gradient_scaling_factor = 0.f,
540 float flow_weight = 0.05f,
541 float talus_ref = 0.f,
542 float clipping_ratio = 50.f,
543 float flow_gamma = 1.f,
544 float k_smooth = 0.01f,
584 float smaller_scales_weight = 1.f,
586 float curvature_clamping = 1.f,
629 int ir_curvature = 0,
632 float curvature_clamping = 10.f,
633 float curvature_weight = 1.f,
634 float gradient_weight = 1.f,
635 float gradient_scaling_factor = 0.f,
644 float curvature_clamping,
645 float curvature_weight,
646 float gradient_weight,
647 float gradient_scaling_factor,
676 bool ridge_select =
false,
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:31
Abstract communicator interface providing MPI-style collective directives for single-source SPMD Arra...
Definition communicator_interface.hpp:60
static SingleArrayComm & instance()
Definition communicator.cpp:78
Definition array_blending.hpp:225
Array select_cavities(const Array &array, int ir, bool concave=true, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
See hmap::select_cavities.
Definition selector_gpu.cpp:16
Array select_soil_flow(const Array &z, int ir_gradient=1, float gradient_weight=1.f, float gradient_scaling_factor=0.f, float flow_weight=0.05f, float talus_ref=0.f, float clipping_ratio=50.f, float flow_gamma=1.f, float k_smooth=0.01f, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
Computes a soil–flow selection map based on terrain gradient, river mask, and smoothing parameters.
Definition select_soil_flow.cpp:14
Array select_soil_rocks(const Array &z, int ir_max=64, int ir_min=0, int steps=4, float smaller_scales_weight=1.f, ClampMode curvature_clamp_mode=ClampMode::POSITIVE_ONLY, float curvature_clamping=1.f, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
Computes a multi-scale soil/rock selector using curvature analysis.
Definition select_soil_rocks.cpp:16
Array select_slope(const Array &z, int ir=0, bool normalize=false, MinMaxKernel kernel_type=MinMaxKernel::OCTAGON, const UvTile ®ion=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
Selects terrain slope.
Definition selector_gpu.cpp:40
Array select_soil_weathered(const Array &z, int ir_curvature=0, int ir_gradient=4, ClampMode curvature_clamp_mode=ClampMode::POSITIVE_ONLY, float curvature_clamping=10.f, float curvature_weight=1.f, float gradient_weight=1.f, float gradient_scaling_factor=0.f, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
Computes a soil weathering selection map based on curvature and gradient analysis.
Definition select_soil_weathered.cpp:15
Array select_valley(const Array &z, int ir, bool ridge_select=false, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
See hmap::select_valley.
Definition selector_gpu.cpp:63
Array select_lt(const Array &array, float value)
Return an array with elements equal to 1 where input elements are smaller than value.
Definition selector.cpp:245
Array perturb_mask_contour(const Array &mask, const Array &noise, float max_displacement, int ir=1)
Perturb the contour of a binary mask using a displacement field, while trying to preserve a single co...
Definition perturb_mask_contour.cpp:14
Array select_blob_log(const Array &array, int ir, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
Return blob detection using the Laplacian of Gaussian (LoG) approach.
Definition selector.cpp:79
Array select_pulse(const Array &array, float value, float sigma)
Return an array filled with non-zero values where the input is in the interval [value - sigma,...
Definition selector.cpp:354
Array select_rivers(const Array &array, float talus_ref, float clipping_ratio)
Return an array filled with a criterion based on the occurence of a river bed.
Definition selector.cpp:404
void normalize(Array &array, NormalizationMethod method)
In-place normalization of an array.
Definition normalize.cpp:16
MinMaxKernel
Kernel footprint geometry for local minimum / maximum operations.
Definition local_metrics.hpp:22
@ OCTAGON
Octagonal neighborhood (separable 4-pass approximation).
Definition local_metrics.hpp:24
Array smooth_mask_preserve_frontier(const Array &mask, float feather_width, const UvTile ®ion=UvTile::dummy(), ICommunicator &comm=SingleArrayComm::instance())
Smooths a binary mask with an inward falloff while preserving its 0-boundary.
Definition selector.cpp:503
Array select_gradient_exp(const Array &array, float talus_center, float talus_sigma)
Return an array weighted (exponantial decay) by the gradient norm of the input array.
Definition selector.cpp:169
Array select_gt(const Array &array, float value)
Return an array with elements equal to 1 where input elements are larger than value.
Definition selector.cpp:134
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:131
Array select_gradient_inv(const Array &array, float talus_center, float talus_sigma)
Return an array weighted (square inverse) by the gradient norm of the input array.
Definition selector.cpp:181
Array select_angle(const Array &array, float angle, float sigma)
Return angle selection for a given angle and a tolerance half-width on this value.
Definition selector.cpp:47
Array scan_mask(const Array &array, float contrast=0.5f, float brightness=0.5f)
Mask adjustement using a 'scanning' method.
Definition selector.cpp:23
Array select_cavities(const Array &array, int ir, bool concave=true, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
Return holes or bumps detection based on the mean curvature of the heightmap.
Definition selector.cpp:99
void select_multiband3(const Array &array, Array &band_low, Array &band_mid, Array &band_high, float ratio1, float ratio2, float overlap, float vmin, float vmax)
Splits the input array into three bands (low, mid, and high) based on given ratios and overlap.
Definition selector.cpp:284
Array select_midrange(const Array &array, float gain, float vmin, float vmax)
Selects the midrange values of the input array within a specified range.
Definition selector.cpp:256
Array select_interval(const Array &array, float value1, float value2)
Return an array with elements equal to 1 where input elements are within the bounds provided.
Definition selector.cpp:193
UvTile UvTile
Definition communicator_interface.hpp:49
Array select_gradient_angle(const Array &array, float angle)
Return an array weighted by the gap between the gradient angle and a given angle.
Definition selector.cpp:145
float angle(const Point &p1, const Point &p2)
Computes the angle between two points relative to the x-axis.
Definition points.cpp:65
Array noise(NoiseType noise_type, glm::ivec2 shape, glm::vec2 kw, std::uint32_t seed, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const UvRect &uv_rect=UvRect::unit(), float angle=0.f, float stretch=1.f)
Return an array filled with coherence noise.
Definition noise.cpp:17
void gain(Array &array, float factor, const Array *p_mask)
Apply a gain correction to the array elements.
Definition filters.cpp:251
Array select_valley(const Array &z, int ir, bool ridge_select=false, bool normalize=false, ICommunicator &comm=SingleArrayComm::instance())
Definition selector.cpp:484
Array select_transitions(const Array &array1, const Array &array2, const Array &array_blend)
Return an array filled with 1 at the blending transition between two arrays, and 0 elsewhere.
Definition selector.cpp:419
Array select_gradient_binary(const Array &array, float talus_center)
Return an array filled with 1 where the gradient is larger than a given value and 0 elsewhere.
Definition selector.cpp:158
Array select_eq(const Array &array, float value)
Return an array with elements equal to 1 where input elements are equal to value.
Definition selector.cpp:123
ClampMode
Definition range.hpp:26
@ POSITIVE_ONLY
Definition range.hpp:27
Array select_inward_outward_slope(const Array &array, glm::vec2 center={0.5f, 0.5f}, const BBox2D &bbox=BBox2D::unit())
Return an array with positive values if the slope is pointing to the center (slope is inward),...
Definition selector.cpp:209
Array select_range(const Array &array, float vmin, float vmax, float width)
Return a selection mask for a value range [vmin, vmax] with smooth transitions of specified width at ...
Definition selector.cpp:371
Header file for range control functions and utilities.
Axis-aligned 2D bounding box in world coordinates.
Definition bbox2d.hpp:25
static constexpr BBox2D unit()
Definition bbox2d.hpp:39
Describes an Array tile's position within the normalized [0, 1]^2 UV domain and global index grid.
Definition uv_tile.hpp:46
static const UvTile & dummy()
Definition uv_tile.cpp:37
Normalized UV-domain tile descriptor for single-source SPMD Array algorithms and VirtualArray dispatc...