Deterministic, caller-driven equivalent of PcgTerrainWatcher's hierarchy diff. 更多...
#include <PcgTerrainWatcher.h>
Public 成员函数 | |
| void | beginScan () |
| Begin a candidate hierarchy scan without changing the published cache. | |
| Result< int > | addTerrain (const std::string &terrainId) |
| Add one non-empty, unique stable terrain id to the candidate scan. | |
| Result< int > | commitScan () |
| Atomically publish the candidate and return the number of emitted changes. | |
| void | cancelScan () |
| Discard a candidate scan. | |
| int | getTerrainCount () const noexcept |
| Returns the terrain count. | |
| int | getChangeCount () const noexcept |
| Returns the change count. | |
| Result< std::string > | getChangeTerrainId (int index) const |
| Copy a changed terrain id by index. | |
| Result< int > | getChangeType (int index) const |
| Return 0 for Created or 1 for Removed by index. | |
详细描述
Deterministic, caller-driven equivalent of PcgTerrainWatcher's hierarchy diff.
A scan is staged with beginScan/addTerrain and published with commitScan. The first successful scan seeds the cache without reporting creation, matching Pcg's startup CacheExistingTerrains behavior. Later scans report creations in current-scan order, followed by removals in prior-scan order.
@ownership Owns copied terrain ids and changes; retains no scene object or callback. @thread Caller-thread affine. No method invokes script or user callbacks.
在文件 PcgTerrainWatcher.h 第 30 行定义.
成员函数说明
◆ addTerrain()
| Result< int > eve::procgen::PcgTerrainWatcher::addTerrain | ( | const std::string & | terrainId | ) |
Add one non-empty, unique stable terrain id to the candidate scan.
在文件 PcgTerrainWatcher.cpp 第 13 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::Result< T >::success().
◆ beginScan()
| void eve::procgen::PcgTerrainWatcher::beginScan | ( | ) |
Begin a candidate hierarchy scan without changing the published cache.
在文件 PcgTerrainWatcher.cpp 第 8 行定义.
◆ cancelScan()
| void eve::procgen::PcgTerrainWatcher::cancelScan | ( | ) |
Discard a candidate scan.
在文件 PcgTerrainWatcher.cpp 第 48 行定义.
◆ commitScan()
| Result< int > eve::procgen::PcgTerrainWatcher::commitScan | ( | ) |
Atomically publish the candidate and return the number of emitted changes.
在文件 PcgTerrainWatcher.cpp 第 27 行定义.
引用了 eve::procgen::Created, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::procgen::Removed.
◆ getChangeCount()
|
noexcept |
Returns the change count.
在文件 PcgTerrainWatcher.cpp 第 53 行定义.
◆ getChangeTerrainId()
| Result< std::string > eve::procgen::PcgTerrainWatcher::getChangeTerrainId | ( | int | index | ) | const |
Copy a changed terrain id by index.
在文件 PcgTerrainWatcher.cpp 第 54 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument , 以及 eve::Result< T >::success().
◆ getChangeType()
| Result< int > eve::procgen::PcgTerrainWatcher::getChangeType | ( | int | index | ) | const |
Return 0 for Created or 1 for Removed by index.
在文件 PcgTerrainWatcher.cpp 第 60 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::Result< T >::success() , 以及 type.
◆ getTerrainCount()
|
noexcept |
Returns the terrain count.
在文件 PcgTerrainWatcher.cpp 第 52 行定义.
该类的文档由以下文件生成:
- src/modules/procgen/heightmap/PcgTerrainWatcher.h
- src/modules/procgen/heightmap/PcgTerrainWatcher.cpp