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

Go to the source code of this file.

Namespaces

namespace  hmap

Enumerations

enum class  hmap::TerrainBlendMode : int {
  hmap::TBM_ADD , hmap::TBM_AVERAGE , hmap::TBM_DISTANCE , hmap::TBM_HEIGHT ,
  hmap::TBM_MAX , hmap::TBM_MAX_SMOOTH , hmap::TBM_MIN , hmap::TBM_MIN_SMOOTH ,
  hmap::TBM_MULTISCALE , hmap::TBM_POISSON , hmap::TBM_SEAMLESS , hmap::TBM_SLOPE ,
  hmap::TBM_SUBTRACT
}
 Blending modes for combining terrains with CoordFrame transforms. More...

Functions

void hmap::blend_terrains (Array &lower, const CoordFrame &frame_lower, const Array &upper, const CoordFrame &frame_upper, TerrainBlendMode mode, float param=0.2f)
 Blend an upper terrain onto a lower terrain in-place, taking their CoordFrame transforms into account.
void hmap::blend_terrains (VirtualArray &lower, const CoordFrame &frame_lower, const VirtualArray &upper, const CoordFrame &frame_upper, TerrainBlendMode mode, float param=0.2f, const ComputeMode &cm=ComputeMode{})
 Blend an upper VirtualArray terrain onto a lower VirtualArray terrain in-place, taking their CoordFrame transforms into account.
void hmap::blend_terrains_height (Array &lower, const CoordFrame &frame_lower, const Array &upper, const CoordFrame &frame_upper, float feather_width=0.2f, float height_offset=0.f, float height_range=0.2f)
 Height-aware terrain blending for Array inputs.
void hmap::blend_terrains_height (VirtualArray &lower, const CoordFrame &frame_lower, const VirtualArray &upper, const CoordFrame &frame_upper, float feather_width=0.2f, float height_offset=0.f, float height_range=0.2f, const ComputeMode &cm=ComputeMode{})
 Height-aware terrain blending for VirtualArray inputs.
void hmap::blend_terrains_multiscale (Array &lower, const CoordFrame &frame_lower, const Array &upper, const CoordFrame &frame_upper, float feather_width=0.25f, int n_levels=3, int base_radius=16, float detail_gain=1.f)
 Multiscale (frequency-band) terrain blending for Array inputs.
void hmap::blend_terrains_multiscale (VirtualArray &lower, const CoordFrame &frame_lower, const VirtualArray &upper, const CoordFrame &frame_upper, float feather_width=0.25f, int n_levels=3, int base_radius=16, float detail_gain=1.f, int coarse_size=128, const ComputeMode &cm=ComputeMode{})
 Multiscale (frequency-band) terrain blending for VirtualArray inputs using a coarse global proxy for low-frequency bands and tile-local detail blending with halo synchronization.
void hmap::blend_terrains_poisson (Array &lower, const CoordFrame &frame_lower, const Array &upper, const CoordFrame &frame_upper, int iterations=400, float feather_width=0.15f, bool mixed_gradients=true)
 Poisson / gradient-domain terrain blending for Array inputs.
void hmap::blend_terrains_poisson (VirtualArray &lower, const CoordFrame &frame_lower, const VirtualArray &upper, const CoordFrame &frame_upper, int iterations=400, float feather_width=0.15f, bool mixed_gradients=true, int coarse_size=128, int sync_interval=25, const ComputeMode &cm=ComputeMode{})
 Poisson / gradient-domain terrain blending for VirtualArray inputs using a two-level coarse-proxy + tile-local Red-Black SOR solver with halo synchronization.
void hmap::blend_terrains_seamless (Array &lower, const CoordFrame &frame_lower, const Array &upper, const CoordFrame &frame_upper, float feather_width=0.2f, int boundary_samples=64)
 Seamless boundary blending (harmonic MVC membrane) for Array inputs.
void hmap::blend_terrains_seamless (VirtualArray &lower, const CoordFrame &frame_lower, const VirtualArray &upper, const CoordFrame &frame_upper, float feather_width=0.2f, int boundary_samples=64, const ComputeMode &cm=ComputeMode{})
 Seamless boundary blending (harmonic MVC membrane) for VirtualArray inputs.
void hmap::blend_terrains_slope (Array &lower, const CoordFrame &frame_lower, const Array &upper, const CoordFrame &frame_upper, float feather_width=0.2f, float slope_scale=0.1f, int ir_slope=2)
 Slope-aware terrain blending for Array inputs.
void hmap::blend_terrains_slope (VirtualArray &lower, const CoordFrame &frame_lower, const VirtualArray &upper, const CoordFrame &frame_upper, float feather_width=0.2f, float slope_scale=0.1f, int ir_slope=2, const ComputeMode &cm=ComputeMode{})
 Slope-aware terrain blending for VirtualArray inputs.