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});
162 const Array *p_coastline =
nullptr,
163 const Array *p_boundary =
nullptr,
164 float mountain_elevation = 1.0f,
165 float coastline_elevation = 0.0f,
166 float boundary_elevation = -1.0f,
167 int iterations_max = 500,
168 float tolerance = 1e-5f,
169 const Array *p_noise =
nullptr,
170 float noise_amplitude = 0.0f);
206 float noise_scale = 1.f,
252 const std::vector<float> &xr,
253 const std::vector<float> &yr,
254 const std::vector<float> &zr,
256 float k_smoothing = 1.f,
259 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
260 const Array *p_noise_x =
nullptr,
261 const Array *p_noise_y =
nullptr,
262 const Array *p_stretching =
nullptr,
263 glm::vec4 bbox_array = {0.f, 1.f, 0.f, 1.f});
316 const std::vector<float> &xr,
317 const std::vector<float> &yr,
318 const std::vector<float> &zr,
320 float k_smoothing = 1.f,
323 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
324 const Array *p_noise_x =
nullptr,
325 const Array *p_noise_y =
nullptr,
326 const Array *p_stretching =
nullptr,
327 glm::vec4 bbox_array = {0.f, 1.f, 0.f, 1.f});
383 const std::vector<float> &xr,
384 const std::vector<float> &yr,
385 const std::vector<float> &zr,
388 bool kernel_scale_radius,
389 bool kernel_scale_amplitude,
392 float k_smoothing = 0.1f,
393 bool kernel_flip =
true,
394 bool kernel_rotate =
false,
395 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 ...
Definition algebra.hpp:23
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, 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:333
Array threshold(const Array &array, float x0, float x1)
Linear threshold.
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:111
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:17
Array reverse_midpoint(const Array &array, std::uint32_t seed, float noise_scale=1.f, float threshold=0.f)
Apply the reverse midpoint displacement algorithm to the input array.
Definition reverse_midpoint.cpp:233
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:21
Array elevation_from_sparse_constraints(const Array &mountains, const Array *p_coastline=nullptr, const Array *p_boundary=nullptr, float mountain_elevation=1.0f, float coastline_elevation=0.0f, float boundary_elevation=-1.0f, int iterations_max=500, float tolerance=1e-5f, const Array *p_noise=nullptr, float noise_amplitude=0.0f)
Synthesize a smooth heightmap from sparse elevation constraints using GPU harmonic interpolation (Lap...
Definition elevation_from_sparse_constraints.cpp:11
Cloud scale(const Cloud &cloud, glm::vec2 scale, glm::vec2 center={0.5f, 0.5f})
Scales the point coordinates in a cloud relative to a center point.
Definition cloud_functions.cpp:165
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:16
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, std::uint32_t 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:22
Path class for manipulating and analyzing paths in 2D space.