UI-neutral ray picking and transient drag state for a spline document. @ownership Borrows the document; the caller must finish or cancel before destroying it. @thread Viewport/editor thread only; no callbacks are retained or invoked. 更多...
#include <SplinePathGizmo.h>
Public 成员函数 | |
| SplinePathDragSession (SplinePathDocument *document, int sampleCount=64) | |
| Create an idle session borrowing an authoritative spline document. | |
| Result< SplinePathDragPreview > | beginDrag (double rayOriginX, double rayOriginY, double rayOriginZ, double rayDirectionX, double rayDirectionY, double rayDirectionZ) |
| Pick the nearest anchor or Bezier handle sphere intersected by a world ray. | |
| Result< SplinePathDragPreview > | updateDrag (double rayOriginX, double rayOriginY, double rayOriginZ, double rayDirectionX, double rayDirectionY, double rayDirectionZ) |
| Project a pointer ray onto the original camera-facing drag plane and update only the draft. | |
| Result< DomainOperation > | finishDrag () |
| Produce one reversible point replacement operation without applying it. | |
| void | cancelDrag () |
| Discard transient state without changing the document. | |
| bool | isDragging () const noexcept |
| Report whether a drag owns transient state. | |
| StableId | activePoint () const |
| Return the active stable point id, or empty when idle. | |
| const std::string & | activeHandle () const noexcept |
| Return anchor, in, or out for the active handle. | |
详细描述
UI-neutral ray picking and transient drag state for a spline document. @ownership Borrows the document; the caller must finish or cancel before destroying it. @thread Viewport/editor thread only; no callbacks are retained or invoked.
在文件 SplinePathGizmo.h 第 42 行定义.
构造及析构函数说明
◆ SplinePathDragSession()
|
explicit |
Create an idle session borrowing an authoritative spline document.
在文件 SplinePathGizmo.cpp 第 109 行定义.
成员函数说明
◆ activeHandle()
|
inlinenoexcept |
Return anchor, in, or out for the active handle.
在文件 SplinePathGizmo.h 第 63 行定义.
◆ activePoint()
|
inline |
Return the active stable point id, or empty when idle.
在文件 SplinePathGizmo.h 第 61 行定义.
◆ beginDrag()
| Result< SplinePathDragPreview > eve::procgen_editing::SplinePathDragSession::beginDrag | ( | double | rayOriginX, |
| double | rayOriginY, | ||
| double | rayOriginZ, | ||
| double | rayDirectionX, | ||
| double | rayDirectionY, | ||
| double | rayDirectionZ | ||
| ) |
Pick the nearest anchor or Bezier handle sphere intersected by a world ray.
在文件 SplinePathGizmo.cpp 第 132 行定义.
引用了 b, eve::procgen_editing::SplinePathGizmoBuilder::build(), c, cancelDrag(), direction, found, hit, offset, origin, point, points, eve::procgen_editing::SplinePathDocument::points() , 以及 eve::editing::EditableTargetState::revision().
◆ cancelDrag()
| void eve::procgen_editing::SplinePathDragSession::cancelDrag | ( | ) |
Discard transient state without changing the document.
在文件 SplinePathGizmo.cpp 第 251 行定义.
被这些函数引用 beginDrag(), finishDrag() , 以及 updateDrag().
◆ finishDrag()
| Result< DomainOperation > eve::procgen_editing::SplinePathDragSession::finishDrag | ( | ) |
Produce one reversible point replacement operation without applying it.
在文件 SplinePathGizmo.cpp 第 237 行定义.
引用了 cancelDrag(), eve::procgen_editing::SplinePathDocument::makeSetPoint(), operation , 以及 eve::editing::EditableTargetState::revision().
◆ isDragging()
|
inlinenoexcept |
Report whether a drag owns transient state.
在文件 SplinePathGizmo.h 第 59 行定义.
◆ updateDrag()
| Result< SplinePathDragPreview > eve::procgen_editing::SplinePathDragSession::updateDrag | ( | double | rayOriginX, |
| double | rayOriginY, | ||
| double | rayOriginZ, | ||
| double | rayDirectionX, | ||
| double | rayDirectionY, | ||
| double | rayDirectionZ | ||
| ) |
Project a pointer ray onto the original camera-facing drag plane and update only the draft.
在文件 SplinePathGizmo.cpp 第 188 行定义.
引用了 cancelDrag(), direction, distance, eve::procgen_editing::SplinePathControlPoint::inX, eve::procgen_editing::SplinePathControlPoint::inY, eve::procgen_editing::SplinePathControlPoint::inZ, origin, eve::procgen_editing::SplinePathControlPoint::outX, eve::procgen_editing::SplinePathControlPoint::outY, eve::procgen_editing::SplinePathControlPoint::outZ, eve::editing::EditableTargetState::revision(), world, eve::procgen_editing::SplinePathControlPoint::x, eve::procgen_editing::SplinePathControlPoint::y , 以及 eve::procgen_editing::SplinePathControlPoint::z.
该类的文档由以下文件生成:
- src/modules/procgen/editing/SplinePathGizmo.h
- src/modules/procgen/editing/SplinePathGizmo.cpp