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

Go to the source code of this file.

Classes

struct  hmap::ForestSeedingOptions
 Configuration parameters for forest seeding algorithms. More...

Namespaces

namespace  hmap

Functions

Array hmap::build_tree_density (const Array &heightmap, float min_elev=0.0f, float max_elev=0.9f, float elev_transition_width=0.1f, float min_talus=0.003f, float max_talus=0.005f, float angle=30.0f, float angle_width=90.0f, float weight_elev=1.0f, float weight_talus=1.0f, float weight_angle=0.8f, float weight_twi=0.5f, const Array &secondary_density={}, float weight_secondary=1.0f, const Array &exclusion_mask={}, float exclusion_threshold=0.f)
 Computes an environmental suitability criteria map in [0, 1] representing tree probability density based on elevation, slope talus, aspect angle, topographic wetness index (TWI), an optional secondary density map, and an optional exclusion mask.
Forest hmap::seed_forest_clusters (size_t species_count, size_t tree_count, const Array &density, const Array &exclusion, float cluster_spread=0.05f, size_t points_per_cluster=8, const ForestSeedingOptions &options={}, const UvTile &region=UvTile::unit(), ICommunicator &comm=SingleArrayComm::instance())
 Generates a clustered forest distribution using inverse transform sampling for cluster centers and local cluster regions.
Forest hmap::seed_forest_kmeans (size_t species_count, size_t tree_count, const Array &density, const Array &exclusion, float cluster_randomness=0.0f, size_t k_neighbors=4, const ForestSeedingOptions &options={}, const UvTile &region=UvTile::unit(), ICommunicator &comm=SingleArrayComm::instance())
 Generates a multi-species forest distribution using 2D inverse transform sampling for positions and PointSampler k-means clustering to tag species.

Detailed Description