Choose your operating system:
Windows
macOS
Linux
| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseGizmos/PlanePositionGizmo.h |
Include |
#include "BaseGizmos/PlanePositionGizmo.h" |
class UPlanePositionGizmo :
public UInteractiveGizmo,
public IClickDragBehaviorTarget,
public IHoverBehaviorTarget
UPlanePositionGizmo implements a gizmo interaction where 2D parameter value is manipulated by dragging a point on a 3D plane in space. The 3D position is converted to 2D coordinates based on the tangent axes of the plane.
As with other base gizmos, this class only implements the interaction. The visual aspect of the gizmo, the plane, and the parameter storage are all provided externally.
The plane is provided by an IGizmoAxisSource. The origin and normal define the plane and then the tangent axes of the source define the coordinate space.
The interaction target (ie the thing you have to click on to start the dragging interaction) is provided by an IGizmoClickTarget.
The new 2D parameter value is sent to an IGizmoVec2ParameterSource
Internally a UClickDragInputBehavior is used to handle mouse input, configured in Setup()
Name | Description | ||
---|---|---|---|
|
AxisSource |
AxisSource provides the 3D plane on which the interaction happens |
|
|
bEnableSignedAxis |
If enabled, then the sign on the parameter delta is always "increasing" when moving away from the origin point, rather than just being a projection onto the axis |
|
|
bFlipX |
If enabled, flip sign of parameter delta on X axis |
|
|
bFlipY |
If enabled, flip sign of parameter delta on Y axis |
|
|
bInInteraction |
If true, we are in an active click+drag interaction, otherwise we are not |
|
|
CustomDestinationFunc |
If ShouldUseCustomDestinationFunc() returns true, this function is used to get a destination point, and the output parameters are picked in such a way that the axis origin moves to the closest point in the plane to the destination point. |
|
|
HitTarget |
The HitTarget provides a hit-test against some 3D element (presumably a visual widget) that controls when interaction can start |
|
|
InitialTargetParameter |
||
|
InteractionAxisX |
||
|
InteractionAxisY |
||
|
InteractionCurParameter |
||
|
InteractionCurPoint |
||
|
InteractionNormal |
||
|
InteractionOrigin |
The values below are used in the context of a single click-drag interaction, ie if bInInteraction = true They otherwise should be considered uninitialized |
|
|
InteractionStartOriginParameterOffset |
||
|
InteractionStartParameter |
||
|
InteractionStartPoint |
||
|
LastHitPosition |
||
|
LastInputRay |
||
|
TObjectPtr< UCl... |
MouseBehavior |
The mouse click behavior of the gizmo is accessible so that it can be modified to use different mouse keys. |
|
ParameterSigns |
||
|
ParameterSource |
The 3D plane coordinates are converted to 2D coordinates in the plane tangent space, and the change in value is sent to this ParameterSource |
|
|
ShouldUseCustomDestinationFunc |
This gets checked to see if we should use the custom ray caster to get a destination point for the gizmo, rather than grabbing the intersection with the gizmo plane. |
|
|
StateTarget |
StateTarget is notified when interaction starts and ends, so that things like undo/redo can be handled externally |
Name | Description | ||
---|---|---|---|
|
CanBeginClickDragSequence ( |
Test if target can begin click-drag interaction at this point |
|
|
OnClickDrag ( |
Notify Target that input position has changed |
|
|
OnClickPress ( |
Notify Target that click press ocurred |
|
|
OnClickRelease ( |
Notify Target that click release occurred |
|
|
OnTerminateDragSequence() |
Notify Target that click-drag sequence has been explicitly terminated (eg by escape key) |
Name | Description | ||
---|---|---|---|
|
BeginHoverSequenceHitTest ( |
IHoverBehaviorTarget implementation. |
|
|
OnBeginHover ( |
Initialize hover sequence at given position |
|
|
OnEndHover() |
Terminate active hover sequence |
|
|
OnUpdateHover ( |
Update active hover sequence with new input position |
Name |
Description |
|
---|---|---|
|
FCustomDestinationParams |