86 float footprint_ratio = 1.f,
87 Vec2<float> shift = {0.f, 0.f},
88 Vec2<float> scale = {1.f, 1.f});
135 const std::vector<std::vector<float>> &values,
136 float width_factor = 1.f,
137 const Array *p_noise_x =
nullptr,
138 const Array *p_noise_y =
nullptr,
139 const Array *p_stretching =
nullptr,
140 Vec4<float> bbox = {0.f, 1.f, 0.f, 1.f});
176 float noise_scale = 1.f,
177 float threshold = 0.f);
222 const std::vector<float> &xr,
223 const std::vector<float> &yr,
224 const std::vector<float> &zr,
226 float k_smoothing = 1.f,
229 Vec4<float> bbox = {0.f, 1.f, 0.f, 1.f},
230 const Array *p_noise_x =
nullptr,
231 const Array *p_noise_y =
nullptr,
232 const Array *p_stretching =
nullptr,
233 Vec4<float> bbox_array = {0.f, 1.f, 0.f, 1.f});
286 const std::vector<float> &xr,
287 const std::vector<float> &yr,
288 const std::vector<float> &zr,
290 float k_smoothing = 1.f,
293 Vec4<float> bbox = {0.f, 1.f, 0.f, 1.f},
294 const Array *p_noise_x =
nullptr,
295 const Array *p_noise_y =
nullptr,
296 const Array *p_stretching =
nullptr,
297 Vec4<float> bbox_array = {0.f, 1.f, 0.f, 1.f});
353 const std::vector<float> &xr,
354 const std::vector<float> &yr,
355 const std::vector<float> &zr,
358 bool kernel_scale_radius,
359 bool kernel_scale_amplitude,
362 float k_smoothing = 0.1f,
363 bool kernel_flip =
true,
364 bool kernel_rotate =
false,
365 Vec4<float> 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:28
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
Array ridgelines_bezier(Vec2< int > 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, Vec4< float > 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, Vec4< float > 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
StampingBlendMethod
Blending method for the stamping operator.
Definition authoring.hpp:32
@ SUBSTRACT
substract
Definition authoring.hpp:39
@ MINIMUM
minimum
Definition authoring.hpp:36
@ ADD
add
Definition authoring.hpp:33
@ MAXIMUM_SMOOTH
maximum smooth
Definition authoring.hpp:35
@ MINIMUM_SMOOTH
minimum smooth
Definition authoring.hpp:37
@ MULTIPLY
multiply
Definition authoring.hpp:38
@ MAXIMUM
maximum
Definition authoring.hpp:34
Array stamping(Vec2< int > 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, Vec4< float > bbox_array={0.f, 1.f, 0.f, 1.f})
Generate a heightmap by stamping a kernel at predefined locations.
Definition stamping.cpp:17
void alter_elevation(Array &array, const Cloud &cloud, int ir, float footprint_ratio=1.f, Vec2< float > shift={0.f, 0.f}, Vec2< float > 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 base_elevation(Vec2< int > 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, Vec4< float > 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
Array ridgelines(Vec2< int > 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, Vec4< float > 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, Vec4< float > 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(Vec2< int > 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, Vec2< float > center={0.5f, 0.5f}, Vec4< float > bbox={0.f, 1.f, 0.f, 1.f})
Return an array corresponding to a slope with a given overall.
Definition primitives.cpp:249