|
HighMap library (C++)
|
Functions | |
| VirtualArray | hydraulic_saleve (const ComputeMode &cm, const VirtualArray &z, std::uint32_t seed, size_t control_points_count=10000, float m_exp=0.8f, float uplift_rate=1.f, float tolerance=1e-3f, int max_iterations=200, float smin=0.f, float smax=6.f, float strength=0.5f, bool scale_erodibility_with_z=true, float erodibility_distrib_exp=1.f, float noise_strength=0.f, bool enable_post_slope_limiter=false, float post_slope_limit=0.f, bool enable_post_smoothing=false, InterpolationMethod2D interpolation_method=InterpolationMethod2D::ITP2D_DELAUNAY_GRADIENT, const VirtualArray *p_noise_x=nullptr, const VirtualArray *p_noise_y=nullptr, const VirtualArray *p_mask=nullptr) |
| VirtualArray | hydraulic_mise (const ComputeMode &cm, const VirtualArray &z, int cutoff_resolution=1024, const MiseParams ¶ms=MiseParams(), const VirtualArray *p_mask=nullptr, const VirtualArray *p_bedrock=nullptr, const VirtualArray *p_erodibility=nullptr, const VirtualArray *p_moisture_map=nullptr, const VirtualArray *p_outlet=nullptr, VirtualArray *p_sediment=nullptr, VirtualArray *p_flow=nullptr, VirtualArray *p_erosion_map=nullptr, VirtualArray *p_deposition_map=nullptr) |
| std::vector< Path > | flow_fixing_mst_paths (const ComputeMode &cm, const VirtualArray &z, size_t control_points_count=2048, std::uint32_t seed=0, float riverbed_talus=0.f, float elevation_ratio=0.95f, float distance_exponent=2.f, float upward_penalization=0.1f, float minimum_depth=1e-4f) |
| Resolves flow sinks on a VirtualArray by computing an MST on a triangular mesh and distributing river path carving with trenching across tiles. | |
| VirtualArray | flow_fixing_mst_triangulated (const ComputeMode &cm, const VirtualArray &z, size_t control_points_count=2048, std::uint32_t seed=0, float riverbed_talus=0.f, float elevation_ratio=0.95f, float distance_exponent=2.f, float upward_penalization=0.1f, float minimum_depth=1e-4f, float merging_distance=8.f, RadialProfile radial_profile=RadialProfile::RP_SMOOTHSTEP_UPPER, float radial_profile_parameter=2.f, const VirtualArray *p_noise_r=nullptr) |
| Path | flow_stream (const ComputeMode &cm, const VirtualArray &z, glm::vec2 start, std::uint32_t seed=0, size_t control_points_count=2048, float elevation_ratio=0.5f, float distance_exponent=2.f, float upward_penalization=100.f, bool favor_domain_center=false, const std::vector< Path > &existing_streams={}, float valley_radius=0.02f, float valley_factor=0.35f, bool truncate_at_intersection=false) |
| Computes the optimal flow path from starting 2D coordinates across a VirtualArray using an intermediate random terrain triangular mesh. | |
| VirtualArray hmap::va::hydraulic_saleve | ( | const ComputeMode & | cm, |
| const VirtualArray & | z, | ||
| std::uint32_t | seed, | ||
| size_t | control_points_count = 10000, | ||
| float | m_exp = 0.8f, | ||
| float | uplift_rate = 1.f, | ||
| float | tolerance = 1e-3f, | ||
| int | max_iterations = 200, | ||
| float | smin = 0.f, | ||
| float | smax = 6.f, | ||
| float | strength = 0.5f, | ||
| bool | scale_erodibility_with_z = true, | ||
| float | erodibility_distrib_exp = 1.f, | ||
| float | noise_strength = 0.f, | ||
| bool | enable_post_slope_limiter = false, | ||
| float | post_slope_limit = 0.f, | ||
| bool | enable_post_smoothing = false, | ||
| InterpolationMethod2D | interpolation_method = InterpolationMethod2D::ITP2D_DELAUNAY_GRADIENT, | ||
| const VirtualArray * | p_noise_x = nullptr, | ||
| const VirtualArray * | p_noise_y = nullptr, | ||
| const VirtualArray * | p_mask = nullptr ) |
| VirtualArray hmap::va::hydraulic_mise | ( | const ComputeMode & | cm, |
| const VirtualArray & | z, | ||
| int | cutoff_resolution = 1024, | ||
| const MiseParams & | params = MiseParams(), | ||
| const VirtualArray * | p_mask = nullptr, | ||
| const VirtualArray * | p_bedrock = nullptr, | ||
| const VirtualArray * | p_erodibility = nullptr, | ||
| const VirtualArray * | p_moisture_map = nullptr, | ||
| const VirtualArray * | p_outlet = nullptr, | ||
| VirtualArray * | p_sediment = nullptr, | ||
| VirtualArray * | p_flow = nullptr, | ||
| VirtualArray * | p_erosion_map = nullptr, | ||
| VirtualArray * | p_deposition_map = nullptr ) |
| std::vector< Path > hmap::va::flow_fixing_mst_paths | ( | const ComputeMode & | cm, |
| const VirtualArray & | z, | ||
| size_t | control_points_count = 2048, | ||
| std::uint32_t | seed = 0, | ||
| float | riverbed_talus = 0.f, | ||
| float | elevation_ratio = 0.95f, | ||
| float | distance_exponent = 2.f, | ||
| float | upward_penalization = 0.1f, | ||
| float | minimum_depth = 1e-4f ) |
Resolves flow sinks on a VirtualArray by computing an MST on a triangular mesh and distributing river path carving with trenching across tiles.
| cm | Compute mode configuration. |
| z | Input elevation VirtualArray. |
| control_points_count | Number of mesh control vertices sampled. |
| seed | Random seed for vertex distribution. |
| riverbed_talus | Minimum talus (slope) along carved riverbeds. |
| elevation_ratio | Weight for absolute elevation in Dijkstra step cost. |
| distance_exponent | Exponent applied to upward elevation changes. |
| upward_penalization | Penalty factor for uphill moves. |
| minimum_depth | Minimum incision depth below terrain elevation. |
| merging_distance | Trench width in pixels. |
| radial_profile | Radial profile cross-section for trench carving. |
| radial_profile_parameter | Parameter for radial profile shaping. |
| p_noise_r | Optional noise VirtualArray for radial trench perturbation. |
| VirtualArray hmap::va::flow_fixing_mst_triangulated | ( | const ComputeMode & | cm, |
| const VirtualArray & | z, | ||
| size_t | control_points_count = 2048, | ||
| std::uint32_t | seed = 0, | ||
| float | riverbed_talus = 0.f, | ||
| float | elevation_ratio = 0.95f, | ||
| float | distance_exponent = 2.f, | ||
| float | upward_penalization = 0.1f, | ||
| float | minimum_depth = 1e-4f, | ||
| float | merging_distance = 8.f, | ||
| RadialProfile | radial_profile = RadialProfile::RP_SMOOTHSTEP_UPPER, | ||
| float | radial_profile_parameter = 2.f, | ||
| const VirtualArray * | p_noise_r = nullptr ) |
| Path hmap::va::flow_stream | ( | const ComputeMode & | cm, |
| const VirtualArray & | z, | ||
| glm::vec2 | start, | ||
| std::uint32_t | seed = 0, | ||
| size_t | control_points_count = 2048, | ||
| float | elevation_ratio = 0.5f, | ||
| float | distance_exponent = 2.f, | ||
| float | upward_penalization = 100.f, | ||
| bool | favor_domain_center = false, | ||
| const std::vector< Path > & | existing_streams = {}, | ||
| float | valley_radius = 0.02f, | ||
| float | valley_factor = 0.35f, | ||
| bool | truncate_at_intersection = false ) |
Computes the optimal flow path from starting 2D coordinates across a VirtualArray using an intermediate random terrain triangular mesh.
| cm | Compute mode configuration. |
| z | Heightmap VirtualArray. |
| start | Start coordinates (x, y) in [0, 1]. |
| seed | Random seed for mesh point generation. |
| control_points_count | Number of control points sampled for the mesh. |
| elevation_ratio | Weight for elevation difference in the cost function (default: 0.5). |
| distance_exponent | Exponent for the distance/elevation term (default: 2.0). |
| upward_penalization | Penalty factor for upward elevation changes (default: 100.0). |
| favor_domain_center | Favor passing through the center of the domain (default: false). |
| existing_streams | Existing flow streams to favor merging with (default: {}). |
| valley_radius | Radius around existing stream cells to apply attraction (default: 0.02). |
| valley_factor | Attenuation factor per distance unit in valley attraction (default: 0.35). |
| truncate_at_intersection | Truncate path at first intersection with an existing stream (default: false). |