HighMap library (C++)
Loading...
Searching...
No Matches
coastal_erosion.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4#pragma once
5
6#include "highmap/array.hpp"
7
8namespace hmap
9{
10
50 Array &water_depth,
51 float additional_depth,
52 int iterations = 10,
53 const Array *p_mask = nullptr,
54 Array *p_water_mask = nullptr);
55
114 Array &water_depth,
115 float shore_ground_extent, // pixels
116 float shore_water_extent,
117 float slope_shore = 0.5f,
118 float slope_shore_water = 0.5f,
119 float scarp_extent_ratio = 0.5f, // in [0,
120 // 1]
121 bool apply_post_filter = true,
122 int post_filter_iterations = 3,
123 bool solid_shore_mask = true,
124 float scarp_mask_transition_ratio = 0.2f,
125 const Array *p_noise = nullptr,
126 Array *p_shore_mask = nullptr,
127 Array *p_scarp_mask = nullptr);
128
130 const Array *p_mask,
131 Array &water_depth,
132 float shore_ground_extent, // pixels
133 float shore_water_extent,
134 float slope_shore = 0.5f,
135 float slope_shore_water = 0.5f,
136 float scarp_extent_ratio = 0.5f, // in [0,
137 // 1]
138 bool apply_post_filter = true,
139 int post_filter_iterations = 3,
140 bool solid_shore_mask = true,
141 float scarp_mask_transition_ratio = 0.2f,
142 const Array *p_noise = nullptr,
143 Array *p_shore_mask = nullptr,
144 Array *p_scarp_mask = nullptr);
145
146} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:31
Definition opencv.hpp:20
void coastal_erosion_diffusion(Array &z, Array &water_depth, float additional_depth, int iterations=10, const Array *p_mask=nullptr, Array *p_water_mask=nullptr)
Simulates terrain diffusion due to coastal erosion.
Definition coastal_erosion.cpp:19
void coastal_erosion_profile(Array &z, Array &water_depth, float shore_ground_extent, float shore_water_extent, float slope_shore=0.5f, float slope_shore_water=0.5f, float scarp_extent_ratio=0.5f, bool apply_post_filter=true, int post_filter_iterations=3, bool solid_shore_mask=true, float scarp_mask_transition_ratio=0.2f, const Array *p_noise=nullptr, Array *p_shore_mask=nullptr, Array *p_scarp_mask=nullptr)
Applies a coastal erosion profile to a terrain elevation field.
Definition coastal_erosion.cpp:57