67 float headwater_width = 0.f,
68 float width_exponent = 0.5f,
70 float depth_exponent = 0.3f,
71 std::uint32_t seed = 0,
72 float talus_noise_ratio = 0.f,
74 float radial_profile_parameter = 2.f,
75 Array *p_river_mask =
nullptr,
120 int flattening_radius = 16,
121 bool force_downhill =
false,
147 const std::vector<float> &xp,
148 const std::vector<float> &yp,
149 const std::vector<float> &zp,
150 const std::vector<float> &radius,
151 float strength = 1.0f,
153 float profile_param = 1.0f,
154 Array *p_mask =
nullptr,
163 const std::vector<float> &xp,
164 const std::vector<float> &yp,
165 const std::vector<float> &zp,
167 float strength = 1.0f,
169 float profile_param = 1.0f,
170 Array *p_mask =
nullptr,
213 const std::vector<float> &xp,
214 const std::vector<float> &yp,
215 const std::vector<float> &zp,
216 const std::vector<float> &radius,
217 float slope_weight = 1.f,
218 float uphill_weight = 2.f,
219 float max_height_above = -1.f,
220 float terrain_follow = 0.5f,
221 float strength = 1.f,
223 float profile_param = 1.f,
224 Array *p_mask =
nullptr,
230 const std::vector<float> &xp,
231 const std::vector<float> &yp,
232 const std::vector<float> &zp,
234 float slope_weight = 1.f,
235 float uphill_weight = 2.f,
236 float max_height_above = -1.f,
237 float terrain_follow = 0.5f,
238 float strength = 1.f,
240 float profile_param = 1.f,
241 Array *p_mask =
nullptr,
273 float bottom_extent = 32.f,
276 float falloff_distance = 128.f,
277 float outer_slope = 0.1f,
278 bool preserve_bedshape =
true,
280 float radial_profile_parameter = 2.f,
281 Array *p_falloff_mask =
nullptr,
282 const Array *p_noise_r =
nullptr,
348 bool enable_width_depth_scaling =
true,
349 bool enable_width_distance_scaling =
true,
350 bool enable_width_curvature_scaling =
false,
351 float curvature_radius_min = 1.f,
352 float curv_width_ratio_min = 0.5f,
353 float curv_width_ratio_max = 2.f,
355 float radial_profile_parameter = 2.f,
358 float elevation_shift = -0.05f,
359 float shift_ramp_start_ratio = 0.f,
360 float shift_ramp_end_ratio = 0.f,
361 float min_slope = 0.001f,
362 size_t k_neighbors = 8,
363 const Array *p_noise_r =
nullptr,
364 Array *p_bending_mask =
nullptr,
369 const std::vector<Path> &paths,
371 bool enable_width_depth_scaling =
true,
372 bool enable_width_distance_scaling =
true,
373 bool enable_width_curvature_scaling =
false,
374 float curvature_radius_min = 1.f,
375 float curv_width_ratio_min = 0.5f,
376 float curv_width_ratio_max = 2.f,
378 float radial_profile_parameter = 2.f,
381 float elevation_shift = -0.05f,
382 float shift_ramp_start_ratio = 0.f,
383 float shift_ramp_end_ratio = 0.f,
384 float min_slope = 0.001f,
385 size_t k_neighbors = 8,
386 const Array *p_noise_r =
nullptr,
387 Array *p_bending_mask =
nullptr,
423 const std::vector<float> &relative_widths,
425 bool enable_width_depth_scaling =
true,
427 float radial_profile_parameter = 2.f,
430 float elevation_shift = -0.05f,
431 float min_slope = 0.001f,
432 const Array *p_noise_r =
nullptr,
433 Array *p_bending_mask =
nullptr,
464 float width_exponent = 1.0f,
465 bool enable_width_depth_scaling =
true,
467 float radial_profile_parameter = 2.f,
470 float elevation_shift = -0.05f,
471 float min_slope = 0.001f,
472 const Array *p_noise_r =
nullptr,
473 Array *p_bending_mask =
nullptr,
Header file for boundary condition functions and utilities.
Graph class, to manipulate graphs in 2D.
Definition graph.hpp:70
ElevationLongitudinalProfile
Definition carving.hpp:17
@ ELP_UNCHANGED
Definition carving.hpp:18
@ ELP_INCREASING
Definition carving.hpp:21
@ ELP_DECREASING
Definition carving.hpp:20
@ ELP_FLAT
Definition carving.hpp:19
RadialProfile
Radial profile type.
Definition profiles.hpp:51
@ RP_GAIN
Definition profiles.hpp:52
@ RP_SMOOTHSTEP_UPPER
Definition profiles.hpp:56
@ RP_SMOOTHSTEP
Definition profiles.hpp:55
void flatten_around_points(Array &z, const std::vector< float > &xp, const std::vector< float > &yp, const std::vector< float > &zp, const std::vector< float > &radius, float strength=1.0f, RadialProfile radial_profile=RadialProfile::RP_SMOOTHSTEP, float profile_param=1.0f, Array *p_mask=nullptr, const UvRect &uv_rect=UvRect::unit())
Flattens a heightmap locally around a set of reference points.
Definition flatten_around_points.cpp:15
void flatbed_carve(Array &z, 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, const UvRect &uv_rect=UvRect::unit())
Blends a flatbed carve into an existing heightmap.
Definition flatbed_carve.cpp:120
void flatten_around_points_terrain_aware(Array &z, const std::vector< float > &xp, const std::vector< float > &yp, const std::vector< float > &zp, const std::vector< float > &radius, float slope_weight=1.f, float uphill_weight=2.f, float max_height_above=-1.f, float terrain_follow=0.5f, float strength=1.f, RadialProfile radial_profile=RadialProfile::RP_SMOOTHSTEP, float profile_param=1.f, Array *p_mask=nullptr, const UvRect &uv_rect=UvRect::unit())
Terrain-aware flattening around a set of seed points.
Definition flatten_around_points_terrain_aware.cpp:20
void trench(Array &z, const Path &path, float width, bool enable_width_depth_scaling=true, bool enable_width_distance_scaling=true, bool enable_width_curvature_scaling=false, float curvature_radius_min=1.f, float curv_width_ratio_min=0.5f, float curv_width_ratio_max=2.f, RadialProfile radial_profile=RadialProfile::RP_SMOOTHSTEP_UPPER, float radial_profile_parameter=2.f, ElevationLongitudinalProfile longitudinal_profile=ElevationLongitudinalProfile::ELP_DECREASING, float elevation_shift=-0.05f, float shift_ramp_start_ratio=0.f, float shift_ramp_end_ratio=0.f, float min_slope=0.001f, size_t k_neighbors=8, const Array *p_noise_r=nullptr, Array *p_bending_mask=nullptr, int tile_size=32, const UvRect &uv_rect=UvRect::unit())
Carves a trench along a given path into a heightmap.
Definition trench.cpp:538
void carve_river(Array &z, const Graph &graph, float talus, float outlet_width, float headwater_width=0.f, float width_exponent=0.5f, float depth=0.05f, float depth_exponent=0.3f, std::uint32_t seed=0, float talus_noise_ratio=0.f, RadialProfile radial_profile=RadialProfile::RP_SMOOTHSTEP_UPPER, float radial_profile_parameter=2.f, Array *p_river_mask=nullptr, const UvRect &uv_rect=UvRect::unit())
Carves a continuous river network into a heightmap along a directed flow Graph.
Definition carve_river.cpp:25
void dig_path(Array &z, Path &path, int width=1, int decay=2, int flattening_radius=16, bool force_downhill=false, const UvRect &uv_rect=UvRect::unit(), float depth=0.f)
Dig a path on a heightmap.
Definition dig_path.cpp:19
Path class for manipulating and analyzing paths in 2D space.
static constexpr UvRect unit()
Definition uv_rect.hpp:46