Derived cluster cache that incrementally executes a BuildLayerStack. 更多...
#include <IncrementalBuild.h>
Public 成员函数 | |
| Result< IncrementalBuildDelta > | update (const BuildLayerStack &stack, const Grid2D &grid, const PointSet &points, int clusterSizeCells, float cellSizeWorld, const PointSet *orientation=nullptr) |
| Rebuild only clusters whose layer definition, grid halo, point rows or orientation changed. | |
| void | clear () |
| Clears . | |
| int | getCachedClusterCount () const noexcept |
| Returns the cached cluster count. | |
| Result< BuildLayerExecution > | getCachedArtifacts (int clusterX, int clusterZ) const |
| Returns the cached artifacts. | |
详细描述
Derived cluster cache that incrementally executes a BuildLayerStack.
Grid hashes include a one-cell halo so tile-side geometry is invalidated when a neighboring cluster changes. Point ownership follows the source point's half-open world-space cluster. Updates are transactional and preserve the old cache on failure. @thread Affine; update and query on the owning thread.
在文件 IncrementalBuild.h 第 47 行定义.
成员函数说明
◆ clear()
| void eve::procgen::IncrementalBuildExecutor::clear | ( | ) |
◆ getCachedArtifacts()
| Result< BuildLayerExecution > eve::procgen::IncrementalBuildExecutor::getCachedArtifacts | ( | int | clusterX, |
| int | clusterZ | ||
| ) | const |
Returns the cached artifacts.
在文件 IncrementalBuild.cpp 第 221 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::NotFound , 以及 eve::Result< T >::success().
◆ getCachedClusterCount()
|
noexcept |
Returns the cached cluster count.
在文件 IncrementalBuild.cpp 第 219 行定义.
◆ update()
| Result< IncrementalBuildDelta > eve::procgen::IncrementalBuildExecutor::update | ( | const BuildLayerStack & | stack, |
| const Grid2D & | grid, | ||
| const PointSet & | points, | ||
| int | clusterSizeCells, | ||
| float | cellSizeWorld, | ||
| const PointSet * | orientation = nullptr |
||
| ) |
Rebuild only clusters whose layer definition, grid halo, point rows or orientation changed.
- 参数
-
stack Authoritative ordered layer definitions. grid Authoritative tile source. points Authoritative object placement source. clusterSizeCells Positive square cluster extent in grid cells. cellSizeWorld Positive world-space size of one grid cell. orientation Optional object orientation layer; changes invalidate all active clusters.
- 返回
- Deterministically ordered upsert/removal delta. Empty means the cache was already current. @cost O(grid cells + points + dirty cluster build cost); unchanged artifacts are copied only by cache ownership.
在文件 IncrementalBuild.cpp 第 160 行定义.
引用了 active, eve::procgen::Semantic::Empty, eve::Diagnostic::error(), eve::procgen::BuildLayerStack::executeRegion(), eve::Result< T >::failure(), hash, eve::InvalidArgument, key, point, points, previous, eve::Result< T >::success(), x , 以及 y.
该类的文档由以下文件生成:
- src/modules/procgen/IncrementalBuild.h
- src/modules/procgen/IncrementalBuild.cpp