载入中...
搜索中...
未找到
TerrainSediment.cpp
浏览该文件的文档.
7Result<int> applyTerrainSediment(Heightmap& heights, Heightmap& sediment, const Heightmap& velocityX,
12 return validRaster(map) && map.getWidth() == heights.getWidth() && map.getHeight() == heights.getHeight();
16 if (&heights == &sediment || !validRaster(heights) || !sameShape(sediment) || !sameShape(velocityX) ||
19 !positive(water.spacingX) || !positive(water.spacingZ) || !nonnegative(water.dt) || !std::isfinite(s.effect) ||
22 "terrain.sediment: distinct matching finite outputs, nonnegative heights and valid coefficients required");
34 (double(heights.height(right, bottom)) + 2.0 * heights.height(right, z) + heights.height(right, top) -
39 heights.height(left, bottom) - 2.0 * heights.height(x, bottom) - heights.height(right, bottom)) /
41 // Source normal is normalize(dx,length(dx,dz),dz), giving this Y component for nonzero gradient.
44 const double deposited = double(water.dt) * std::lerp(double(s.bankDeposit), double(s.bedDeposit), slope) *
49 std::clamp(double(x) - double(water.dt) * velocityX.data()[i] * water.spacingX, 0.0, double(width - 1));
50 const double bz = std::clamp(double(z) - double(water.dt) * velocityZ.data()[i] * water.spacingZ, 0.0,
55 const double transported = (1 - sx) * ((1 - tz) * sampleSediment(x0, z0) + tz * sampleSediment(x0, z1)) +
In-memory terrain heightmap: a dense float grid (row-major, index = y * width + x) materialized from ...
Definition Heightmap.h:21
Definition EvpackPointGraphLoader.h:12
EVENGINE_API_DOMAINS Result< int > applyTerrainSediment(Heightmap &heights, Heightmap &sediment, const Heightmap &velocityX, const Heightmap &velocityZ, const TerrainWaterSettings &water, const TerrainSedimentSettings &settings)
Apply the source sediment reaction and backtrace equations with atomic dual output.
Definition TerrainSediment.cpp:7
Effective sediment coefficients from Hydraulic.compute, after UI conversion. The source hardcodes har...
Definition TerrainErosion.h:14
Explicit constants for the source hydraulic water-flow equations, after UI unit conversion.
Definition TerrainWaterField.h:14