Owning script-safe multi-terrain tree transaction workspace. Tree sets and height rasters are copied on insertion. Each operation and all-tile history snapshot is evaluated in a private candidate and published by one owner-thread swap. No external pointer, callback or hidden RNG survives. 更多...
#include <TerrainTreePlacement.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| TerrainMultiTreeWorkspace () | |
| Terrain multi tree workspace. | |
| ~TerrainMultiTreeWorkspace () | |
| Terrain multi tree workspace. | |
| TerrainMultiTreeWorkspace (TerrainMultiTreeWorkspace &&) noexcept | |
| Terrain multi tree workspace. | |
| TerrainMultiTreeWorkspace & | operator= (TerrainMultiTreeWorkspace &&) noexcept |
| Operator =. | |
| TerrainMultiTreeWorkspace (const TerrainMultiTreeWorkspace &)=delete | |
| TerrainMultiTreeWorkspace & | operator= (const TerrainMultiTreeWorkspace &)=delete |
| Result< int > | addTile (const std::string &name, const PointSet &trees, const Heightmap &heights, double originX, double originZ, double width, double depth, int treeResolutionX, int treeResolutionY, bool worldMap=false) |
| Copy one uniquely named tree owner and height raster into the workspace. | |
| Result< int > | apply (const Heightmap &operationFitness, const TerrainTreePlacementSettings &settings, const TerrainStampSettings &operationSettings, TerrainTreeOperationMode mode, bool worldMapOperation=false) |
| Apply one shared distribution window and append or remove trees atomically. | |
| Result< int > | copyTile (const std::string &name, PointSet &output) const |
| Copy one named current PointSet into caller-owned output. | |
| Result< int > | undo () |
| Restore the prior all-tile tree snapshot. | |
| Result< int > | redo () |
| Restore the next all-tile tree snapshot. | |
| int | getTileCount () const noexcept |
| Number of owned tiles. | |
| int | getLastChangedSamples () const noexcept |
| Emitted or removed points from the current snapshot's operation. | |
| int | getLastAffectedTiles () const noexcept |
| Affected tiles from the current snapshot's operation. | |
| int | getOperationCount () const noexcept |
| Successful operation count including redo suffix. | |
| int | getAppliedCount () const noexcept |
| Applied operation count at the current history cursor. | |
详细描述
Owning script-safe multi-terrain tree transaction workspace. Tree sets and height rasters are copied on insertion. Each operation and all-tile history snapshot is evaluated in a private candidate and published by one owner-thread swap. No external pointer, callback or hidden RNG survives.
在文件 TerrainTreePlacement.h 第 90 行定义.
构造及析构函数说明
◆ TerrainMultiTreeWorkspace() [1/3]
| eve::procgen::TerrainMultiTreeWorkspace::TerrainMultiTreeWorkspace | ( | ) |
Terrain multi tree workspace.
在文件 TerrainTreePlacement.cpp 第 459 行定义.
◆ ~TerrainMultiTreeWorkspace()
|
default |
Terrain multi tree workspace.
◆ TerrainMultiTreeWorkspace() [2/3]
|
defaultnoexcept |
Terrain multi tree workspace.
◆ TerrainMultiTreeWorkspace() [3/3]
|
delete |
成员函数说明
◆ addTile()
| Result< int > eve::procgen::TerrainMultiTreeWorkspace::addTile | ( | const std::string & | name, |
| const PointSet & | trees, | ||
| const Heightmap & | heights, | ||
| double | originX, | ||
| double | originZ, | ||
| double | width, | ||
| double | depth, | ||
| int | treeResolutionX, | ||
| int | treeResolutionY, | ||
| bool | worldMap = false |
||
| ) |
Copy one uniquely named tree owner and height raster into the workspace.
在文件 TerrainTreePlacement.cpp 第 464 行定义.
引用了 depth, name, eve::procgen::raster_detail::validRaster() , 以及 width.
◆ apply()
| Result< int > eve::procgen::TerrainMultiTreeWorkspace::apply | ( | const Heightmap & | operationFitness, |
| const TerrainTreePlacementSettings & | settings, | ||
| const TerrainStampSettings & | operationSettings, | ||
| TerrainTreeOperationMode | mode, | ||
| bool | worldMapOperation = false |
||
| ) |
Apply one shared distribution window and append or remove trees atomically.
在文件 TerrainTreePlacement.cpp 第 495 行定义.
◆ copyTile()
| Result< int > eve::procgen::TerrainMultiTreeWorkspace::copyTile | ( | const std::string & | name, |
| PointSet & | output | ||
| ) | const |
Copy one named current PointSet into caller-owned output.
在文件 TerrainTreePlacement.cpp 第 517 行定义.
引用了 found, output , 以及 eve::Result< T >::success().
◆ getAppliedCount()
|
noexcept |
Applied operation count at the current history cursor.
在文件 TerrainTreePlacement.cpp 第 549 行定义.
◆ getLastAffectedTiles()
|
noexcept |
Affected tiles from the current snapshot's operation.
在文件 TerrainTreePlacement.cpp 第 543 行定义.
◆ getLastChangedSamples()
|
noexcept |
Emitted or removed points from the current snapshot's operation.
在文件 TerrainTreePlacement.cpp 第 540 行定义.
◆ getOperationCount()
|
noexcept |
Successful operation count including redo suffix.
在文件 TerrainTreePlacement.cpp 第 546 行定义.
◆ getTileCount()
|
noexcept |
Number of owned tiles.
在文件 TerrainTreePlacement.cpp 第 539 行定义.
◆ operator=() [1/2]
|
delete |
◆ operator=() [2/2]
|
defaultnoexcept |
Operator =.
◆ redo()
| Result< int > eve::procgen::TerrainMultiTreeWorkspace::redo | ( | ) |
Restore the next all-tile tree snapshot.
在文件 TerrainTreePlacement.cpp 第 532 行定义.
◆ undo()
| Result< int > eve::procgen::TerrainMultiTreeWorkspace::undo | ( | ) |
Restore the prior all-tile tree snapshot.
在文件 TerrainTreePlacement.cpp 第 526 行定义.
该类的文档由以下文件生成:
- src/modules/procgen/heightmap/TerrainTreePlacement.h
- src/modules/procgen/heightmap/TerrainTreePlacement.cpp