Revisioned project of MagicaVoxel-style sculpted models. 更多...
#include <VoxelCatalog.h>
Public 成员函数 | |
| VoxelCatalogTarget (std::string id) | |
| Voxel catalog target. | |
| TargetId | targetId () const override |
| Target id. | |
| TargetDescriptor | describe () const override |
| Describe. | |
| void * | queryCapability (const CapabilityId &) override |
| Query Inspector property and snapshot capabilities. | |
| Result< void > | applyDomainOperation (const DomainOperation &) override |
| Applies domain operation. | |
| std::unique_ptr< IDomainOperationTarget > | cloneDomainState () const override |
| Clones domain state. | |
| Result< void > | commitDomainState (std::unique_ptr< IDomainOperationTarget >) override |
| Commits domain state. | |
| eve::Result< eve::Revision > | currentRevision (const SelectionSnapshot &) const override |
| Current revision. | |
| PropertySchema | schema (const SelectionSnapshot &) const override |
| Schema. | |
| PropertyReadResult | read (const SelectionSnapshot &, const PropertyPath &) const override |
| Reads . | |
| Result< DomainOperation > | makeSet (const SelectionSnapshot &, const PropertyPath &, const EditorValue &, PropertySetMode) const override |
| Make set. | |
| Result< DomainOperation > | makeReset (const SelectionSnapshot &, const PropertyPath &) const override |
| Make reset. | |
| Result< DomainOperation > | makeCreateModel (const VoxelModelValue &) const |
| Make create model. | |
| Result< DomainOperation > | makeDeleteModel (const ObjectId &) const |
| Make delete model. | |
| Result< DomainOperation > | makeSetVoxel (const ObjectId &model, int x, int y, int z, bool occupied) const |
| Make set voxel. | |
| const std::vector< VoxelModelValue > & | models () const |
| Models. | |
| const VoxelModelValue * | findModel (const ObjectId &) const |
| Look up a sculpted model by stable id. | |
| std::vector< EditorDiagnostic > | validate () const |
| Validate. | |
| EditorValue | snapshotValue () const override |
| Snapshot value. | |
| Result< void > | loadSnapshot (const EditorValue &) |
| Loads snapshot. | |
| std::vector< ObjectId > | hullJoinPartners (const ObjectId &model, int face) const |
| Hull join partners. | |
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::IPropertyProvider | |
| virtual | ~IPropertyProvider ()=default |
| Releases IPropertyProvider resources. | |
Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| virtual | ~IEditingSnapshotProvider ()=default |
| Releases IEditingSnapshotProvider resources. | |
静态 Public 成员函数 | |
| static CapabilityId | propertyCapabilityId () |
| Property capability id. | |
静态 Public 成员函数 继承自 eve::editing::IPropertyProvider | |
| static CapabilityId | editingCapabilityId () |
| Stable capability identity for generic property editing. | |
静态 Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| static CapabilityId | editingCapabilityId () |
| Stable capability identity shared by every editable domain target. | |
额外继承的成员函数 | |
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. | |
详细描述
Revisioned project of MagicaVoxel-style sculpted models.
在文件 VoxelCatalog.h 第 132 行定义.
构造及析构函数说明
◆ VoxelCatalogTarget()
|
explicit |
Voxel catalog target.
在文件 VoxelCatalog.cpp 第 309 行定义.
成员函数说明
◆ applyDomainOperation()
|
overridevirtual |
Applies domain operation.
实现了 eve::editing::IDomainOperationTarget.
在文件 VoxelCatalog.cpp 第 542 行定义.
引用了 eve::editing::EditableTargetState::bumpRevision(), c, eve::editing::Value::isWithinLimits(), models(), eve::editing::DomainOperation::payload, eve::editing::DomainOperation::target, eve::editing::DomainOperation::type, v , 以及 eve::editing::EditableTargetState::widenDirty().
被这些函数引用 loadSnapshot().
◆ cloneDomainState()
|
overridevirtual |
Clones domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 VoxelCatalog.cpp 第 568 行定义.
◆ commitDomainState()
|
overridevirtual |
Commits domain state.
实现了 eve::editing::IDomainOperationTargetStaging.
在文件 VoxelCatalog.cpp 第 572 行定义.
◆ currentRevision()
|
overridevirtual |
Current revision.
重载 eve::editing::IPropertyProvider .
在文件 VoxelCatalog.cpp 第 342 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::editing::EditableTargetState::revisionValue(), s , 以及 eve::Result< T >::success().
◆ describe()
|
overridevirtual |
◆ findModel()
| const VoxelModelValue * eve::voxel_editing::VoxelCatalogTarget::findModel | ( | const ObjectId & | id | ) | const |
Look up a sculpted model by stable id.
- 返回
- Borrowed model owned by this catalog, or null when absent. @ownership Borrowed from this target; callers must not delete it. @lifetime Valid until the next mutation or this target is destroyed. @thread Owner-thread only.
在文件 VoxelCatalog.cpp 第 325 行定义.
引用了 v.
被这些函数引用 hullJoinPartners(), makeCreateModel(), makeDeleteModel(), makeSetVoxel(), read() , 以及 eve::voxel_editor::VoxelCatalogEditor::selectModel().
◆ hullJoinPartners()
| std::vector< ObjectId > eve::voxel_editing::VoxelCatalogTarget::hullJoinPartners | ( | const ObjectId & | model, |
| int | face | ||
| ) | const |
Hull join partners.
在文件 VoxelCatalog.cpp 第 600 行定义.
引用了 eve::voxel_editing::canJoinVoxelSockets(), findModel(), model , 以及 eve::voxel_editing::voxelOppositeFace().
◆ loadSnapshot()
| Result< void > eve::voxel_editing::VoxelCatalogTarget::loadSnapshot | ( | const EditorValue & | s | ) |
◆ makeCreateModel()
| Result< DomainOperation > eve::voxel_editing::VoxelCatalogTarget::makeCreateModel | ( | const VoxelModelValue & | v | ) | const |
Make create model.
在文件 VoxelCatalog.cpp 第 461 行定义.
引用了 c, findModel(), v , 以及 x.
被这些函数引用 eve::voxel_editor::VoxelCatalogEditor::createModel().
◆ makeDeleteModel()
| Result< DomainOperation > eve::voxel_editing::VoxelCatalogTarget::makeDeleteModel | ( | const ObjectId & | id | ) | const |
Make delete model.
在文件 VoxelCatalog.cpp 第 474 行定义.
引用了 c, findModel() , 以及 v.
被这些函数引用 eve::voxel_editor::VoxelCatalogEditor::deleteSelectedModel().
◆ makeReset()
|
overridevirtual |
Make reset.
实现了 eve::editing::IPropertyProvider.
在文件 VoxelCatalog.cpp 第 453 行定义.
引用了 d, eve::editing::PropertySchema::find(), makeSet(), p, s , 以及 schema().
被这些函数引用 makeSet().
◆ makeSet()
|
overridevirtual |
Make set.
实现了 eve::editing::IPropertyProvider.
在文件 VoxelCatalog.cpp 第 406 行定义.
引用了 c, kind, makeReset(), model, name, p, s, schema(), tag, value, eve::voxel_editing::voxelSocketKindFromName() , 以及 eve::voxel_editing::voxelSocketKindName().
被这些函数引用 makeReset() , 以及 eve::voxel_editor::VoxelCatalogEditor::setSelectedSocket().
◆ makeSetVoxel()
| Result< DomainOperation > eve::voxel_editing::VoxelCatalogTarget::makeSetVoxel | ( | const ObjectId & | model, |
| int | x, | ||
| int | y, | ||
| int | z, | ||
| bool | occupied | ||
| ) | const |
◆ models()
|
inline |
◆ propertyCapabilityId()
|
inlinestatic |
◆ queryCapability()
|
overridevirtual |
Query Inspector property and snapshot capabilities.
- 返回
- Borrowed pointer owned by this target, or null when unsupported. @lifetime Valid until this target is destroyed or replaced by commitDomainState. @thread Owner-thread only.
重载 eve::editing::IEditableTarget .
在文件 VoxelCatalog.cpp 第 319 行定义.
引用了 c, eve::editing::IEditingSnapshotProvider::editingCapabilityId() , 以及 propertyCapabilityId().
◆ read()
|
overridevirtual |
Reads .
实现了 eve::editing::IPropertyProvider.
在文件 VoxelCatalog.cpp 第 362 行定义.
引用了 findModel(), model, p, s, schema(), value , 以及 eve::voxel_editing::voxelSocketKindName().
◆ schema()
|
overridevirtual |
Schema.
实现了 eve::editing::IPropertyProvider.
在文件 VoxelCatalog.cpp 第 350 行定义.
引用了 eve::editing::PropertySchema::properties, schema() , 以及 eve::editing::PropertySchema::typeId.
被这些函数引用 makeReset(), makeSet(), read() , 以及 schema().
◆ snapshotValue()
|
overridevirtual |
◆ targetId()
|
inlineoverridevirtual |
◆ validate()
| std::vector< EditorDiagnostic > eve::voxel_editing::VoxelCatalogTarget::validate | ( | ) | const |
Validate.
在文件 VoxelCatalog.cpp 第 506 行定义.
引用了 eve::Conflict, d, ids, eve::InvalidArgument, eve::voxel_editing::kVoxelModelMaxOccupied, model, eve::PreconditionViolation, eve::editing::ruleDiagnostic() , 以及 v.
该类的文档由以下文件生成:
- src/modules/voxel/editing/VoxelCatalog.h
- src/modules/voxel/editing/VoxelCatalog.cpp
Public 成员函数 继承自