Owning normalized terrain texture-layer weights with atomic mutation. Layers share one finite width/height topology and each texel sums to one within float tolerance. 更多...
#include <TerrainSplatmap.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| TerrainSplatmap () | |
| Terrain splatmap. | |
| ~TerrainSplatmap () | |
| Terrain splatmap. | |
| TerrainSplatmap (TerrainSplatmap &&) noexcept | |
| Terrain splatmap. | |
| TerrainSplatmap & | operator= (TerrainSplatmap &&) noexcept |
| Operator =. | |
| TerrainSplatmap (const TerrainSplatmap &) | |
| Terrain splatmap. | |
| TerrainSplatmap & | operator= (const TerrainSplatmap &) |
| Operator =. | |
| Result< int > | initialize (int width, int height, int layerCount, int defaultLayer=0) |
| Initialize topology and assign all weight to defaultLayer. | |
| Result< float > | sample (int layer, int x, int y) const |
| Return one layer weight, or a structured range/precondition failure. | |
| Result< int > | copyLayer (int layer, Heightmap &output) const |
| Copy one complete texture layer into a same-sized scalar mask atomically. | |
| int | getLastChangedSamples () const noexcept |
| Number of texels changed by the last successful paint operation. | |
| int | getWidth () const noexcept |
| Current splat width, or zero before initialization. | |
| int | getHeight () const noexcept |
| Current splat height, or zero before initialization. | |
| int | getLayerCount () const noexcept |
| Current layer count, or zero before initialization. | |
友元 | |
| EVENGINE_API_DOMAINS Result< int > | paintTerrainSplatLayer (TerrainSplatmap &, const Heightmap &, int) |
| Replace one terrain layer with a normalized paint raster and proportionally renormalize all other layers. | |
| EVENGINE_API_DOMAINS Result< int > | applyGtsHeightBlend (TerrainSplatmap &, const TerrainSplatmap &, const GtsHeightBlendSet &, float) |
| Recompute all splat weights using the GTS texture-height blending equation. | |
| EVENGINE_API_DOMAINS Result< int > | alignTerrainSplatTextures (TerrainSplatmap &, TerrainSplatmap &, const TerrainTextureAlignSettings &) |
| Blend texture weights on adjacent terrain edges using Pcg's synchronized-noise equation. | |
| EVENGINE_API_DOMAINS Result< TerrainMultiTileReport > | paintTerrainSplatLayerMultiTile (const std::vector< struct TerrainSplatTile > &, const Heightmap &, int, const TerrainStampSettings &, bool, const std::vector< std::string > &) |
详细描述
Owning normalized terrain texture-layer weights with atomic mutation. Layers share one finite width/height topology and each texel sums to one within float tolerance.
在文件 TerrainSplatmap.h 第 20 行定义.
构造及析构函数说明
◆ TerrainSplatmap() [1/3]
| eve::procgen::TerrainSplatmap::TerrainSplatmap | ( | ) |
Terrain splatmap.
在文件 TerrainSplatmap.cpp 第 62 行定义.
◆ ~TerrainSplatmap()
|
default |
Terrain splatmap.
◆ TerrainSplatmap() [2/3]
|
defaultnoexcept |
Terrain splatmap.
◆ TerrainSplatmap() [3/3]
| eve::procgen::TerrainSplatmap::TerrainSplatmap | ( | const TerrainSplatmap & | other | ) |
Terrain splatmap.
在文件 TerrainSplatmap.cpp 第 66 行定义.
成员函数说明
◆ copyLayer()
Copy one complete texture layer into a same-sized scalar mask atomically.
在文件 TerrainSplatmap.cpp 第 98 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, layer, output, eve::Result< T >::success(), x , 以及 y.
◆ getHeight()
|
noexcept |
Current splat height, or zero before initialization.
在文件 TerrainSplatmap.cpp 第 113 行定义.
◆ getLastChangedSamples()
|
noexcept |
Number of texels changed by the last successful paint operation.
在文件 TerrainSplatmap.cpp 第 111 行定义.
◆ getLayerCount()
|
noexcept |
Current layer count, or zero before initialization.
在文件 TerrainSplatmap.cpp 第 114 行定义.
◆ getWidth()
|
noexcept |
Current splat width, or zero before initialization.
在文件 TerrainSplatmap.cpp 第 112 行定义.
◆ initialize()
| Result< int > eve::procgen::TerrainSplatmap::initialize | ( | int | width, |
| int | height, | ||
| int | layerCount, | ||
| int | defaultLayer = 0 |
||
| ) |
Initialize topology and assign all weight to defaultLayer.
在文件 TerrainSplatmap.cpp 第 75 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), height, eve::InvalidArgument, eve::Result< T >::success(), width, x , 以及 y.
◆ operator=() [1/2]
| TerrainSplatmap & eve::procgen::TerrainSplatmap::operator= | ( | const TerrainSplatmap & | other | ) |
Operator =.
在文件 TerrainSplatmap.cpp 第 68 行定义.
◆ operator=() [2/2]
|
defaultnoexcept |
Operator =.
◆ sample()
| Result< float > eve::procgen::TerrainSplatmap::sample | ( | int | layer, |
| int | x, | ||
| int | y | ||
| ) | const |
Return one layer weight, or a structured range/precondition failure.
在文件 TerrainSplatmap.cpp 第 91 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, layer, eve::Result< T >::success(), x , 以及 y.
友元及相关函数文档
◆ alignTerrainSplatTextures
|
friend |
Blend texture weights on adjacent terrain edges using Pcg's synchronized-noise equation.
- 参数
-
terrainA First exclusively borrowed splatmap owner. terrainB Second exclusively borrowed splatmap owner; must be distinct from terrainA. settings Finite world geometry and blend controls, borrowed only for this call.
- 返回
- Total changed texels across both maps, or a structured failure with neither map modified.
在文件 TerrainSplatmap.cpp 第 116 行定义.
◆ applyGtsHeightBlend
|
friend |
Recompute all splat weights using the GTS texture-height blending equation.
- 返回
- Changed texel count or InvalidArgument; output remains unchanged on failure.
在文件 TerrainSplatmap.cpp 第 239 行定义.
◆ paintTerrainSplatLayer
|
friend |
Replace one terrain layer with a normalized paint raster and proportionally renormalize all other layers.
- 参数
-
target Exclusively borrowed initialized owner, published only after every texel succeeds. paint Finite normalized raster matching target topology; point sampling matches Pcg SetSplatmap. targetLayer Layer index previously gathered by Pcg GetSplatmap.
- 返回
- Changed texel count or structured diagnostic. No references, callbacks, RNG or time survive the call.
在文件 TerrainSplatmap.cpp 第 203 行定义.
◆ paintTerrainSplatLayerMultiTile
|
friend |
该类的文档由以下文件生成:
- src/modules/procgen/heightmap/TerrainSplatmap.h
- src/modules/procgen/heightmap/TerrainSplatmap.cpp