Drag direction in the DT's local space. The direction does not need to
be perpendicular to the edge; any direction is permitted. The actual
displacement for a given mouse move is determined by the closest-point
projection of the mouse ray onto the axis dragStartMidpoint + t * direction.
The direction is updated whenever the edge orientation changes relative to its initial orientation, so that the control's movement remains consistent with the user's drag direction even after rotations.
The index of the first point that defines the edge to which this control is attached.
The index of the second point that defines the edge to which this control is attached.
Cancel the drag, restoring all affected geometry points to their pre-drag positions.
Commit the drag and refresh any derived state from the committed geometry.
Move the control during drag. Returns the updated visual position of the control, or undefined if no movement was possible (e.g. degenerate geometry).
Optional pre-computed restriction-constrained position. When provided the control should derive its movement from this world-space point rather than from a raw line-line closest-point computation on the ray.
Optional constraint evaluator. When provided, edge controls use it to find the tightest valid scalar t before moving both endpoints, guaranteeing they always translate rigidly together.
Refreshes all derived state from the current geometry (e.g. after undo/redo).
Called when a single point in the geometry has moved (not during a drag). Returns true if this control was affected and its visual position changed.
Begin a drag interaction. Snapshots any required initial state. Returns false if the control cannot be dragged at this time.
A control point that is attached to an edge between two points. The control point is defined by the indices of the two points and a direction vector.
The control sits at the midpoint of the edge and can only be dragged along the given direction. When dragged, both point1 and point2 are shifted by the same delta (symmetric displacement).