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});
161 float noise_scale = 1.f,
207 const std::vector<float> &xr,
208 const std::vector<float> &yr,
209 const std::vector<float> &zr,
211 float k_smoothing = 1.f,
214 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
215 const Array *p_noise_x =
nullptr,
216 const Array *p_noise_y =
nullptr,
217 const Array *p_stretching =
nullptr,
218 glm::vec4 bbox_array = {0.f, 1.f, 0.f, 1.f});
271 const std::vector<float> &xr,
272 const std::vector<float> &yr,
273 const std::vector<float> &zr,
275 float k_smoothing = 1.f,
278 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
279 const Array *p_noise_x =
nullptr,
280 const Array *p_noise_y =
nullptr,
281 const Array *p_stretching =
nullptr,
282 glm::vec4 bbox_array = {0.f, 1.f, 0.f, 1.f});
338 const std::vector<float> &xr,
339 const std::vector<float> &yr,
340 const std::vector<float> &zr,
343 bool kernel_scale_radius,
344 bool kernel_scale_amplitude,
347 float k_smoothing = 0.1f,
348 bool kernel_flip =
true,
349 bool kernel_rotate =
false,
350 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:23
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
float threshold(float x, float x0, float x1)
Applies a linear threshold to a scalar value.
Definition math.cpp:498
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:319
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.