Workspace controller for a MagicaVoxel-style voxel sculpt project. 更多...
#include <VoxelCatalogEditor.h>
Public 成员函数 | |
| VoxelCatalogEditor (std::string targetId) | |
| Construct a seeded solid cube and a sculpted bed. | |
| VoxelCatalogEditor (const VoxelCatalogEditor &)=delete | |
| VoxelCatalogEditor & | operator= (const VoxelCatalogEditor &)=delete |
| const voxel_editing::VoxelCatalogTarget & | target () const noexcept |
| Target. | |
| voxel_editing::Result< void > | configureWorkspace (editor::EditorWorkspace &workspace) const |
| Install Models / Viewport / Tools / Inspector panels. | |
| voxel_editing::Result< void > | selectModel (std::string id) |
| voxel_editing::Result< void > | setTool (std::string tool) |
| voxel_editing::Result< void > | setViewport (float width, float height) |
| voxel_editing::Result< void > | orbit (float yawDelta, float pitchDelta) |
| voxel_editing::Result< void > | pointerDown (float x, float y) |
| voxel_editing::Result< void > | pointerWorldRay (float ox, float oy, float oz, float dx, float dy, float dz) |
| MagicaVoxel attach/erase using a world-space camera ray. | |
| voxel_editing::Result< void > | setVoxel (int x, int y, int z, bool occupied) |
| Sets the voxel. | |
| voxel_editing::Result< void > | setSelectedSocket (std::string tag, std::string kind) |
| Sets the selected socket. | |
| voxel_editing::Result< void > | selectFace (int face) |
| Select face. | |
| voxel_editing::Result< void > | createModel (std::string id, std::string name, int sizeX, int sizeY, int sizeZ) |
| Creates model. | |
| voxel_editing::Result< void > | deleteSelectedModel () |
| Delete selected model. | |
| voxel_editing::Result< editor::TransactionReceipt > | undo () |
| Undo. | |
| voxel_editing::Result< editor::TransactionReceipt > | redo () |
| Redo. | |
| bool | canUndo () const noexcept |
| Can undo. | |
| bool | canRedo () const noexcept |
| Can redo. | |
| std::uint64_t | revision () const noexcept |
| Revision. | |
| std::uint64_t | previewRevision () const noexcept |
| Preview revision. | |
| std::string | selectedId () const |
| Selected id. | |
| std::string | toolName () const |
| Tool name. | |
| int | selectedFace () const noexcept |
| Selected face. | |
| float | orbitYaw () const noexcept |
| Orbit yaw. | |
| float | orbitPitch () const noexcept |
| Orbit pitch. | |
| int | modelCount () const |
| Model count. | |
| std::string | modelId (int index) const |
| Model id. | |
| std::string | modelName (int index) const |
| Model name. | |
| std::string | modelFill (int index) const |
| Model fill. | |
| bool | isModelSelected (int index) const |
| True when model selected. | |
| int | voxelCount () const |
| Voxel count. | |
| int | voxelX (int index) const |
| Voxel x. | |
| int | voxelY (int index) const |
| Voxel y. | |
| int | voxelZ (int index) const |
| Voxel z. | |
| int | modelSizeX () const |
| Model size x. | |
| int | modelSizeY () const |
| Model size y. | |
| int | modelSizeZ () const |
| Model size z. | |
| int | screenVoxelCount () const |
| Screen voxel count. | |
| float | screenVoxelX (int index) const |
| Screen voxel x. | |
| float | screenVoxelY (int index) const |
| Screen voxel y. | |
| float | screenVoxelW (int index) const |
| Screen voxel w. | |
| float | screenVoxelH (int index) const |
| Screen voxel h. | |
| std::string | selectedSocketTag () const |
| Selected socket tag. | |
| std::string | selectedSocketKind () const |
| Selected socket kind. | |
| int | joinPartnerCount () const |
| Join partner count. | |
| std::string | joinPartnerId (int index) const |
| Join partner id. | |
详细描述
Workspace controller for a MagicaVoxel-style voxel sculpt project.
Owns the catalog of bounded occupancy models, local undo, and sculpt tools. The presenter renders with eve.Voxel() and picks with a camera ray.
@ownership Editor owns the document. Screen getters copy values. @threadaffinity Owner thread only. @reentrancy No unknown callbacks.
在文件 VoxelCatalogEditor.h 第 35 行定义.
构造及析构函数说明
◆ VoxelCatalogEditor() [1/2]
|
explicit |
Construct a seeded solid cube and a sculpted bed.
在文件 VoxelCatalogEditor.cpp 第 19 行定义.
◆ VoxelCatalogEditor() [2/2]
|
delete |
成员函数说明
◆ canRedo()
|
inlinenoexcept |
Can redo.
在文件 VoxelCatalogEditor.h 第 88 行定义.
◆ canUndo()
|
inlinenoexcept |
Can undo.
在文件 VoxelCatalogEditor.h 第 86 行定义.
◆ configureWorkspace()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::configureWorkspace | ( | editor::EditorWorkspace & | workspace | ) | const |
Install Models / Viewport / Tools / Inspector panels.
- 注解
- Does not retain
workspace.
在文件 VoxelCatalogEditor.cpp 第 69 行定义.
引用了 eve::editor::EditorWorkspace::activatePanel(), context, id, order, eve::editor::EditorWorkspace::registerPanel(), eve::editor::EditorWorkspace::setPanelCapability(), eve::editor::EditorWorkspace::setPanelContext() , 以及 title.
◆ createModel()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::createModel | ( | std::string | id, |
| std::string | name, | ||
| int | sizeX, | ||
| int | sizeY, | ||
| int | sizeZ | ||
| ) |
Creates model.
在文件 VoxelCatalogEditor.cpp 第 326 行定义.
引用了 created, eve::voxel_editing::VoxelModelValue::id, eve::voxel_editing::VoxelCatalogTarget::makeCreateModel(), model, name , 以及 selectModel().
◆ deleteSelectedModel()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::deleteSelectedModel | ( | ) |
Delete selected model.
在文件 VoxelCatalogEditor.cpp 第 339 行定义.
引用了 eve::voxel_editing::VoxelCatalogTarget::makeDeleteModel(), model, eve::voxel_editing::VoxelCatalogTarget::models() , 以及 selectModel().
◆ isModelSelected()
| bool eve::voxel_editor::VoxelCatalogEditor::isModelSelected | ( | int | index | ) | const |
True when model selected.
在文件 VoxelCatalogEditor.cpp 第 383 行定义.
引用了 index, modelCount() , 以及 modelId().
◆ joinPartnerCount()
|
inline |
◆ joinPartnerId()
| std::string eve::voxel_editor::VoxelCatalogEditor::joinPartnerId | ( | int | index | ) | const |
◆ modelCount()
|
inline |
Model count.
在文件 VoxelCatalogEditor.h 第 105 行定义.
被这些函数引用 isModelSelected(), modelFill(), modelId() , 以及 modelName().
◆ modelFill()
| std::string eve::voxel_editor::VoxelCatalogEditor::modelFill | ( | int | index | ) | const |
Model fill.
在文件 VoxelCatalogEditor.cpp 第 378 行定义.
引用了 index, modelCount(), eve::voxel_editing::VoxelCatalogTarget::models() , 以及 eve::voxel_editing::voxelClassifyModelFill().
◆ modelId()
| std::string eve::voxel_editor::VoxelCatalogEditor::modelId | ( | int | index | ) | const |
Model id.
在文件 VoxelCatalogEditor.cpp 第 368 行定义.
引用了 index, modelCount(), eve::voxel_editing::VoxelCatalogTarget::models() , 以及 value.
被这些函数引用 isModelSelected().
◆ modelName()
| std::string eve::voxel_editor::VoxelCatalogEditor::modelName | ( | int | index | ) | const |
Model name.
在文件 VoxelCatalogEditor.cpp 第 373 行定义.
引用了 index, modelCount(), eve::voxel_editing::VoxelCatalogTarget::models() , 以及 name.
◆ modelSizeX()
| int eve::voxel_editor::VoxelCatalogEditor::modelSizeX | ( | ) | const |
◆ modelSizeY()
| int eve::voxel_editor::VoxelCatalogEditor::modelSizeY | ( | ) | const |
◆ modelSizeZ()
| int eve::voxel_editor::VoxelCatalogEditor::modelSizeZ | ( | ) | const |
◆ operator=()
|
delete |
◆ orbit()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::orbit | ( | float | yawDelta, |
| float | pitchDelta | ||
| ) |
在文件 VoxelCatalogEditor.cpp 第 233 行定义.
◆ orbitPitch()
|
inlinenoexcept |
Orbit pitch.
在文件 VoxelCatalogEditor.h 第 102 行定义.
◆ orbitYaw()
|
inlinenoexcept |
Orbit yaw.
在文件 VoxelCatalogEditor.h 第 100 行定义.
◆ pointerDown()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::pointerDown | ( | float | x, |
| float | y | ||
| ) |
◆ pointerWorldRay()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::pointerWorldRay | ( | float | ox, |
| float | oy, | ||
| float | oz, | ||
| float | dx, | ||
| float | dy, | ||
| float | dz | ||
| ) |
MagicaVoxel attach/erase using a world-space camera ray.
- 参数
-
ox Ray origin X in model space. oy Ray origin Y in model space. oz Ray origin Z in model space. dx Ray direction X. dy Ray direction Y. dz Ray direction Z.
在文件 VoxelCatalogEditor.cpp 第 260 行定义.
引用了 dx, dy, dz, model, ox, oy , 以及 eve::voxel_editing::pickVoxelModel().
◆ previewRevision()
|
inlinenoexcept |
Preview revision.
在文件 VoxelCatalogEditor.h 第 92 行定义.
◆ redo()
| voxel_editing::Result< editor::TransactionReceipt > eve::voxel_editor::VoxelCatalogEditor::redo | ( | ) |
Redo.
在文件 VoxelCatalogEditor.cpp 第 360 行定义.
引用了 eve::Result< T >::failure() , 以及 eve::editor::LocalTransactionBackend::redo().
◆ revision()
|
inlinenoexcept |
Revision.
在文件 VoxelCatalogEditor.h 第 90 行定义.
◆ screenVoxelCount()
|
inline |
Screen voxel count.
在文件 VoxelCatalogEditor.h 第 131 行定义.
被这些函数引用 screenVoxelH(), screenVoxelW(), screenVoxelX() , 以及 screenVoxelY().
◆ screenVoxelH()
| float eve::voxel_editor::VoxelCatalogEditor::screenVoxelH | ( | int | index | ) | const |
◆ screenVoxelW()
| float eve::voxel_editor::VoxelCatalogEditor::screenVoxelW | ( | int | index | ) | const |
◆ screenVoxelX()
| float eve::voxel_editor::VoxelCatalogEditor::screenVoxelX | ( | int | index | ) | const |
◆ screenVoxelY()
| float eve::voxel_editor::VoxelCatalogEditor::screenVoxelY | ( | int | index | ) | const |
◆ selectedFace()
|
inlinenoexcept |
Selected face.
在文件 VoxelCatalogEditor.h 第 98 行定义.
◆ selectedId()
|
inline |
Selected id.
在文件 VoxelCatalogEditor.h 第 94 行定义.
◆ selectedSocketKind()
| std::string eve::voxel_editor::VoxelCatalogEditor::selectedSocketKind | ( | ) | const |
Selected socket kind.
在文件 VoxelCatalogEditor.cpp 第 451 行定义.
◆ selectedSocketTag()
| std::string eve::voxel_editor::VoxelCatalogEditor::selectedSocketTag | ( | ) | const |
◆ selectFace()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::selectFace | ( | int | face | ) |
Select face.
在文件 VoxelCatalogEditor.cpp 第 319 行定义.
◆ selectModel()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::selectModel | ( | std::string | id | ) |
在文件 VoxelCatalogEditor.cpp 第 205 行定义.
引用了 eve::voxel_editing::VoxelCatalogTarget::findModel().
被这些函数引用 createModel() , 以及 deleteSelectedModel().
◆ setSelectedSocket()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::setSelectedSocket | ( | std::string | tag, |
| std::string | kind | ||
| ) |
Sets the selected socket.
在文件 VoxelCatalogEditor.cpp 第 305 行定义.
引用了 kind, eve::voxel_editing::VoxelCatalogTarget::makeSet() , 以及 tag.
◆ setTool()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::setTool | ( | std::string | tool | ) |
在文件 VoxelCatalogEditor.cpp 第 212 行定义.
引用了 eve::voxel_editor::Attach , 以及 eve::voxel_editor::Erase.
◆ setViewport()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::setViewport | ( | float | width, |
| float | height | ||
| ) |
在文件 VoxelCatalogEditor.cpp 第 223 行定义.
◆ setVoxel()
| voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::setVoxel | ( | int | x, |
| int | y, | ||
| int | z, | ||
| bool | occupied | ||
| ) |
Sets the voxel.
在文件 VoxelCatalogEditor.cpp 第 297 行定义.
引用了 eve::voxel_editing::VoxelCatalogTarget::makeSetVoxel(), model, occupied, x, y , 以及 z.
◆ target()
|
inlinenoexcept |
Target.
在文件 VoxelCatalogEditor.h 第 44 行定义.
◆ toolName()
| std::string eve::voxel_editor::VoxelCatalogEditor::toolName | ( | ) | const |
◆ undo()
| voxel_editing::Result< editor::TransactionReceipt > eve::voxel_editor::VoxelCatalogEditor::undo | ( | ) |
Undo.
在文件 VoxelCatalogEditor.cpp 第 352 行定义.
引用了 eve::Result< T >::failure() , 以及 eve::editor::LocalTransactionBackend::undo().
◆ voxelCount()
| int eve::voxel_editor::VoxelCatalogEditor::voxelCount | ( | ) | const |
◆ voxelX()
| int eve::voxel_editor::VoxelCatalogEditor::voxelX | ( | int | index | ) | const |
◆ voxelY()
| int eve::voxel_editor::VoxelCatalogEditor::voxelY | ( | int | index | ) | const |
◆ voxelZ()
| int eve::voxel_editor::VoxelCatalogEditor::voxelZ | ( | int | index | ) | const |
该类的文档由以下文件生成:
- src/modules/voxel/editor/VoxelCatalogEditor.h
- src/modules/voxel/editor/VoxelCatalogEditor.cpp