UAxisPositionGizmo

[UAxisPositionGizmo](API\Runtime\InteractiveToolsFramework\BaseGizmos\UAxisPositionGizmo) implements a gizmo interaction where 1D parameter value is manipulated by dragging a point on a 3D line/axis in space.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

InteractiveToolsFramework

Header

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

Include

#include "BaseGizmos/AxisPositionGizmo.h"

Syntax

class UAxisPositionGizmo :
    public UInteractiveGizmo,
    public IClickDragBehaviorTarget,
    public IHoverBehaviorTarget

Remarks

UAxisPositionGizmo implements a gizmo interaction where 1D parameter value is manipulated by dragging a point on a 3D line/axis in space. The 3D point is converted to the axis parameter at the nearest point, giving us the 1D parameter value.

As with other base gizmos, this class only implements the interaction. The visual aspect of the gizmo, the axis, and the parameter storage are all provided externally.

The axis direction+origin is provided by an IGizmoAxisSource.

The interaction target (ie the thing you have to click on to start the dragging interaction) is provided by an IGizmoClickTarget.

The new 1D parameter value is sent to an IGizmoFloatParameterSource

Internally a UClickDragInputBehavior is used to handle mouse input, configured in Setup()

Variables

Name Description

Public variable

TScriptInterfac...

 

AxisSource

AxisSource provides the 3D line 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

 

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

float

 

InitialTargetParameter

Public variable

FVector

 

InteractionAxis

Public variable

float

 

InteractionCurParameter

Public variable

FVector

 

InteractionCurPoint

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

float

 

InteractionStartParameter

Public variable

FVector

 

InteractionStartPoint

Protected variable

FVector

 

LastHitPosition

Public variable

float

 

ParameterSign

Public variable

TScriptInterfac...

 

ParameterSource

The 3D line-nearest-point is converted to a 1D coordinate along the line, 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