Native orchestration of Pcg RuntimeStamper's load, flatten, fit, mask, and stamp sequence. 更多...
#include <PcgRuntimeStamper.h>
Public 成员函数 | |
| Result< void > | configure (std::string stampAddress, bool showGui=true, bool showDebug=true) |
| Set the resource address and presentation flags; backslashes are normalized to slashes. | |
| Result< void > | loadStamp (const Heightmap &stamp, const std::string &resourceName) |
| Copy a decoded stamp resource into the controller. | |
| Result< void > | reportMissingStamp () |
| Record the same missing-resource failure exposed by Pcg RuntimeStamper. | |
| Result< int > | execute (Heightmap &target, double originX=0.0, double originZ=0.0, double spacingX=1.0, double spacingZ=1.0) |
| Flatten target to zero, fit the stamp to its complete grid, and apply height 6 with a linear radial mask. | |
| Result< void > | updateLayout (double screenWidth, double screenHeight) |
| Recompute Pcg's 300x20 bottom-centred progress-label rectangle. | |
| const std::string & | stampAddress () const noexcept |
| Return the normalized resource address. | |
| const std::string & | progressText () const noexcept |
| Return the current user-facing progress text. | |
| PcgRuntimeStampStatus | status () const noexcept |
| Return the lifecycle state. | |
| double | updateTimeAllowed () const noexcept |
| Return Pcg's incremental update allowance, 1/15 second. | |
| double | labelCenterX () const noexcept |
| Return progress-label center X. | |
| double | labelCenterY () const noexcept |
| Return progress-label center Y. | |
详细描述
Native orchestration of Pcg RuntimeStamper's load, flatten, fit, mask, and stamp sequence.
The controller owns a copy of the loaded raster. execute() builds a complete terrain candidate and publishes it only on success. It retains no external pointer and invokes no callbacks. @thread Game thread only; callers must serialize access to the target heightmap.
在文件 PcgRuntimeStamper.h 第 19 行定义.
成员函数说明
◆ configure()
| Result< void > eve::procgen::PcgRuntimeStamper::configure | ( | std::string | stampAddress, |
| bool | showGui = true, |
||
| bool | showDebug = true |
||
| ) |
Set the resource address and presentation flags; backslashes are normalized to slashes.
在文件 PcgRuntimeStamper.cpp 第 21 行定义.
引用了 eve::procgen::AwaitingResource, stampAddress() , 以及 eve::Result< T >::success().
◆ execute()
| Result< int > eve::procgen::PcgRuntimeStamper::execute | ( | Heightmap & | target, |
| double | originX = 0.0, |
||
| double | originZ = 0.0, |
||
| double | spacingX = 1.0, |
||
| double | spacingZ = 1.0 |
||
| ) |
Flatten target to zero, fit the stamp to its complete grid, and apply height 6 with a linear radial mask.
在文件 PcgRuntimeStamper.cpp 第 55 行定义.
引用了 eve::procgen::applyTerrainStamp(), eve::procgen::Completed, eve::procgen::Heightmap::data(), eve::procgen::Failed, eve::procgen::Heightmap::getHeight(), eve::procgen::Heightmap::getWidth(), eve::procgen::Loaded, nx, ny, eve::procgen::TerrainStampSettings::originX, eve::procgen::Set, eve::procgen::Heightmap::setHeight(), settings, spacingX, spacingZ, target, eve::procgen::raster_detail::validRaster(), x , 以及 y.
◆ labelCenterX()
|
inlinenoexcept |
Return progress-label center X.
在文件 PcgRuntimeStamper.h 第 42 行定义.
◆ labelCenterY()
|
inlinenoexcept |
Return progress-label center Y.
在文件 PcgRuntimeStamper.h 第 44 行定义.
◆ loadStamp()
| Result< void > eve::procgen::PcgRuntimeStamper::loadStamp | ( | const Heightmap & | stamp, |
| const std::string & | resourceName | ||
| ) |
Copy a decoded stamp resource into the controller.
在文件 PcgRuntimeStamper.cpp 第 33 行定义.
引用了 eve::procgen::Failed, eve::procgen::Idle, eve::procgen::Loaded, stamp, eve::Result< T >::success() , 以及 eve::procgen::raster_detail::validRaster().
◆ progressText()
|
inlinenoexcept |
Return the current user-facing progress text.
在文件 PcgRuntimeStamper.h 第 36 行定义.
◆ reportMissingStamp()
| Result< void > eve::procgen::PcgRuntimeStamper::reportMissingStamp | ( | ) |
Record the same missing-resource failure exposed by Pcg RuntimeStamper.
在文件 PcgRuntimeStamper.cpp 第 47 行定义.
引用了 eve::procgen::Failed , 以及 eve::procgen::Idle.
◆ stampAddress()
|
inlinenoexcept |
◆ status()
|
inlinenoexcept |
Return the lifecycle state.
在文件 PcgRuntimeStamper.h 第 38 行定义.
◆ updateLayout()
| Result< void > eve::procgen::PcgRuntimeStamper::updateLayout | ( | double | screenWidth, |
| double | screenHeight | ||
| ) |
Recompute Pcg's 300x20 bottom-centred progress-label rectangle.
在文件 PcgRuntimeStamper.cpp 第 101 行定义.
◆ updateTimeAllowed()
|
inlinenoexcept |
Return Pcg's incremental update allowance, 1/15 second.
在文件 PcgRuntimeStamper.h 第 40 行定义.
该类的文档由以下文件生成:
- src/modules/procgen/heightmap/PcgRuntimeStamper.h
- src/modules/procgen/heightmap/PcgRuntimeStamper.cpp