HighMap library (C++)
Loading...
Searching...
No Matches
flooding.cpp File Reference

Namespaces

namespace  hmap
 

Functions

Array hmap::flooding_uniform_level (const Array &z, float zref)
 Compute water depth for a uniform flooding level.
 
Array hmap::flooding_from_boundaries (const Array &z, float zref, bool from_east=true, bool from_west=true, bool from_north=true, bool from_south=true)
 Compute flooding starting from the lowest boundary points.
 
Array hmap::flooding_from_point (const Array &z, int i, int j, float depth_min=std::numeric_limits< float >::max())
 Flood terrain starting from a single seed point.
 
Array hmap::flooding_from_point (const Array &z, const std::vector< int > &i, const std::vector< int > &j, float depth_min=std::numeric_limits< float >::max())
 Flood terrain starting from multiple seed points.
 
Array hmap::flooding_lake_system (const Array &z, int iterations=500, float epsilon=1e-3f)
 Estimate lake water depths on a terrain by filling depressions.
 
Array hmap::merge_water_depths (const Array &depth1, const Array &depth2, float k_smooth=0.f)
 Merge two water depth fields.
 
void hmap::water_depth_dry_out (Array &water_depth, float dry_out_ratio=0.5f, const Array *p_mask=nullptr, float depth_max=std::numeric_limits< float >::max())
 Apply a drying factor to a water depth field.
 
Array hmap::water_depth_from_mask (const Array &z, const Array &mask, float mask_threshold=0.f, int iterations_max=10000, float tolerance=1e-2f, float omega=1.8f)
 Compute water depth over a masked terrain using harmonic interpolation.
 
Array hmap::water_depth_increase (const Array &water_depth, const Array &z, float additional_depth)
 Simulates the increase in water depth over a terrain.
 
Array hmap::water_mask (const Array &water_depth)
 Generates a binary mask representing water presence.
 
Array hmap::water_mask (const Array &water_depth, const Array &z, float additional_depth)
 Computes a gradient-based water mask using an extended water depth model.