Protocol implemented by every editor tool. 更多...
#include <EditorTool.h>
Public 成员函数 | |
| virtual | ~IEditorTool ()=default |
| Releases IEditorTool resources. | |
| virtual const ToolDescriptor & | descriptor () const =0 |
| Stable tool identity and presentation metadata. | |
| virtual void | activate (EditorContext &context) |
| Called exactly once when this tool becomes active. | |
| virtual void | deactivate (EditorContext &context) |
| Called exactly once before this tool stops being active. | |
| virtual ToolResponse | pointerEvent (EditorContext &context, const EditorPointerEvent &event) |
| Handle normalized pointer input. | |
| 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 | drawOverlay (EditorContext &context, IEditorOverlay &overlay) |
| Emit renderer-independent feedback for the active viewport. | |
| virtual void | inspect (EditorContext &context, IEditorInspector &inspector) |
| Expose configurable settings through a host-provided inspector. | |
| virtual void | cancel (EditorContext &context) |
| Cancel the active gesture while keeping the tool selected. | |
详细描述
Protocol implemented by every editor tool.
EditorSession only depends on this lifecycle. Tile, terrain, object and game- specific tools are peers and can be added without modifying the session.
在文件 EditorTool.h 第 110 行定义.
构造及析构函数说明
◆ ~IEditorTool()
|
virtualdefault |
Releases IEditorTool resources.
成员函数说明
◆ activate()
|
inlinevirtual |
Called exactly once when this tool becomes active.
被 eve::editor::ScriptEditorTool 重载.
在文件 EditorTool.h 第 119 行定义.
引用了 context.
◆ cancel()
|
inlinevirtual |
Cancel the active gesture while keeping the tool selected.
被 eve::editor::ArchSpaceWallDrawTool, eve::editor::ArchSpaceOpeningPlaceTool, eve::editor::ArchSpaceItemPlaceTool, eve::editor::BuildingEdgeCurveTool, eve::editor::FieldBrushTool, eve::editor::ScriptEditorTool , 以及 eve::editor::VolumeBrushTool 重载.
在文件 EditorTool.h 第 158 行定义.
引用了 context.
◆ deactivate()
|
inlinevirtual |
Called exactly once before this tool stops being active.
被 eve::editor::ArchSpaceWallDrawTool, eve::editor::ArchSpaceOpeningPlaceTool, eve::editor::ArchSpaceItemPlaceTool, eve::editor::BuildingEdgeCurveTool , 以及 eve::editor::ScriptEditorTool 重载.
在文件 EditorTool.h 第 121 行定义.
引用了 context.
◆ descriptor()
|
pure virtual |
Stable tool identity and presentation metadata.
在 eve::editor::ArchSpaceWallDrawTool, eve::editor::ArchSpaceOpeningPlaceTool, eve::editor::ArchSpaceItemPlaceTool, eve::editor::BuildingEdgeCurveTool, eve::editor::FieldBrushTool, eve::editor::ScriptEditorTool , 以及 eve::editor::VolumeBrushTool 内被实现.
被这些函数引用 eve::editor::EditorSession::activeToolId() , 以及 eve::editor::EditorSession::addTool().
◆ drawOverlay()
|
inlinevirtual |
Emit renderer-independent feedback for the active viewport.
被 eve::editor::ArchSpaceWallDrawTool, eve::editor::ArchSpaceOpeningPlaceTool, eve::editor::ArchSpaceItemPlaceTool, eve::editor::BuildingEdgeCurveTool , 以及 eve::editor::FieldBrushTool 重载.
在文件 EditorTool.h 第 146 行定义.
引用了 context.
◆ inspect()
|
inlinevirtual |
Expose configurable settings through a host-provided inspector.
被 eve::editor::ArchSpaceWallDrawTool, eve::editor::ArchSpaceOpeningPlaceTool, eve::editor::ArchSpaceItemPlaceTool, eve::editor::FieldBrushTool , 以及 eve::editor::VolumeBrushTool 重载.
在文件 EditorTool.h 第 152 行定义.
引用了 context.
◆ keyEvent()
|
inlinevirtual |
Handle normalized keyboard input.
Ignored.
被 eve::editor::ScriptEditorTool 重载.
在文件 EditorTool.h 第 132 行定义.
引用了 context , 以及 eve::editor::ToolResponse::ignored().
◆ pointerEvent()
|
inlinevirtual |
Handle normalized pointer input.
Ignored.
被 eve::editor::ArchSpaceWallDrawTool, eve::editor::ArchSpaceOpeningPlaceTool, eve::editor::ArchSpaceItemPlaceTool, eve::editor::BuildingEdgeCurveTool, eve::editor::FieldBrushTool, eve::editor::ScriptEditorTool , 以及 eve::editor::VolumeBrushTool 重载.
在文件 EditorTool.h 第 124 行定义.
引用了 context , 以及 eve::editor::ToolResponse::ignored().
◆ update()
|
inlinevirtual |
Per-frame hook for an active tool.
被 eve::editor::ScriptEditorTool 重载.
在文件 EditorTool.h 第 140 行定义.
引用了 context.
被这些函数引用 eve::editor::EditorSession::update().
该类的文档由以下文件生成:
- src/modules/editor/EditorTool.h