UCombinedTransformGizmo

[UCombinedTransformGizmo](API\Runtime\InteractiveToolsFramework\BaseGizmos\UCombinedTransformGizmo) provides standard Transformation Gizmo interactions, applied to a [UTransformProxy](API\Runtime\InteractiveToolsFramework\BaseGizmos\UTransformProxy) target object.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseGizmos/CombinedTransformGizmo.h

Include

#include "BaseGizmos/CombinedTransformGizmo.h"

Syntax

class UCombinedTransformGizmo : public UInteractiveGizmo

Remarks

UCombinedTransformGizmo provides standard Transformation Gizmo interactions, applied to a UTransformProxy target object. By default the Gizmo will be a standard XYZ translate/rotate Gizmo (axis and plane translation).

The in-scene representation of the Gizmo is a ACombinedTransformGizmoActor (or subclass). This Actor has FProperty members for the various sub-widgets, each as a separate Component. Any particular sub-widget of the Gizmo can be disabled by setting the respective Actor Component to null.

So, to create non-standard variants of the Transform Gizmo, set a new GizmoActorBuilder in the UCombinedTransformGizmoBuilder registered with the GizmoManager. Return a suitably-configured GizmoActor and everything else will be handled automatically.

Variables

Name Description

Protected variable

TArray< TObject...

 

ActiveComponents

List of current-active child components

Protected variable

TArray< TObject...

 

ActiveGizmos

List of currently-active child gizmos

Public variable

TObjectPtr< UTr...

 

ActiveTarget

The active target object for the Gizmo

Protected variable

FString

 

AxisAngleBuilderIdentifier

Protected variable

FString

 

AxisPositionBuilderIdentifier

Protected variable

TObjectPtr< UGi...

 

AxisXSource

X-axis source is shared across Gizmos, and created internally during SetActiveTarget()

Protected variable

TObjectPtr< UGi...

 

AxisYSource

Y-axis source is shared across Gizmos, and created internally during SetActiveTarget()

Protected variable

TObjectPtr< UGi...

 

AxisZSource

Z-axis source is shared across Gizmos, and created internally during SetActiveTarget()

Protected variable

bool

 

bDisallowNegativeScaling

Public variable

bool

 

bGridSizeIsExplicit

Optional grid size which overrides the Context Grid

Public variable

bool

 

bRotationGridSizeIsExplicit

Optional grid size which overrides the Context Rotation Grid

Public variable

bool

 

bSnapToWorldGrid

If true, then when using world frame, Axis and Plane translation snap to the world grid via the ContextQueriesAPI (in PositionSnapFunction)

Public variable

bool

 

bSnapToWorldRotGrid

If true, then when using world frame, Axis and Plane translation snap to the world grid via the ContextQueriesAPI (in RotationSnapFunction)

Public variable

bool

 

bUseContextCoordinateSystem

Whether to use the World/Local coordinate system provided by the context via the ContextyQueriesAPI.

Protected variable

TObjectPtr< UGi...

 

CameraAxisSource

Axis SourcesAxis that points towards camera, X/Y plane tangents aligned to right/up.

Public variable

EToolContextCoo...

 

CurrentCoordinateSystem

Current coordinate system in use.

Protected variable

TUniqueFunction...

 

DestinationAlignmentRayCaster

Public variable

FVector

 

ExplicitGridSize

Public variable

FRotator

 

ExplicitRotationGridSize

Protected variable

ACombinedTransf...

 

GizmoActor

Current active GizmoActor that was spawned by this Gizmo. Will be destroyed when Gizmo is.

Protected variable

TSharedPtr< FCo...

 

GizmoActorBuilder

Protected variable

TUniqueFunction...

 

IsNonUniformScaleAllowed

Protected variable

TArray< TObject...

 

NonuniformScaleComponents

List of nonuniform scale components.

Protected variable

FString

 

PlanePositionBuilderIdentifier

Protected variable

TUniqueFunction...

 

ShouldAlignDestination

These are used to let the translation subgizmos use raycasts into the scene to align the gizmo with scene geometry.

Protected variable

TObjectPtr< UGi...

 

StateTarget

Other Gizmo Components State target is shared across gizmos, and created internally during SetActiveTarget().

Protected variable

TObjectPtr< UGi...

 

UnitAxisXSource

Scaling support.

Protected variable

TObjectPtr< UGi...

 

UnitAxisYSource

Y-axis source (ie 0,1,0) is shared across Scale Gizmos, and created internally during SetActiveTarget()

Protected variable

TObjectPtr< UGi...

 

UnitAxisZSource

Z-axis source (ie 0,0,1) is shared across Scale Gizmos, and created internally during SetActiveTarget()

Protected variable

TFunction< void...

 

UpdateCoordSystemFunction

This function is called on each active GizmoActor Component to update it's coordinate system (eg world/local).

Protected variable

TFunction< void...

 

UpdateHoverFunction

This function is called on each active GizmoActor Component to update it's hover state.

Protected variable

UWorld *

 

World

GizmoActors will be spawned in this World

Functions

Name Description

Protected function Virtual

UInteractive...

 

AddAxisRotationGizmo

(
    UPrimitiveComponent* AxisCompo...,
    USceneComponent* RootComponent,
    IGizmoAxisSource* AxisSource,
    IGizmoTransformSource* Transfo...,
    IGizmoStateTarget* StateTarget
)

Protected function Virtual

UInteractive...

 

AddAxisScaleGizmo

(
    UPrimitiveComponent* AxisCompo...,
    USceneComponent* RootComponent,
    IGizmoAxisSource* GizmoAxisSou...,
    IGizmoAxisSource* ParameterAxi...,
    IGizmoTransformSource* Transfo...,
    IGizmoStateTarget* StateTarget
)

Protected function Virtual

UInteractive...

 

AddAxisTranslationGizmo

(
    UPrimitiveComponent* AxisCompo...,
    USceneComponent* RootComponent,
    IGizmoAxisSource* AxisSource,
    IGizmoTransformSource* Transfo...,
    IGizmoStateTarget* StateTarget
)

Protected function Virtual

UInteractive...

 

AddPlaneScaleGizmo

(
    UPrimitiveComponent* AxisCompo...,
    USceneComponent* RootComponent,
    IGizmoAxisSource* GizmoAxisSou...,
    IGizmoAxisSource* ParameterAxi...,
    IGizmoTransformSource* Transfo...,
    IGizmoStateTarget* StateTarget
)

Protected function Virtual

UInteractive...

 

AddPlaneTranslationGizmo

(
    UPrimitiveComponent* AxisCompo...,
    USceneComponent* RootComponent,
    IGizmoAxisSource* AxisSource,
    IGizmoTransformSource* Transfo...,
    IGizmoStateTarget* StateTarget
)

Protected function Virtual

UInteractive...

 

AddUniformScaleGizmo

(
    UPrimitiveComponent* ScaleComp...,
    USceneComponent* RootComponent,
    IGizmoAxisSource* GizmoAxisSou...,
    IGizmoAxisSource* ParameterAxi...,
    IGizmoTransformSource* Transfo...,
    IGizmoStateTarget* StateTarget
)

Public function Virtual

void

 

ClearActiveTarget()

Clear the active target object for the Gizmo

Public function Const

ACombinedTra...

 

GetGizmoActor()

Public function Const

FTransform

 

GetGizmoTransform()

Public function Virtual

bool

 

IsVisible()

Protected function Const

bool

 

PositionSnapFunction

(
    const FVector& WorldPosition,
    FVector& SnappedPositionOut
)

Axis and Plane TransformSources use this function to execute worldgrid snap queries.

Public function

void

 

ReinitializeGizmoTransform

(
    const FTransform& NewTransform,
    bool bKeepGizmoUnscaled
)

Repositions the gizmo without issuing undo/redo changes, triggering callbacks, or moving any components.

Protected function Const

FQuat

 

RotationSnapFunction

(
    const FQuat& DeltaRotation
)

Public function Virtual

void

 

SetActiveTarget

(
    UTransformProxy* Target,
    IToolContextTransactionProvider...
)

Set the active target object for the Gizmo

Public function Virtual

void

 

SetDisallowNegativeScaling

(
    bool bDisallow
)

By default, the nonuniform scale components can scale negatively.

Public function Virtual

void

 

SetGizmoActorBuilder

Public function Virtual

void

 

SetIsNonUniformScaleAllowedFunction

(
    TUniqueFunction< bool()>&& IsNonUn...
)

By default, non-uniform scaling handles appear (assuming they exist in the gizmo to begin with), when CurrentCoordinateSystem == EToolContextCoordinateSystem::Local, since components can only be locally scaled.

Public function Virtual

void

 

SetNewChildScale

(
    const FVector& NewChildScale
)

Explicitly set the child scale.

Public function Virtual

void

 

SetNewGizmoTransform

(
    const FTransform& NewTransform,
    bool bKeepGizmoUnscaled
)

Set a new position for the Gizmo.

Public function Virtual

void

 

SetSubGizmoBuilderIdentifiers

(
    FString AxisPositionBuilderIdentifi...,
    FString PlanePositionBuilderIdentif...,
    FString AxisAngleBuilderIdentifier
)

Public function Virtual

void

 

SetUpdateCoordSystemFunction

(
    TFunction< void...
)

Public function Virtual

void

 

SetUpdateHoverFunction

(
    TFunction< void...
)

Public function Virtual

void

 

SetVisibility

(
    bool bVisible
)

Set visibility for this Gizmo

Public function Virtual

void

 

SetWorld

(
    UWorld* World
)

Public function Virtual

void

 

SetWorldAlignmentFunctions

(
    TUniqueFunction< bool()>&& ShouldA...,
    TUniqueFunction< bool&,...
)

If used, binds alignment functions to the sub gizmos that they can use to align to geometry in the scene.

Protected function

void

 

UpdateCameraAxisSource()

Internal function that updates CameraAxisSource by getting current view state from GizmoManager

Overridden from UInteractiveGizmo

Name Description

Public function Virtual

void

 

Setup()

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

Public function Virtual

void

 

Shutdown()

Called by GizmoManager to shut down the Gizmo

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

Allow the Gizmo to do any necessary processing on Tick