Owning spline authoring document with transactional operations and schema-versioned snapshots. 更多...
#include <SplinePathDocument.h>
Public 成员函数 | |
| SplinePathDocument (std::string id) | |
| Construct an empty document with a stable target id. | |
| TargetId | targetId () const override |
| Target id. | |
| TargetDescriptor | describe () const override |
| Describe. | |
| void * | queryCapability (const CapabilityId &capability) override |
| Query the spline editing 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< DomainOperation > | makeSetPoint (const SplinePathControlPoint &point) const override |
| Make set point. | |
| Result< DomainOperation > | makeDeletePoint (const StableId &point) const override |
| Make delete point. | |
| Result< DomainOperation > | makeSetSettings (const SplinePathSettings &settings) const override |
| Make set settings. | |
| Result< DomainOperation > | makeInsertPointAt (int segment, double t, const StableId &point) const override |
| Make insert point at. | |
| Result< DomainOperation > | makeSnapPoint (const StableId &point, double gridSize) const override |
| Make snap point. | |
| Result< DomainOperation > | makeSnapAll (double gridSize) const override |
| Make snap all. | |
| Result< DomainOperation > | makeFlipDirection () const override |
| Make flip direction. | |
| Result< DomainOperation > | makeSetChunkBreak (const StableId &point, bool disconnected) const override |
| Make set chunk break. | |
| Result< DomainOperation > | makeAppendChunk (const SplinePathControlPoint &first, const SplinePathControlPoint &second) const override |
| Make append chunk. | |
| Result< DomainOperation > | makeDeleteChunk (int chunk) const override |
| Make delete chunk. | |
| Result< DomainOperation > | makeSetPointRotation (const StableId &point, double pitchDegrees, double yawDegrees, double rollDegrees) const override |
| Make set point rotation. | |
| Result< DomainOperation > | makeResetPointRotation (const StableId &point) const override |
| Make reset point rotation. | |
| Result< DomainOperation > | makeCenterPoint (const StableId &point) const override |
| Make center point. | |
| Result< DomainOperation > | makeMirrorAxis (std::string_view axis) const override |
| Make mirror axis. | |
| std::vector< SplinePathControlPoint > | points () const |
| Return points in deterministic order and stable-id tie order. | |
| const SplinePathSettings & | settings () const noexcept |
| Return current interpolation and closure settings. | |
| Result< procgen::SplinePath > | compilePath () const |
| Compile an owning runtime spline without retaining document references. | |
| EditorValue | snapshotValue () const |
Capture schema eve.procgen.splinePath version one. | |
| Result< void > | loadSnapshot (const EditorValue &snapshot) |
| Atomically load a validated version-one snapshot. | |
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::procgen_editing::ISplinePathDocumentEditTarget | |
| virtual | ~ISplinePathDocumentEditTarget ()=default |
| Releases ISplinePathDocumentEditTarget resources. | |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 eve::procgen_editing::ISplinePathDocumentEditTarget | |
| static CapabilityId | editingCapabilityId () |
| Return the stable capability id. | |
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. | |
详细描述
Owning spline authoring document with transactional operations and schema-versioned snapshots.
Unknown snapshot fields are ignored. Known fields are validated into an isolated candidate before commit.
在文件 SplinePathDocument.h 第 87 行定义.
构造及析构函数说明
◆ SplinePathDocument()
|
explicit |
Construct an empty document with a stable target id.
在文件 SplinePathDocument.cpp 第 125 行定义.
成员函数说明
◆ applyDomainOperation()
|
overridevirtual |
Applies domain operation.
实现了 eve::editing::IDomainOperationTarget.
在文件 SplinePathDocument.cpp 第 141 行定义.
引用了 eve::editing::EditableTargetState::bumpRevision(), loadSnapshot(), eve::editing::EditableTargetState::revisionValue(), eve::editing::EditableTargetState::setRevision(), value, eve::editing::EditableTargetState::widenDirty() , 以及 eve::editing::EditableTargetState::widenDirty().
◆ cloneDomainState()
|
overridevirtual |
Clones domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 SplinePathDocument.cpp 第 468 行定义.
◆ commitDomainState()
|
overridevirtual |
Commits domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 SplinePathDocument.cpp 第 472 行定义.
引用了 spline.
被这些函数引用 eve::procgen_editing::SplinePathBinder::refreshResult().
◆ compilePath()
| Result< procgen::SplinePath > eve::procgen_editing::SplinePathDocument::compilePath | ( | ) | const |
Compile an owning runtime spline without retaining document references.
在文件 SplinePathDocument.cpp 第 530 行定义.
引用了 eve::procgen_editing::SplinePathSettings::closed, kind, eve::procgen_editing::SplinePathSettings::kind, path, point, points() , 以及 eve::procgen::SplinePath::setKindResult().
被这些函数引用 eve::procgen_editing::SplinePathGizmoBuilder::build(), eve::procgen_editing::compileSplinePathSnapshot() , 以及 makeInsertPointAt().
◆ describe()
|
overridevirtual |
◆ loadSnapshot()
| Result< void > eve::procgen_editing::SplinePathDocument::loadSnapshot | ( | const EditorValue & | snapshot | ) |
Atomically load a validated version-one snapshot.
在文件 SplinePathDocument.cpp 第 565 行定义.
引用了 eve::editing::EditableTargetState::clearDirtyRegion(), eve::procgen_editing::SplinePathSettings::closed, eve::procgen_editing::detail::field(), points(), eve::editing::EditableTargetState::revisionValue(), eve::editing::EditableTargetState::setRevision(), settings() , 以及 value.
被这些函数引用 applyDomainOperation() , 以及 eve::procgen_editing::compileSplinePathSnapshot().
◆ makeAppendChunk()
|
overridevirtual |
Make append chunk.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 347 行定义.
引用了 eve::procgen_editing::SplinePathSettings::closed, first, operation, points(), second , 以及 snapshotValue().
◆ makeCenterPoint()
|
overridevirtual |
Make center point.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 429 行定义.
引用了 found, index, makeSetPoint(), points(), u, updated , 以及 value.
◆ makeDeleteChunk()
|
overridevirtual |
Make delete chunk.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 379 行定义.
引用了 operation, order, point, points(), snapshotValue() , 以及 u.
◆ makeDeletePoint()
|
overridevirtual |
Make delete point.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 493 行定义.
◆ makeFlipDirection()
|
overridevirtual |
Make flip direction.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 287 行定义.
引用了 operation, point, points() , 以及 snapshotValue().
◆ makeInsertPointAt()
|
overridevirtual |
Make insert point at.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 182 行定义.
引用了 a, b, eve::procgen_editing::SplinePathSettings::closed, compilePath(), first, eve::procgen_editing::SplinePathControlPoint::id, eve::procgen_editing::SplinePathSettings::kind, operation, point, points(), second, snapshotValue(), t , 以及 eve::UuidIdAdapter< Tag >::value().
◆ makeMirrorAxis()
|
overridevirtual |
Make mirror axis.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 448 行定义.
引用了 operation, point, position , 以及 snapshotValue().
◆ makeResetPointRotation()
|
overridevirtual |
Make reset point rotation.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 425 行定义.
引用了 makeSetPointRotation() , 以及 point.
◆ makeSetChunkBreak()
|
overridevirtual |
Make set chunk break.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 320 行定义.
引用了 eve::procgen_editing::SplinePathSettings::closed, found, index, makeSetPoint(), points(), u, updated , 以及 value.
◆ makeSetPoint()
|
overridevirtual |
Make set point.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 481 行定义.
引用了 exists, found, operation , 以及 point.
被这些函数引用 eve::procgen_editing::SplinePathDragSession::finishDrag(), makeCenterPoint(), makeSetChunkBreak(), makeSetPointRotation() , 以及 makeSnapPoint().
◆ makeSetPointRotation()
|
overridevirtual |
Make set point rotation.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 409 行定义.
引用了 found, makeSetPoint(), point , 以及 updated.
被这些函数引用 makeResetPointRotation().
◆ makeSetSettings()
|
overridevirtual |
Make set settings.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 503 行定义.
引用了 eve::procgen_editing::SplinePathSettings::closed, operation , 以及 settings().
◆ makeSnapAll()
|
overridevirtual |
Make snap all.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 271 行定义.
引用了 operation, point , 以及 snapshotValue().
◆ makeSnapPoint()
|
overridevirtual |
Make snap point.
实现了 eve::procgen_editing::ISplinePathDocumentEditTarget.
在文件 SplinePathDocument.cpp 第 256 行定义.
引用了 found, makeSetPoint() , 以及 point.
◆ points()
| std::vector< SplinePathControlPoint > eve::procgen_editing::SplinePathDocument::points | ( | ) | const |
Return points in deterministic order and stable-id tie order.
在文件 SplinePathDocument.cpp 第 517 行定义.
引用了 id, left, point , 以及 right.
被这些函数引用 eve::procgen_editing::SplinePathDragSession::beginDrag(), eve::procgen_editing::SplinePathBinder::bindResult(), eve::procgen_editing::SplinePathGizmoBuilder::build(), compilePath(), loadSnapshot(), makeAppendChunk(), makeCenterPoint(), makeDeleteChunk(), makeFlipDirection(), makeInsertPointAt(), makeSetChunkBreak(), eve::procgen_editing::SplinePathBinder::refreshResult() , 以及 snapshotValue().
◆ queryCapability()
|
overridevirtual |
Query the spline editing capability.
- 参数
-
capability Stable requested capability id.
- 返回
- Borrowed pointer owned by this document, or null when unsupported. @lifetime Valid until this document is destroyed.
重载 eve::editing::IEditableTarget .
在文件 SplinePathDocument.cpp 第 135 行定义.
引用了 eve::editing::IEditableTarget::capability() , 以及 eve::procgen_editing::ISplinePathDocumentEditTarget::editingCapabilityId().
◆ settings()
|
inlinenoexcept |
Return current interpolation and closure settings.
在文件 SplinePathDocument.h 第 146 行定义.
被这些函数引用 eve::procgen_editing::SplinePathGizmoBuilder::build(), loadSnapshot() , 以及 makeSetSettings().
◆ snapshotValue()
| EditorValue eve::procgen_editing::SplinePathDocument::snapshotValue | ( | ) | const |
Capture schema eve.procgen.splinePath version one.
在文件 SplinePathDocument.cpp 第 555 行定义.
引用了 eve::procgen_editing::SplinePathSettings::closed, eve::procgen_editing::SplinePathSettings::kind, point , 以及 points().
被这些函数引用 makeAppendChunk(), makeDeleteChunk(), makeFlipDirection(), makeInsertPointAt(), makeMirrorAxis() , 以及 makeSnapAll().
◆ targetId()
|
inlineoverridevirtual |
该类的文档由以下文件生成:
- src/modules/procgen/editing/SplinePathDocument.h
- src/modules/procgen/editing/SplinePathDocument.cpp
Public 成员函数 继承自