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

Namespaces

namespace  hmap
namespace  hmap::va

Functions

Path hmap::flow_stream (const Array &z, const glm::ivec2 ij_start, const float elevation_ratio=0.5f, const float distance_exponent=2.f, const float upward_penalization=100.f, const std::vector< Path > &existing_streams={}, const int valley_radius=2, const float valley_factor=0.35f, const bool truncate_at_intersection=false)
 Computes the optimal flow path from a starting point to the boundary of a given elevation array.
Path hmap::flow_stream (const TerrainTriMesh &mesh, glm::vec2 xy_start, 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 to the boundary of a terrain triangular mesh.
Path hmap::flow_stream (const TerrainTriMesh &mesh, size_t start_vertex_index, 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 a starting vertex to the boundary of a terrain triangular mesh.
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.