Declarative authoring composition: hierarchy plus source and presentation payloads. Owns authored values; meshes, imported hosts and cameras are rebuildable projections. @thread Owner thread only, no callbacks. No native pointers are persisted. 更多...
#include <SceneAuthoringDocument.h>
Public 成员函数 | |
| SceneAuthoringDocumentTarget (std::string id) | |
| Create an empty authoring document with a stable target identity. | |
| EditorValue | snapshotValue () const override |
| Copy all authored values into an owning versioned snapshot. @cost Linear copy per save/edit inspection. | |
| Result< DomainOperation > | makeRestore (const EditorValue &snapshot) const override |
| Validate a complete candidate before producing a reversible replacement. | |
| Result< void > | applyDomainOperation (const DomainOperation &operation) override |
| Apply an operation on this owner thread; failures preserve state. | |
| std::unique_ptr< IDomainOperationTarget > | cloneDomainState () const override |
| Clone an isolated transaction candidate, owning all values. @cost Linear copy per transaction. | |
| Result< void > | commitDomainState (std::unique_ptr< IDomainOperationTarget > candidate) override |
| Atomically publish a validated candidate of the same target identity. | |
| Result< DomainOperation > | makePayload (const std::string §ion, const std::string &key, const EditorValue &payload) const |
| Plan one source/camera/lighting payload change; missing sources may be defined. | |
| Result< DomainOperation > | makeDelete (const editing::ObjectId &id) const override |
| Delete a leaf and its relations as one reversible document transaction. @cost Linear document copy per deletion, amortized across one undoable edit. | |
Public 成员函数 继承自 eve::scene_editing::SceneTargetBase | |
| SceneTargetBase (std::string id, std::string type) | |
| Scene target base. | |
| ~SceneTargetBase () override=default | |
| Scene target base. | |
| TargetId | targetId () const override |
| Target id. | |
| TargetDescriptor | describe () const override |
| Describe. | |
| void * | queryCapability (const CapabilityId &capability) override |
| Queries capability. | |
| 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. | |
| Result< SceneObjectSnapshot > | sceneObject (const ObjectId &id) const override |
| Scene object. | |
| std::vector< ObjectId > | sceneChildren (const ObjectId &parent) const override |
| Scene children. | |
| Result< DomainOperation > | makeCreate (const CreateSceneObjectRequest &request) const override |
| Make create. | |
| Result< DomainOperation > | makeDelete (const ObjectId &id) const override |
| Make delete. | |
| Result< DomainOperation > | makeRename (const ObjectId &id, const std::string &name) const override |
| Make rename. | |
| Result< DomainOperation > | makeReparent (const ObjectId &id, const ObjectId &parent) const override |
| Make reparent. | |
| Result< SceneTransformValue > | readTransform (const ObjectId &id) const override |
| Reads transform. | |
| Result< DomainOperation > | makeSetTransform (const ObjectId &id, const SceneTransformValue &transform) const override |
| Make set transform. | |
| void | bindComponentPayloads (SceneComponentPayloadRegistry *registry) |
| Bind an optional non-owning registry used by component inspectors. | |
| EditorValue | snapshotValue () const override |
| Capture deterministic scene content for document persistence. | |
Public 成员函数 继承自 eve::editing::EditableTargetState | |
| EditableTargetState (Revision initial=1) | |
| Constructs the shared state with an explicit initial revision. | |
| EditRegion | dirtyRegion () const override |
| Return the accumulated dirty region. | |
| void | clearDirtyRegion () override |
| Discard the dirty region; the revision does not change. | |
| std::uint64_t | revision () const override |
| Return the current revision. | |
| Revision | revisionValue () const noexcept |
| Return the revision as the shared protocol revision type. | |
Public 成员函数 继承自 eve::editing::IEditableTarget | |
| virtual | ~IEditableTarget ()=default |
| Releases IEditableTarget resources. | |
| 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::IDomainOperationTarget | |
| ~IDomainOperationTarget () override=default | |
| Releases IDomainOperationTarget resources. | |
Public 成员函数 继承自 eve::editing::IDomainOperationTargetStaging | |
| virtual | ~IDomainOperationTargetStaging ()=default |
| Releases IDomainOperationTargetStaging resources. | |
Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| virtual | ~IEditingSnapshotProvider ()=default |
| Releases IEditingSnapshotProvider resources. | |
Public 成员函数 继承自 eve::scene_editing::ISceneHierarchyEditTarget | |
| virtual | ~ISceneHierarchyEditTarget ()=default |
| Releases ISceneHierarchyEditTarget resources. | |
Public 成员函数 继承自 eve::scene_editing::ITransformEditTarget | |
| virtual | ~ITransformEditTarget ()=default |
| Releases ITransformEditTarget resources. | |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| static CapabilityId | editingCapabilityId () |
| Stable capability identity shared by every editable domain target. | |
静态 Public 成员函数 继承自 eve::scene_editing::ISceneHierarchyEditTarget | |
| static CapabilityId | editorCapabilityId () |
| Stable capability identity used instead of cross-module RTTI. | |
静态 Public 成员函数 继承自 eve::scene_editing::ITransformEditTarget | |
| static editing::CapabilityId | editingCapabilityId () |
| Editing capability id. | |
| static editing::CapabilityId | editorCapabilityId () |
| Compatibility spelling retained for existing editor tools. | |
Protected 成员函数 继承自 eve::editing::EditableTargetState | |
| void | widenDirty (int x, int y) |
| Widen the dirty region without advancing the revision. | |
| void | widenDirty (const EditRegion ®ion) |
| Widen the dirty region without advancing the revision. | |
| void | widenDirty () |
| Mark an unknown area dirty without advancing the revision. | |
| void | bumpRevision () |
| Advance the revision without touching the dirty region. | |
| void | setRevision (Revision revision) |
| Adopt a revision observed elsewhere, without advancing it. | |
| void | setDirtyRegion (const EditRegion ®ion) |
| Replace the dirty region wholesale, without advancing the revision. | |
| void | markDirty (int x, int y) |
| Include one cell in the dirty region and advance the revision. | |
| void | markDirty (const EditRegion ®ion) |
| Include a whole region and advance the revision. | |
| void | markDirty () |
| Mark an unknown area dirty and advance the revision. | |
详细描述
Declarative authoring composition: hierarchy plus source and presentation payloads. Owns authored values; meshes, imported hosts and cameras are rebuildable projections. @thread Owner thread only, no callbacks. No native pointers are persisted.
- 备注
- Schema eve.scene.authoring version 4 migrates v1/v2/v3 and rejects unknown fields and versions. Source references describe immutable asset revisions; importing does not overwrite authored TRS.
在文件 SceneAuthoringDocument.h 第 12 行定义.
构造及析构函数说明
◆ SceneAuthoringDocumentTarget()
|
explicit |
Create an empty authoring document with a stable target identity.
在文件 SceneAuthoringDocument.cpp 第 117 行定义.
成员函数说明
◆ applyDomainOperation()
|
overridevirtual |
Apply an operation on this owner thread; failures preserve state.
实现了 eve::editing::IDomainOperationTarget.
在文件 SceneAuthoringDocument.cpp 第 202 行定义.
引用了 eve::scene_editing::SceneTargetBase::applyDomainOperation(), camera, changed, eve::Result< T >::failure(), lighting, loaded, eve::scene_editing::SceneTargetBase::makeRestore(), makeRestore(), operation, sources, eve::scene_editing::SceneTargetBase::targetId(), valid , 以及 values.
◆ cloneDomainState()
|
overridevirtual |
Clone an isolated transaction candidate, owning all values. @cost Linear copy per transaction.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 SceneAuthoringDocument.cpp 第 231 行定义.
◆ commitDomainState()
|
overridevirtual |
Atomically publish a validated candidate of the same target identity.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 SceneAuthoringDocument.cpp 第 234 行定义.
引用了 camera, eve::scene_editing::SceneTargetBase::commitDomainState(), committed, lighting, sources , 以及 eve::scene_editing::SceneTargetBase::targetId().
◆ makeDelete()
|
overridevirtual |
Delete a leaf and its relations as one reversible document transaction. @cost Linear document copy per deletion, amortized across one undoable edit.
实现了 eve::scene_editing::ISceneHierarchyEditTarget.
在文件 SceneAuthoringDocument.cpp 第 250 行定义.
引用了 eve::scene_editing::SceneTargetBase::applyDomainOperation(), eve::Result< T >::failure(), eve::editing::Value::getIf(), loaded, eve::scene_editing::SceneTargetBase::makeDelete(), eve::scene_editing::SceneTargetBase::makeRestore(), makeRestore(), relation, removed, root, snapshot, snapshotValue(), eve::scene_editing::SceneTargetBase::snapshotValue() , 以及 value.
◆ makePayload()
| Result< DomainOperation > eve::scene_editing::SceneAuthoringDocumentTarget::makePayload | ( | const std::string & | section, |
| const std::string & | key, | ||
| const EditorValue & | payload | ||
| ) | const |
Plan one source/camera/lighting payload change; missing sources may be defined.
- 参数
-
section sources, camera, lighting or relations; source key is an object identity.
- 返回
- Reversible operation owning its payload, or rejection without mutation.
在文件 SceneAuthoringDocument.cpp 第 185 行定义.
引用了 eve::Result< T >::failure(), key, makeRestore(), payload, snapshotValue(), valid , 以及 values.
◆ makeRestore()
|
overridevirtual |
Validate a complete candidate before producing a reversible replacement.
- 返回
- Operation or diagnostic; no observable state changes. @cost Linear validation/copy per restore, amortized over the imported document.
重载 eve::scene_editing::SceneTargetBase .
在文件 SceneAuthoringDocument.cpp 第 128 行定义.
引用了 applied, eve::scene_editing::SceneTargetBase::applyDomainOperation(), eve::Result< T >::failure(), fields, key, eve::scene_editing::SceneTargetBase::makeRestore(), operation, eve::scene_editing::parseSceneRelations(), relation, root, snapshot, snapshotValue(), source, sources, eve::scene_editing::SceneTargetBase::targetId(), text, eve::editing::DomainOperation::type, valid , 以及 version.
被这些函数引用 applyDomainOperation(), makeDelete() , 以及 makePayload().
◆ snapshotValue()
|
overridevirtual |
Copy all authored values into an owning versioned snapshot. @cost Linear copy per save/edit inspection.
实现了 eve::editing::IEditingSnapshotProvider.
在文件 SceneAuthoringDocument.cpp 第 119 行定义.
引用了 eve::scene_editing::SceneTargetBase::snapshotValue().
被这些函数引用 makeDelete(), makePayload() , 以及 makeRestore().
该类的文档由以下文件生成:
- src/modules/scene/editing/SceneAuthoringDocument.h
- src/modules/scene/editing/SceneAuthoringDocument.cpp
Public 成员函数 继承自