HighMap library (C++)
Loading...
Searching...
No Matches
carving.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  hmap
 

Enumerations

enum  hmap::ElevationLongitudinalProfile : int { hmap::ELP_UNCHANGED , hmap::ELP_FLAT , hmap::ELP_DECREASING , hmap::ELP_INCREASING }
 

Functions

void hmap::dig_path (Array &z, Path &path, int width=1, int decay=2, int flattening_radius=16, bool force_downhill=false, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f}, float depth=0.f)
 Dig a path on a heightmap.
 
void hmap::dig_river (Array &z, const std::vector< Path > &path_list, float riverbank_talus, int river_width=0, int merging_width=0, float depth=0.f, float riverbed_talus=0.f, float noise_ratio=0.9f, uint seed=0, Array *p_mask=nullptr)
 Modifies the elevation array to carve a river along a specified path.
 
void hmap::dig_river (Array &z, const Path &path, float riverbank_talus, int river_width=0, int merging_width=0, float depth=0.f, float riverbed_talus=0.f, float noise_ratio=0.9f, uint seed=0, Array *p_mask=nullptr)
 
void hmap::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, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
 Blends a flatbed carve into an existing heightmap.
 
void hmap::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, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
 Carves a trench along a given path into a heightmap.