Undoable publish/remove of spawn.mesh PointSet batches through Procgen scene sink. 更多...
#include <PcgInstancePublisher.h>
Public 成员函数 | |
| Result< editing::DomainOperation > | planPublish (const std::string &batchId, const std::string &assetAttribute="mesh", const std::string &defaultAsset={}) const |
| Build a publish operation whose inverse removes the same batch id. | |
| Result< editing::DomainOperation > | planRemove (const std::string &batchId) const |
| Build a remove operation (inverse empty; redo requires a fresh publish plan). | |
| Result< void > | applyPublish (procgen::Procgen &procgen, const editing::DomainOperation &operation, procgen::ProcgenPointSetHandleRef points) const |
| Execute a planPublish operation with a live point-set handle. | |
| Result< void > | apply (procgen::Procgen &procgen, const editing::DomainOperation &operation) const |
| Execute a planRemove operation, or undo a publish by applying its inverse payload. | |
静态 Public 属性 | |
| static constexpr const char * | kPublishType = "procgen.pcg.publishInstances.v1" |
| static constexpr const char * | kRemoveType = "procgen.pcg.removeInstances.v1" |
详细描述
Undoable publish/remove of spawn.mesh PointSet batches through Procgen scene sink.
Closes the editor loop for Spawner → scene instances without coupling PointGraph to Scene. planPublish records batch identity and attribute names; callers pass the live point-set handle to applyPublish. planRemove / apply undo a published batch.
在文件 PcgInstancePublisher.h 第 18 行定义.
成员函数说明
◆ apply()
| Result< void > eve::procgen_editing::PcgInstancePublisher::apply | ( | procgen::Procgen & | procgen, |
| const editing::DomainOperation & | operation | ||
| ) | const |
Execute a planRemove operation, or undo a publish by applying its inverse payload.
- 注解
- Passing a publish operation applies its inverse remove.
在文件 PcgInstancePublisher.cpp 第 89 行定义.
引用了 eve::editing::applied(), kPublishType, kRemoveType, operation, eve::editing::DomainOperation::payload, removed, eve::procgen::Procgen::removeInstances() , 以及 eve::editing::DomainOperation::type.
◆ applyPublish()
| Result< void > eve::procgen_editing::PcgInstancePublisher::applyPublish | ( | procgen::Procgen & | procgen, |
| const editing::DomainOperation & | operation, | ||
| procgen::ProcgenPointSetHandleRef | points | ||
| ) | const |
Execute a planPublish operation with a live point-set handle.
在文件 PcgInstancePublisher.cpp 第 74 行定义.
引用了 eve::editing::applied(), kPublishType, operation, points , 以及 eve::procgen::Procgen::publishInstances().
◆ planPublish()
| Result< editing::DomainOperation > eve::procgen_editing::PcgInstancePublisher::planPublish | ( | const std::string & | batchId, |
| const std::string & | assetAttribute = "mesh", |
||
| const std::string & | defaultAsset = {} |
||
| ) | const |
Build a publish operation whose inverse removes the same batch id.
在文件 PcgInstancePublisher.cpp 第 38 行定义.
引用了 eve::editing::applied(), kPublishType, kRemoveType, operation, payload , 以及 eve::editing::DomainOperation::type.
◆ planRemove()
| Result< editing::DomainOperation > eve::procgen_editing::PcgInstancePublisher::planRemove | ( | const std::string & | batchId | ) | const |
Build a remove operation (inverse empty; redo requires a fresh publish plan).
在文件 PcgInstancePublisher.cpp 第 61 行定义.
引用了 eve::editing::applied(), kRemoveType, operation, payload , 以及 eve::editing::DomainOperation::type.
类成员变量说明
◆ kPublishType
|
staticconstexpr |
在文件 PcgInstancePublisher.h 第 20 行定义.
被这些函数引用 apply(), applyPublish() , 以及 planPublish().
◆ kRemoveType
|
staticconstexpr |
在文件 PcgInstancePublisher.h 第 21 行定义.
被这些函数引用 apply(), planPublish() , 以及 planRemove().
该类的文档由以下文件生成:
- src/modules/procgen/editing/PcgInstancePublisher.h
- src/modules/procgen/editing/PcgInstancePublisher.cpp