载入中...
搜索中...
未找到
eve::voxel_editor::VoxelCatalogEditor类 参考

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]

eve::voxel_editor::VoxelCatalogEditor::VoxelCatalogEditor ( std::string  targetId)
explicit

Construct a seeded solid cube and a sculpted bed.

在文件 VoxelCatalogEditor.cpp 第 19 行定义.

◆ VoxelCatalogEditor() [2/2]

eve::voxel_editor::VoxelCatalogEditor::VoxelCatalogEditor ( const VoxelCatalogEditor &  )
delete

成员函数说明

◆ canRedo()

bool eve::voxel_editor::VoxelCatalogEditor::canRedo ( ) const
inlinenoexcept

Can redo.

在文件 VoxelCatalogEditor.h 第 88 行定义.

◆ canUndo()

bool eve::voxel_editor::VoxelCatalogEditor::canUndo ( ) const
inlinenoexcept

Can undo.

在文件 VoxelCatalogEditor.h 第 86 行定义.

◆ configureWorkspace()

voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::configureWorkspace ( editor::EditorWorkspace &  workspace) const

◆ createModel()

voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::createModel ( std::string  id,
std::string  name,
int  sizeX,
int  sizeY,
int  sizeZ 
)

◆ deleteSelectedModel()

voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::deleteSelectedModel ( )

◆ isModelSelected()

bool eve::voxel_editor::VoxelCatalogEditor::isModelSelected ( int  index) const

True when model selected.

在文件 VoxelCatalogEditor.cpp 第 383 行定义.

引用了 index, modelCount() , 以及 modelId().

◆ joinPartnerCount()

int eve::voxel_editor::VoxelCatalogEditor::joinPartnerCount ( ) const
inline

Join partner count.

在文件 VoxelCatalogEditor.h 第 146 行定义.

被这些函数引用 joinPartnerId().

◆ joinPartnerId()

std::string eve::voxel_editor::VoxelCatalogEditor::joinPartnerId ( int  index) const

Join partner id.

在文件 VoxelCatalogEditor.cpp 第 457 行定义.

引用了 index, joinPartnerCount() , 以及 value.

◆ modelCount()

int eve::voxel_editor::VoxelCatalogEditor::modelCount ( ) const
inline

Model count.

在文件 VoxelCatalogEditor.h 第 105 行定义.

被这些函数引用 isModelSelected(), modelFill(), modelId() , 以及 modelName().

◆ modelFill()

std::string eve::voxel_editor::VoxelCatalogEditor::modelFill ( int  index) const

◆ 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

Model size x.

在文件 VoxelCatalogEditor.cpp 第 410 行定义.

引用了 model.

◆ modelSizeY()

int eve::voxel_editor::VoxelCatalogEditor::modelSizeY ( ) const

Model size y.

在文件 VoxelCatalogEditor.cpp 第 415 行定义.

引用了 model.

◆ modelSizeZ()

int eve::voxel_editor::VoxelCatalogEditor::modelSizeZ ( ) const

Model size z.

在文件 VoxelCatalogEditor.cpp 第 420 行定义.

引用了 model.

◆ operator=()

VoxelCatalogEditor & eve::voxel_editor::VoxelCatalogEditor::operator= ( const VoxelCatalogEditor &  )
delete

◆ orbit()

voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::orbit ( float  yawDelta,
float  pitchDelta 
)

在文件 VoxelCatalogEditor.cpp 第 233 行定义.

◆ orbitPitch()

float eve::voxel_editor::VoxelCatalogEditor::orbitPitch ( ) const
inlinenoexcept

Orbit pitch.

在文件 VoxelCatalogEditor.h 第 102 行定义.

◆ orbitYaw()

float eve::voxel_editor::VoxelCatalogEditor::orbitYaw ( ) const
inlinenoexcept

Orbit yaw.

在文件 VoxelCatalogEditor.h 第 100 行定义.

◆ pointerDown()

voxel_editing::Result< void > eve::voxel_editor::VoxelCatalogEditor::pointerDown ( float  x,
float  y 
)

在文件 VoxelCatalogEditor.cpp 第 272 行定义.

引用了 cx, cy, model, nx, ny, ox, oy, eve::voxel_editing::pickVoxelModel(), scale, x , 以及 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.

参数
oxRay origin X in model space.
oyRay origin Y in model space.
ozRay origin Z in model space.
dxRay direction X.
dyRay direction Y.
dzRay direction Z.

在文件 VoxelCatalogEditor.cpp 第 260 行定义.

引用了 dx, dy, dz, model, ox, oy , 以及 eve::voxel_editing::pickVoxelModel().

◆ previewRevision()

std::uint64_t eve::voxel_editor::VoxelCatalogEditor::previewRevision ( ) const
inlinenoexcept

Preview revision.

在文件 VoxelCatalogEditor.h 第 92 行定义.

◆ redo()

voxel_editing::Result< editor::TransactionReceipt > eve::voxel_editor::VoxelCatalogEditor::redo ( )

◆ revision()

std::uint64_t eve::voxel_editor::VoxelCatalogEditor::revision ( ) const
inlinenoexcept

Revision.

在文件 VoxelCatalogEditor.h 第 90 行定义.

◆ screenVoxelCount()

int eve::voxel_editor::VoxelCatalogEditor::screenVoxelCount ( ) const
inline

Screen voxel count.

在文件 VoxelCatalogEditor.h 第 131 行定义.

被这些函数引用 screenVoxelH(), screenVoxelW(), screenVoxelX() , 以及 screenVoxelY().

◆ screenVoxelH()

float eve::voxel_editor::VoxelCatalogEditor::screenVoxelH ( int  index) const

Screen voxel h.

在文件 VoxelCatalogEditor.cpp 第 440 行定义.

引用了 h, index , 以及 screenVoxelCount().

◆ screenVoxelW()

float eve::voxel_editor::VoxelCatalogEditor::screenVoxelW ( int  index) const

Screen voxel w.

在文件 VoxelCatalogEditor.cpp 第 435 行定义.

引用了 index, screenVoxelCount() , 以及 w.

◆ screenVoxelX()

float eve::voxel_editor::VoxelCatalogEditor::screenVoxelX ( int  index) const

Screen voxel x.

在文件 VoxelCatalogEditor.cpp 第 425 行定义.

引用了 index, screenVoxelCount() , 以及 x.

◆ screenVoxelY()

float eve::voxel_editor::VoxelCatalogEditor::screenVoxelY ( int  index) const

Screen voxel y.

在文件 VoxelCatalogEditor.cpp 第 430 行定义.

引用了 index, screenVoxelCount() , 以及 y.

◆ selectedFace()

int eve::voxel_editor::VoxelCatalogEditor::selectedFace ( ) const
inlinenoexcept

Selected face.

在文件 VoxelCatalogEditor.h 第 98 行定义.

◆ selectedId()

std::string eve::voxel_editor::VoxelCatalogEditor::selectedId ( ) const
inline

Selected id.

在文件 VoxelCatalogEditor.h 第 94 行定义.

◆ selectedSocketKind()

std::string eve::voxel_editor::VoxelCatalogEditor::selectedSocketKind ( ) const

Selected socket kind.

在文件 VoxelCatalogEditor.cpp 第 451 行定义.

引用了 model , 以及 eve::voxel_editing::voxelSocketKindName().

◆ selectedSocketTag()

std::string eve::voxel_editor::VoxelCatalogEditor::selectedSocketTag ( ) const

Selected socket tag.

在文件 VoxelCatalogEditor.cpp 第 445 行定义.

引用了 model , 以及 tag.

◆ 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 行定义.

引用了 height , 以及 width.

◆ 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()

const voxel_editing::VoxelCatalogTarget & eve::voxel_editor::VoxelCatalogEditor::target ( ) const
inlinenoexcept

Target.

在文件 VoxelCatalogEditor.h 第 44 行定义.

◆ toolName()

std::string eve::voxel_editor::VoxelCatalogEditor::toolName ( ) const

Tool name.

在文件 VoxelCatalogEditor.cpp 第 127 行定义.

引用了 eve::voxel_editor::Erase.

◆ undo()

voxel_editing::Result< editor::TransactionReceipt > eve::voxel_editor::VoxelCatalogEditor::undo ( )

◆ voxelCount()

int eve::voxel_editor::VoxelCatalogEditor::voxelCount ( ) const

Voxel count.

在文件 VoxelCatalogEditor.cpp 第 387 行定义.

引用了 model.

◆ voxelX()

int eve::voxel_editor::VoxelCatalogEditor::voxelX ( int  index) const

Voxel x.

在文件 VoxelCatalogEditor.cpp 第 392 行定义.

引用了 index, model , 以及 x.

◆ voxelY()

int eve::voxel_editor::VoxelCatalogEditor::voxelY ( int  index) const

Voxel y.

在文件 VoxelCatalogEditor.cpp 第 398 行定义.

引用了 index, model , 以及 y.

◆ voxelZ()

int eve::voxel_editor::VoxelCatalogEditor::voxelZ ( int  index) const

Voxel z.

在文件 VoxelCatalogEditor.cpp 第 404 行定义.

引用了 index, model , 以及 z.


该类的文档由以下文件生成: