载入中...
搜索中...
未找到
eve::editor::MaterialStudioController类 参考

UI-neutral controller for coalesced material edits and revision-safe live previews. 更多...

#include <EditorMaterialStudio.h>

Public 成员函数

 MaterialStudioController (DocumentId document, MaterialPublishingTarget &target, IEditorTransactionBackend &transactions, MaterialPreviewService &previews, IMaterialPreviewRenderer &renderer)
 Material studio controller.
 
Result< void > setPreviewSettings (MaterialPreviewSettings settings)
 Replace preview geometry, camera, resolution, and environment settings.
 
Result< void > beginInteraction (PropertyPath path)
 Start one coalesced property gesture from the current live document revision.
 
Result< void > updateInteraction (EditorValue value)
 Update the owned draft and mark its isolated preview dirty.
 
Result< TransactionReceipt > commitInteraction ()
 Atomically publish the final draft value as one undoable transaction.
 
Result< void > cancelInteraction ()
 Abandon the draft without changing the live material.
 
Result< void > tick (std::uint64_t monotonicMilliseconds)
 Render a dirty preview when the injected monotonic time reaches the rate limit.
 
Result< void > refreshPreview ()
 Force an isolated preview of the current draft or live document.
 
Result< void > setPreviewRate (double framesPerSecond)
 Set the maximum preview rate; valid range is 1 to 240 Hz.
 
MaterialStudioState state () const
 Return an owning snapshot suitable for any developer or in-game UI host.
 

详细描述

UI-neutral controller for coalesced material edits and revision-safe live previews.

A host begins an interaction when a slider, color control, or asset picker becomes active, sends every intermediate value to updateInteraction(), and calls commitInteraction() once. Intermediate values are applied only to an owned draft and may be previewed at a bounded rate; the live material changes atomically once, so one gesture produces one undo record.

@ownership The target, transaction backend, preview service, and renderer are borrowed and must outlive this controller. The draft and all presentation state are owned by this controller. @threadaffinity Owner thread only; preview rendering and transaction callbacks are synchronous. @reentrancy Do not call this controller again from renderer or transaction callbacks.

在文件 EditorMaterialStudio.h 第 40 行定义.

构造及析构函数说明

◆ MaterialStudioController()

eve::editor::MaterialStudioController::MaterialStudioController ( DocumentId  document,
MaterialPublishingTarget &  target,
IEditorTransactionBackend &  transactions,
MaterialPreviewService &  previews,
IMaterialPreviewRenderer &  renderer 
)

Material studio controller.

在文件 EditorMaterialStudio.cpp 第 15 行定义.

成员函数说明

◆ beginInteraction()

Result< void > eve::editor::MaterialStudioController::beginInteraction ( PropertyPath  path)

◆ cancelInteraction()

Result< void > eve::editor::MaterialStudioController::cancelInteraction ( )

Abandon the draft without changing the live material.

在文件 EditorMaterialStudio.cpp 第 104 行定义.

引用了 eve::material_editing::MaterialPublishingTarget::authoringTarget() , 以及 eve::material_editing::MaterialDocumentTarget::validate().

◆ commitInteraction()

◆ refreshPreview()

Result< void > eve::editor::MaterialStudioController::refreshPreview ( )

Force an isolated preview of the current draft or live document.

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

引用了 eve::material_editing::MaterialPublishingTarget::authoringTarget().

被这些函数引用 tick().

◆ setPreviewRate()

Result< void > eve::editor::MaterialStudioController::setPreviewRate ( double  framesPerSecond)

Set the maximum preview rate; valid range is 1 to 240 Hz.

在文件 EditorMaterialStudio.cpp 第 131 行定义.

◆ setPreviewSettings()

Result< void > eve::editor::MaterialStudioController::setPreviewSettings ( MaterialPreviewSettings  settings)

Replace preview geometry, camera, resolution, and environment settings.

在文件 EditorMaterialStudio.cpp 第 24 行定义.

引用了 settings.

◆ state()

◆ tick()

Result< void > eve::editor::MaterialStudioController::tick ( std::uint64_t  monotonicMilliseconds)

Render a dirty preview when the injected monotonic time reaches the rate limit.

参数
monotonicMillisecondsHost-provided monotonic time; wall-clock time is not read.
返回
Applied when rendered, NoOp when clean or rate-limited, otherwise a diagnostic.

在文件 EditorMaterialStudio.cpp 第 112 行定义.

引用了 refreshPreview().

◆ updateInteraction()

Result< void > eve::editor::MaterialStudioController::updateInteraction ( EditorValue  value)

Update the owned draft and mark its isolated preview dirty.

在文件 EditorMaterialStudio.cpp 第 46 行定义.

引用了 eve::Result< T >::failure(), operation , 以及 value.


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