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

EditorSession tool that turns one curve-handle drag into one authority transaction. 更多...

#include <EditorBuildingTarget.h>

类 eve::editor::BuildingEdgeCurveTool 继承关系图:
eve::editor::IEditorTool

Public 成员函数

 BuildingEdgeCurveTool (IBuildingViewportAdapter *viewport, editing::IEditAuthority *authority)
 Building edge curve tool.
 
const ToolDescriptor & descriptor () const override
 Descriptor.
 
void setViewportAdapter (IBuildingViewportAdapter *viewport)
 Replace the host viewport adapter and cancel any active gesture.
 
void setAuthority (editing::IEditAuthority *authority)
 Replace the transaction authority and cancel any active gesture.
 
editing::Result< void > setSelection (BuildingEdgeCurveToolSelection selection)
 Select one authoritative curve group member for handle editing.
 
void clearSelection ()
 Clear selection and any uncommitted gesture.
 
ToolResponse pointerEvent (EditorContext &context, const EditorPointerEvent &event) override
 Pointer event.
 
void deactivate (EditorContext &context) override
 Deactivate.
 
void cancel (EditorContext &context) override
 Cancel.
 
void drawOverlay (EditorContext &context, IEditorOverlay &overlay) override
 Draws overlay.
 
bool isDragging () const
 Whether a handle currently owns pointer-drag state.
 
const std::optional< building_editing::BuildingEdgeCurveDragPreview > & preview () const
 Last valid transient preview.
 
const std::optional< editing::TransactionReceipt > & lastReceipt () const
 Last committed authority receipt.
 
editing::Status lastStatus () const
 Status of the latest tool operation.
 
const std::vector< editing::Diagnostic > & diagnostics () const
 Diagnostics from the latest preview, adapter or authority operation.
 
- Public 成员函数 继承自 eve::editor::IEditorTool
virtual ~IEditorTool ()=default
 Releases IEditorTool resources.
 
virtual void activate (EditorContext &context)
 Called exactly once when this tool becomes active.
 
virtual ToolResponse keyEvent (EditorContext &context, const EditorKeyEvent &event)
 Handle normalized keyboard input.
 
virtual void update (EditorContext &context, float dt)
 Per-frame hook for an active tool.
 
virtual void inspect (EditorContext &context, IEditorInspector &inspector)
 Expose configurable settings through a host-provided inspector.
 

详细描述

EditorSession tool that turns one curve-handle drag into one authority transaction.

@ownership Borrows viewport and authority; both must outlive the tool or be explicitly cleared. The selected BuildingPlacementTarget is borrowed only during EditorSession callbacks. Preview state is tool-owned and never mutates the target until pointer-up authority commit succeeds. @thread Editor/viewport thread only.

在文件 EditorBuildingTarget.h 第 60 行定义.

构造及析构函数说明

◆ BuildingEdgeCurveTool()

eve::editor::BuildingEdgeCurveTool::BuildingEdgeCurveTool ( IBuildingViewportAdapter *  viewport,
editing::IEditAuthority *  authority 
)

Building edge curve tool.

在文件 BuildingEdgeCurveTool.cpp 第 30 行定义.

成员函数说明

◆ cancel()

void eve::editor::BuildingEdgeCurveTool::cancel ( EditorContext &  context)
overridevirtual

Cancel.

重载 eve::editor::IEditorTool .

在文件 BuildingEdgeCurveTool.cpp 第 214 行定义.

被这些函数引用 deactivate() , 以及 pointerEvent().

◆ clearSelection()

void eve::editor::BuildingEdgeCurveTool::clearSelection ( )

Clear selection and any uncommitted gesture.

在文件 BuildingEdgeCurveTool.cpp 第 65 行定义.

◆ deactivate()

void eve::editor::BuildingEdgeCurveTool::deactivate ( EditorContext &  context)
overridevirtual

Deactivate.

重载 eve::editor::IEditorTool .

在文件 BuildingEdgeCurveTool.cpp 第 212 行定义.

引用了 cancel() , 以及 context.

◆ descriptor()

const ToolDescriptor & eve::editor::BuildingEdgeCurveTool::descriptor ( ) const
inlineoverridevirtual

Descriptor.

实现了 eve::editor::IEditorTool.

在文件 EditorBuildingTarget.h 第 67 行定义.

◆ diagnostics()

const std::vector< editing::Diagnostic > & eve::editor::BuildingEdgeCurveTool::diagnostics ( ) const
inline

Diagnostics from the latest preview, adapter or authority operation.

返回
Tool-owned diagnostics.

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

◆ drawOverlay()

void eve::editor::BuildingEdgeCurveTool::drawOverlay ( EditorContext &  context,
IEditorOverlay &  overlay 
)
overridevirtual

◆ isDragging()

bool eve::editor::BuildingEdgeCurveTool::isDragging ( ) const

Whether a handle currently owns pointer-drag state.

返回
True only between accepted down and release/cancel.

在文件 BuildingEdgeCurveTool.cpp 第 74 行定义.

被这些函数引用 pointerEvent() , 以及 setSelection().

◆ lastReceipt()

const std::optional< editing::TransactionReceipt > & eve::editor::BuildingEdgeCurveTool::lastReceipt ( ) const
inline

Last committed authority receipt.

返回
Tool-owned receipt, when a commit succeeded.

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

◆ lastStatus()

editing::Status eve::editor::BuildingEdgeCurveTool::lastStatus ( ) const
inline

Status of the latest tool operation.

返回
Structured editing status.

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

◆ pointerEvent()

◆ preview()

const std::optional< building_editing::BuildingEdgeCurveDragPreview > & eve::editor::BuildingEdgeCurveTool::preview ( ) const
inline

Last valid transient preview.

返回
Tool-owned preview, when available.

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

◆ setAuthority()

void eve::editor::BuildingEdgeCurveTool::setAuthority ( editing::IEditAuthority *  authority)

Replace the transaction authority and cancel any active gesture.

参数
authorityBorrowed authority, or null to detach.

在文件 BuildingEdgeCurveTool.cpp 第 40 行定义.

◆ setSelection()

editing::Result< void > eve::editor::BuildingEdgeCurveTool::setSelection ( BuildingEdgeCurveToolSelection  selection)

Select one authoritative curve group member for handle editing.

参数
selectionOwning edit configuration.
返回
Applied or a structured validation failure.

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

引用了 eve::editor::BuildingEdgeCurveToolSelection::buildingId, eve::editor::BuildingEdgeCurveToolSelection::controlPoints, isDragging(), eve::editor::BuildingEdgeCurveToolSelection::memberInstanceId , 以及 eve::editor::BuildingEdgeCurveToolSelection::subdivisions.

◆ setViewportAdapter()

void eve::editor::BuildingEdgeCurveTool::setViewportAdapter ( IBuildingViewportAdapter *  viewport)

Replace the host viewport adapter and cancel any active gesture.

参数
viewportBorrowed adapter, or null to detach.

在文件 BuildingEdgeCurveTool.cpp 第 34 行定义.


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