Candidate-first material operation target with live commit/undo publication. 更多...
#include <MaterialTarget.h>
Public 成员函数 | |
| MaterialPublishingTarget (std::string id, IMaterialRuntimeSink *sink) | |
| Create an owned material document bound to a non-owning runtime sink. | |
| TargetId | targetId () const override |
| Target id. | |
| std::uint64_t | revision () const override |
| Revision. | |
| EditRegion | dirtyRegion () const override |
| Dirty region. | |
| void | clearDirtyRegion () override |
| Clears dirty region. | |
| TargetDescriptor | describe () const override |
| Describe. | |
| void * | queryCapability (const CapabilityId &capability) override |
| Forward property and snapshot capabilities from the authoring document. @ownership Borrowed from this target; callers must not delete the returned capability. @lifetime Valid until this target is destroyed or its document is replaced. | |
| Result< void > | applyDomainOperation (const DomainOperation &operation) override |
| Applies domain operation. | |
| std::unique_ptr< IDomainOperationTarget > | cloneDomainState () const override |
| Clones domain state. | |
| Result< void > | commitDomainState (std::unique_ptr< IDomainOperationTarget > candidate) override |
| Commits domain state. | |
| MaterialDocumentTarget & | authoringTarget () |
| Mutable authoring document used by property inspectors. | |
| const MaterialDocumentTarget & | authoringTarget () const |
| Immutable authoring document used by validators and previews. | |
| Result< void > | reloadSnapshot (const EditorValue &snapshot) |
| Atomically parse and publish a persisted material snapshot. | |
Public 成员函数 继承自 eve::editing::IDomainOperationTarget | |
| ~IDomainOperationTarget () override=default | |
| Releases IDomainOperationTarget resources. | |
Public 成员函数 继承自 eve::editing::IEditableTarget | |
| virtual | ~IEditableTarget ()=default |
| Releases IEditableTarget resources. | |
| virtual void * | queryCapability (const CapabilityId &capability) |
| Query an optional stable capability. | |
| template<class C > | |
| eve::OptionalRef< C > | capability () |
| Query a capability through its interface-owned stable identity. | |
| template<class C > | |
| eve::OptionalRef< const C > | capability () const |
| Capability. | |
| template<class C > | |
| C * | query () |
| Queries query. | |
| template<class C > | |
| const C * | query () const |
| Queries query. | |
Public 成员函数 继承自 eve::editing::IDomainOperationTargetStaging | |
| virtual | ~IDomainOperationTargetStaging ()=default |
| Releases IDomainOperationTargetStaging resources. | |
详细描述
Candidate-first material operation target with live commit/undo publication.
在文件 MaterialTarget.h 第 95 行定义.
构造及析构函数说明
◆ MaterialPublishingTarget()
| eve::material_editing::MaterialPublishingTarget::MaterialPublishingTarget | ( | std::string | id, |
| IMaterialRuntimeSink * | sink | ||
| ) |
Create an owned material document bound to a non-owning runtime sink.
在文件 MaterialPublishingTarget.cpp 第 8 行定义.
成员函数说明
◆ applyDomainOperation()
|
overridevirtual |
Applies domain operation.
实现了 eve::editing::IDomainOperationTarget.
在文件 MaterialPublishingTarget.cpp 第 21 行定义.
引用了 eve::material_editing::MaterialDocumentTarget::applyDomainOperation(), cloneDomainState(), commitDomainState() , 以及 operation.
◆ authoringTarget() [1/2]
|
inline |
Mutable authoring document used by property inspectors.
在文件 MaterialTarget.h 第 124 行定义.
被这些函数引用 eve::editor::MaterialStudioController::beginInteraction(), eve::editor::MaterialStudioController::cancelInteraction(), eve::editor::MaterialStudioController::commitInteraction() , 以及 eve::editor::MaterialStudioController::refreshPreview().
◆ authoringTarget() [2/2]
|
inline |
Immutable authoring document used by validators and previews.
在文件 MaterialTarget.h 第 126 行定义.
◆ clearDirtyRegion()
|
inlineoverridevirtual |
◆ cloneDomainState()
|
overridevirtual |
Clones domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 MaterialPublishingTarget.cpp 第 30 行定义.
被这些函数引用 applyDomainOperation().
◆ commitDomainState()
|
overridevirtual |
Commits domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 MaterialPublishingTarget.cpp 第 36 行定义.
引用了 eve::Result< T >::ok(), eve::material_editing::IMaterialRuntimeSink::publish() , 以及 targetId().
被这些函数引用 applyDomainOperation() , 以及 reloadSnapshot().
◆ describe()
|
overridevirtual |
Describe.
重载 eve::editing::IEditableTarget .
在文件 MaterialPublishingTarget.cpp 第 11 行定义.
引用了 eve::material_editing::MaterialDocumentTarget::describe(), descriptor , 以及 eve::editing::TargetDescriptor::type.
◆ dirtyRegion()
|
inlineoverridevirtual |
◆ queryCapability()
|
override |
Forward property and snapshot capabilities from the authoring document. @ownership Borrowed from this target; callers must not delete the returned capability. @lifetime Valid until this target is destroyed or its document is replaced.
在文件 MaterialPublishingTarget.cpp 第 17 行定义.
引用了 eve::editing::IEditableTarget::capability() , 以及 eve::material_editing::MaterialDocumentTarget::queryCapability().
◆ reloadSnapshot()
| Result< void > eve::material_editing::MaterialPublishingTarget::reloadSnapshot | ( | const EditorValue & | snapshot | ) |
Atomically parse and publish a persisted material snapshot.
- 参数
-
snapshot Detached persisted value borrowed for this call.
- 返回
- Applied only after validation and runtime publication both succeed; failure preserves authoring and runtime state.
- 备注
- Render/editor thread only, synchronous, and may call the configured runtime sink without holding a lock.
在文件 MaterialPublishingTarget.cpp 第 52 行定义.
引用了 commitDomainState().
◆ revision()
|
inlineoverridevirtual |
Revision.
实现了 eve::editing::IEditableTarget.
在文件 MaterialTarget.h 第 103 行定义.
被这些函数引用 eve::editor::MaterialStudioController::commitInteraction() , 以及 eve::editor::MaterialStudioController::state().
◆ targetId()
|
inlineoverridevirtual |
Target id.
实现了 eve::editing::IEditableTarget.
在文件 MaterialTarget.h 第 101 行定义.
被这些函数引用 commitDomainState() , 以及 eve::editor::MaterialStudioController::commitInteraction().
该类的文档由以下文件生成:
- src/modules/graphics/material/editing/MaterialTarget.h
- src/modules/graphics/material/editing/MaterialPublishingTarget.cpp
Public 成员函数 继承自