EditorSession tool that turns one curve-handle drag into one authority transaction. 更多...
#include <EditorBuildingTarget.h>
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()
|
overridevirtual |
◆ clearSelection()
| void eve::editor::BuildingEdgeCurveTool::clearSelection | ( | ) |
Clear selection and any uncommitted gesture.
在文件 BuildingEdgeCurveTool.cpp 第 65 行定义.
◆ deactivate()
|
overridevirtual |
Deactivate.
在文件 BuildingEdgeCurveTool.cpp 第 212 行定义.
◆ descriptor()
|
inlineoverridevirtual |
◆ diagnostics()
|
inline |
Diagnostics from the latest preview, adapter or authority operation.
- 返回
- Tool-owned diagnostics.
在文件 EditorBuildingTarget.h 第 100 行定义.
◆ drawOverlay()
|
overridevirtual |
Draws overlay.
在文件 BuildingEdgeCurveTool.cpp 第 219 行定义.
引用了 center, eve::editor::IEditorOverlay::circle(), from, eve::editor::IEditorOverlay::line(), eve::editor::IBuildingViewportAdapter::projectWorld() , 以及 to.
◆ 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()
|
inline |
Last committed authority receipt.
- 返回
- Tool-owned receipt, when a commit succeeded.
在文件 EditorBuildingTarget.h 第 94 行定义.
◆ lastStatus()
|
inline |
Status of the latest tool operation.
- 返回
- Structured editing status.
在文件 EditorBuildingTarget.h 第 98 行定义.
◆ pointerEvent()
|
overridevirtual |
Pointer event.
在文件 BuildingEdgeCurveTool.cpp 第 201 行定义.
引用了 begin, cancel(), context, eve::editor::EditorPointerEvent::Down, eve::editor::ToolResponse::ignored(), isDragging(), eve::editor::EditorPointerEvent::Move, eve::editor::EditorPointerEvent::phase, eve::editor::ToolResponse::release() , 以及 eve::editor::EditorPointerEvent::Up.
◆ preview()
|
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.
- 参数
-
authority Borrowed 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.
- 参数
-
selection Owning 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.
- 参数
-
viewport Borrowed adapter, or null to detach.
在文件 BuildingEdgeCurveTool.cpp 第 34 行定义.
该类的文档由以下文件生成:
- src/modules/building/editor/EditorBuildingTarget.h
- src/modules/building/editor/BuildingEdgeCurveTool.cpp
Public 成员函数 继承自