UPlanePositionGizmo

[UPlanePositionGizmo](API\Runtime\InteractiveToolsFramework\BaseGizmos\UPlanePositionGizmo) implements a gizmo interaction where 2D parameter value is manipulated by dragging a point on a 3D plane in space.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/Experimental/InteractiveToolsFramework/Public/BaseGizmos/PlanePositionGizmo.h

Include

#include "BaseGizmos/PlanePositionGizmo.h"

Syntax

class UPlanePositionGizmo :
    public UInteractiveGizmo,
    public IClickDragBehaviorTarget,
    public IHoverBehaviorTarget

Remarks

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()

Variables

Name Description

Public variable

TScriptInterfac...

 

AxisSource

AxisSource provides the 3D plane on which the interaction happens

Public variable

bool

 

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

Public variable

bool

 

bFlipX

If enabled, flip sign of parameter delta on X axis

Public variable

bool

 

bFlipY

If enabled, flip sign of parameter delta on Y axis

Public variable

bool

 

bInInteraction

If true, we are in an active click+drag interaction, otherwise we are not

Public variable

TScriptInterfac...

 

HitTarget

The HitTarget provides a hit-test against some 3D element (presumably a visual widget) that controls when interaction can start

Protected variable

FVector2D

 

InitialTargetParameter

Public variable

FVector

 

InteractionAxisX

Public variable

FVector

 

InteractionAxisY

Public variable

FVector2D

 

InteractionCurParameter

Public variable

FVector

 

InteractionCurPoint

Public variable

FVector

 

InteractionNormal

Public variable

FVector

 

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

Public variable

FVector2D

 

InteractionStartParameter

Public variable

FVector

 

InteractionStartPoint

Protected variable

FVector

 

LastHitPosition

Public variable

FVector2D

 

ParameterSigns

Public variable

TScriptInterfac...

 

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

Public variable

TScriptInterfac...

 

StateTarget

StateTarget is notified when interaction starts and ends, so that things like undo/redo can be handled externally

Overridden from UInteractiveGizmo

Name Description

Public function Virtual

void

 

Setup()

Called by GizmoManager to initialize the Gizmo after GizmoBuilder::BuildGizmo() has been called

Overridden from IClickDragBehaviorTarget

Name Description

Public function Virtual

FInputRayHit

 

CanBeginClickDragSequence

(
    const FInputDeviceRay& PressPos
)

Test if target can begin click-drag interaction at this point

Public function Virtual

void

 

OnClickDrag

(
    const FInputDeviceRay& DragPos
)

Notify Target that input position has changed

Public function Virtual

void

 

OnClickPress

(
    const FInputDeviceRay& PressPos
)

Notify Target that click press ocurred

Public function Virtual

void

 

OnClickRelease

(
    const FInputDeviceRay& ReleasePos
)

Notify Target that click release occurred

Public function Virtual

void

 

OnTerminateDragSequence()

Notify Target that click-drag sequence has been explicitly terminated (eg by escape key)

Overridden from IHoverBehaviorTarget

Name Description

Public function Virtual

FInputRayHit

 

BeginHoverSequenceHitTest

(
    const FInputDeviceRay& PressPos
)

IHoverBehaviorTarget implementation.

Public function Virtual

void

 

OnBeginHover

(
    const FInputDeviceRay& DevicePos
)

Initialize hover sequence at given position

Public function Virtual

void

 

OnEndHover()

Terminate active hover sequence

Public function Virtual

bool

 

OnUpdateHover

(
    const FInputDeviceRay& DevicePos
)

Update active hover sequence with new input position

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss