71 float footprint_ratio = 1.f,
72 glm::vec2 shift = {0.f, 0.f},
73 glm::vec2 scale = {1.f, 1.f});
120 const std::vector<std::vector<float>> &values,
121 float width_factor = 1.f,
122 const Array *p_noise_x =
nullptr,
123 const Array *p_noise_y =
nullptr,
124 const Array *p_stretching =
nullptr,
125 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
158 float bottom_extent = 32.f,
161 float falloff_distance = 128.f,
162 float outer_slope = 0.1f,
163 bool preserve_bedshape =
true,
165 float radial_profile_parameter = 2.f,
166 Array *p_falloff_mask =
nullptr,
167 const Array *p_noise_r =
nullptr,
168 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
199 float bottom_extent = 32.f,
202 float falloff_distance = 128.f,
203 float outer_slope = 0.1f,
204 bool preserve_bedshape =
true,
206 float radial_profile_parameter = 2.f,
207 Array *p_falloff_mask =
nullptr,
208 const Array *p_noise_r =
nullptr,
209 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
245 float noise_scale = 1.f,
246 float threshold = 0.f);
291 const std::vector<float> &xr,
292 const std::vector<float> &yr,
293 const std::vector<float> &zr,
295 float k_smoothing = 1.f,
298 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
299 const Array *p_noise_x =
nullptr,
300 const Array *p_noise_y =
nullptr,
301 const Array *p_stretching =
nullptr,
302 glm::vec4 bbox_array = {0.f, 1.f, 0.f, 1.f});
355 const std::vector<float> &xr,
356 const std::vector<float> &yr,
357 const std::vector<float> &zr,
359 float k_smoothing = 1.f,
362 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
363 const Array *p_noise_x =
nullptr,
364 const Array *p_noise_y =
nullptr,
365 const Array *p_stretching =
nullptr,
366 glm::vec4 bbox_array = {0.f, 1.f, 0.f, 1.f});
422 const std::vector<float> &xr,
423 const std::vector<float> &yr,
424 const std::vector<float> &zr,
427 bool kernel_scale_radius,
428 bool kernel_scale_amplitude,
431 float k_smoothing = 0.1f,
432 bool kernel_flip =
true,
433 bool kernel_rotate =
false,
434 glm::vec4 bbox_array = {0.f, 1.f, 0.f, 1.f});
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
unsigned int uint
Definition array.hpp:14
Definition algebra.hpp:22
Array reverse_midpoint(const Array &array, uint seed, float noise_scale=1.f, float threshold=0.f)
Apply the reverse midpoint displacement algorithm to the input array.
Definition reverse_midpoint.cpp:231
RadialProfile
Radial profile type.
Definition math.hpp:66
@ RP_GAIN
Definition math.hpp:67
Array ridgelines_bezier(glm::ivec2 shape, const std::vector< float > &xr, const std::vector< float > &yr, const std::vector< float > &zr, float slope, float k_smoothing=1.f, float width=0.1f, float vmin=0.f, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_stretching=nullptr, glm::vec4 bbox_array={0.f, 1.f, 0.f, 1.f})
Generate a heightmap based on a set of ridgelines with quadratic Bezier interpolation.
Definition ridgelines.cpp:100
Array stamping(glm::ivec2 shape, const std::vector< float > &xr, const std::vector< float > &yr, const std::vector< float > &zr, Array kernel, int kernel_ir, bool kernel_scale_radius, bool kernel_scale_amplitude, StampingBlendMethod blend_method, uint seed, float k_smoothing=0.1f, bool kernel_flip=true, bool kernel_rotate=false, glm::vec4 bbox_array={0.f, 1.f, 0.f, 1.f})
Generate a heightmap by stamping a kernel at predefined locations.
Definition stamping.cpp:17
StampingBlendMethod
Blending method for the stamping operator.
Definition authoring.hpp:17
@ SUBSTRACT
substract
Definition authoring.hpp:24
@ MINIMUM
minimum
Definition authoring.hpp:21
@ ADD
add
Definition authoring.hpp:18
@ MAXIMUM_SMOOTH
maximum smooth
Definition authoring.hpp:20
@ MINIMUM_SMOOTH
minimum smooth
Definition authoring.hpp:22
@ MULTIPLY
multiply
Definition authoring.hpp:23
@ MAXIMUM
maximum
Definition authoring.hpp:19
void alter_elevation(Array &array, const Cloud &cloud, int ir, float footprint_ratio=1.f, glm::vec2 shift={0.f, 0.f}, glm::vec2 scale={1.f, 1.f})
Point-wise alteration: locally enforce a new elevation value while maintaining the 'shape' of the hei...
Definition alter_elevation.cpp:13
Array ridgelines(glm::ivec2 shape, const std::vector< float > &xr, const std::vector< float > &yr, const std::vector< float > &zr, float slope, float k_smoothing=1.f, float width=0.1f, float vmin=0.f, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_stretching=nullptr, glm::vec4 bbox_array={0.f, 1.f, 0.f, 1.f})
Generate a heightmap based on a set of ridgelines and a specified slope.
Definition ridgelines.cpp:16
Array slope(glm::ivec2 shape, float angle, float slope, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_stretching=nullptr, glm::vec2 center={0.5f, 0.5f}, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Return an array corresponding to a slope with a given overall.
Definition primitives.cpp:279
Array flatbed_carve(glm::ivec2 shape, const Path &path, float bottom_extent=32.f, float vmin=0.1f, float depth=0.05f, float falloff_distance=128.f, float outer_slope=0.1f, bool preserve_bedshape=true, RadialProfile radial_profile=RadialProfile::RP_GAIN, float radial_profile_parameter=2.f, Array *p_falloff_mask=nullptr, const Array *p_noise_r=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Carves a flatbed shape along a path.
Definition flatbed_carve.cpp:13
Array base_elevation(glm::ivec2 shape, const std::vector< std::vector< float > > &values, float width_factor=1.f, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_stretching=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generate a heightmap from a coarse grid of control points with defined elevation values.
Definition base_elevation.cpp:12
Path class for manipulating and analyzing paths in 2D space.