Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
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.
| Name | UCombinedTransformGizmo |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseGizmos/CombinedTransformGizmo.h |
| Include Path | #include "BaseGizmos/CombinedTransformGizmo.h" |
Syntax
UCLASS (MinimalAPI)
class UCombinedTransformGizmo : public UInteractiveGizmo
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInteractiveGizmo → UCombinedTransformGizmo
Implements Interfaces
Derived Classes
Structs
| Name | Remarks |
|---|---|
| FSubGizmoInfo | FSubGizmoInfo stores the (UPrimitiveComponent,UInteractiveGizmo) pair for a sub-element of the widget. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnClearActiveTarget | TMulticastDelegate_TwoParams< void, UCombinedTransformGizmo *, UTransformProxy * > | Broadcast at the beginning of a ClearActiveTarget call, when the ActiveTarget (if present) is not yet disconnected. | BaseGizmos/CombinedTransformGizmo.h |
| FOnDisplaySpaceTransformChanged | TMulticastDelegate_TwoParams< void, UCombinedTransformGizmo *, TOptional< FTransform > > | Broadcast at the end of a SetDisplaySpaceTransform call that changes the display space transform. | BaseGizmos/CombinedTransformGizmo.h |
| FOnSetActiveTarget | TMulticastDelegate_TwoParams< void, UCombinedTransformGizmo *, UTransformProxy * > | Broadcast at the end of a SetActiveTarget call. | BaseGizmos/CombinedTransformGizmo.h |
| FOnVisibilityChanged | TMulticastDelegate_TwoParams< void, UCombinedTransformGizmo *, bool > | Broadcast at the end of a SetVisibility call if the visibility changes. | BaseGizmos/CombinedTransformGizmo.h |
| FTransformSubGizmoCommonParams | UE::GizmoUtil::FTransformSubGizmoCommonParams | BaseGizmos/CombinedTransformGizmo.h | |
| FTransformSubGizmoSharedState | UE::GizmoUtil::FTransformSubGizmoSharedState | BaseGizmos/CombinedTransformGizmo.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveGizmoMode | EToolContextTransformGizmoMode | Current dynamic sub-widget visibility mode to use (eg Translate-Only, Scale-Only, Combined, etc) If bUseContextGizmoMode is true, this value will be updated internally every Tick() by quering the ContextyQueriesAPI, otherwise the default is Combined and the client can change it as necessary | BaseGizmos/CombinedTransformGizmo.h | |
| ActiveTarget | TObjectPtr< UTransformProxy > | The active target object for the Gizmo | BaseGizmos/CombinedTransformGizmo.h | |
| bGridSizeIsExplicit | bool | Optional grid size which overrides the Context Grid | BaseGizmos/CombinedTransformGizmo.h | |
| bRotationGridSizeIsExplicit | bool | Optional grid size which overrides the Context Rotation Grid | BaseGizmos/CombinedTransformGizmo.h | |
| bSnapToScaleGrid | bool | If true, scaling snaps to the grid | BaseGizmos/CombinedTransformGizmo.h | |
| bSnapToWorldGrid | bool | BSnapToWorldGrid controls whether any position snapping is applied, if possible, for Axis and Plane translations, via the ContextQueriesAPI Despite the name, this flag controls both world-space grid snapping and relative snapping | BaseGizmos/CombinedTransformGizmo.h | |
| bSnapToWorldRotGrid | bool | If true, then when using world frame, Axis and Plane rotation snap to the world grid via the ContextQueriesAPI (in RotationSnapFunction) | BaseGizmos/CombinedTransformGizmo.h | |
| bUseContextCoordinateSystem | bool | Whether to use the World/Local coordinate system provided by the context via the ContextyQueriesAPI. | BaseGizmos/CombinedTransformGizmo.h | |
| bUseContextGizmoMode | bool | Whether to use the Gizmo Mode provided by the context via the ContextyQueriesAPI. | BaseGizmos/CombinedTransformGizmo.h | |
| CurrentCoordinateSystem | EToolContextCoordinateSystem | Current coordinate system in use. | BaseGizmos/CombinedTransformGizmo.h | |
| ExplicitGridSize | FVector | BaseGizmos/CombinedTransformGizmo.h | ||
| ExplicitRotationGridSize | FRotator | BaseGizmos/CombinedTransformGizmo.h | ||
| OnAboutToClearActiveTarget | FOnClearActiveTarget | BaseGizmos/CombinedTransformGizmo.h | ||
| OnDisplaySpaceTransformChanged | FOnDisplaySpaceTransformChanged | BaseGizmos/CombinedTransformGizmo.h | ||
| OnSetActiveTarget | FOnSetActiveTarget | BaseGizmos/CombinedTransformGizmo.h | ||
| OnVisibilityChanged | FOnVisibilityChanged | BaseGizmos/CombinedTransformGizmo.h | ||
| RelativeTranslationSnapping | FToolContextOptionalToggle | Specify whether Relative snapping for Translations should be used in World frame mode. | BaseGizmos/CombinedTransformGizmo.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AxisScaleXGizmo | TWeakObjectPtr< UInteractiveGizmo > | BaseGizmos/CombinedTransformGizmo.h | ||
| AxisScaleYGizmo | TWeakObjectPtr< UInteractiveGizmo > | BaseGizmos/CombinedTransformGizmo.h | ||
| AxisScaleZGizmo | TWeakObjectPtr< UInteractiveGizmo > | BaseGizmos/CombinedTransformGizmo.h | ||
| CustomRotationDeltaConstraintFunctions | TFunction< bool(double AxisDelta, double &SnappedDelta)> | BaseGizmos/CombinedTransformGizmo.h | ||
| CustomScaleDeltaConstraintFunctions | TFunction< bool(double AxisDelta, double &SnappedDelta)> | BaseGizmos/CombinedTransformGizmo.h | ||
| CustomTranslationDeltaConstraintFunctions | TFunction< bool(double AxisDelta, double &SnappedDelta)> | BaseGizmos/CombinedTransformGizmo.h | ||
| PreviousActiveGizmoMode | EToolContextTransformGizmoMode | BaseGizmos/CombinedTransformGizmo.h | ||
| TransactionProviderAtLastSetActiveTarget | IToolContextTransactionProvider * | Here to support subgizmo reinitialization after SetActiveTarget has been called. | BaseGizmos/CombinedTransformGizmo.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginTransformEditSequence() |
Called at the start of a sequence of gizmo transform edits, for instance while dragging or manipulating the gizmo numerical UI. | BaseGizmos/CombinedTransformGizmo.h | |
virtual void ClearActiveTarget() |
Clear the active target object for the Gizmo | BaseGizmos/CombinedTransformGizmo.h | |
virtual void EndTransformEditSequence() |
Called at the end of a sequence of gizmo transform edits. | BaseGizmos/CombinedTransformGizmo.h | |
const TOptional< FTransform > & GetDisplaySpaceTransform() |
BaseGizmos/CombinedTransformGizmo.h | ||
ACombinedTransformGizmoActor * GetGizmoActor() |
BaseGizmos/CombinedTransformGizmo.h | ||
| Gets the elements that this gizmo was initialized with. | BaseGizmos/CombinedTransformGizmo.h | ||
FTransform GetGizmoTransform() |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual bool IsNonUniformScaleAllowed() |
Exposes the return value of the current IsNonUniformScaleAllowed function so that, for instance, numerical UI can react appropriately. | BaseGizmos/CombinedTransformGizmo.h | |
virtual bool IsVisible() |
BaseGizmos/CombinedTransformGizmo.h | ||
void ReinitializeGizmoTransform
(
const FTransform& NewTransform, |
Repositions the gizmo without issuing undo/redo changes, triggering callbacks, or moving any components. | BaseGizmos/CombinedTransformGizmo.h | |
virtual void SetActiveTarget
(
UTransformProxy* Target, |
Set the active target object for the Gizmo | BaseGizmos/CombinedTransformGizmo.h | |
| BaseGizmos/CombinedTransformGizmo.h | |||
| BaseGizmos/CombinedTransformGizmo.h | |||
void SetCustomTranslationDeltaFunctions
(
TFunction< bool(double AxisDelta, double&SnappedDelta)> XAxis, |
These allow for the deltas of gizmo manipulations to be constrained or clamped in custom ways, for instance to slow or stop the gizmo as the drag gets longer. | BaseGizmos/CombinedTransformGizmo.h | |
virtual void SetDisallowNegativeScaling
(
bool bDisallow |
By default, the nonuniform scale components can scale negatively. | BaseGizmos/CombinedTransformGizmo.h | |
void SetDisplaySpaceTransform
(
TOptional< FTransform > TransformIn |
The DisplaySpaceTransform is not used by the gizmo itself, but can be used by external adapters that might display gizmo values, to give values relative to this transform rather than relative to world origin and axes. | BaseGizmos/CombinedTransformGizmo.h | |
virtual void SetGizmoActorBuilder
(
TSharedPtr< FCombinedTransformGizmoActorFactory > Builder |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual void SetIsNonUniformScaleAllowedFunction
(
TUniqueFunction< bool()>&& IsNonUniformScaleAllowed |
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. | BaseGizmos/CombinedTransformGizmo.h | |
virtual void SetNewChildScale
(
const FVector& NewChildScale |
Explicitly set the child scale. | BaseGizmos/CombinedTransformGizmo.h | |
virtual void SetNewGizmoTransform
(
const FTransform& NewTransform, |
Set a new position for the Gizmo. | BaseGizmos/CombinedTransformGizmo.h | |
| BaseGizmos/CombinedTransformGizmo.h | |||
bool SetSubGizmoComponent
(
ETransformGizmoSubElements Element, |
Sets a given sub gizmo component to the given component. | BaseGizmos/CombinedTransformGizmo.h | |
virtual void SetUpdateCoordSystemFunction
(
TFunction< void(UPrimitiveComponent*, EToolContextCoordinateSystem)> CoordSysFunction |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual void SetUpdateHoverFunction
(
TFunction< void(UPrimitiveComponent*, bool)> HoverFunction |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual void SetVisibility
(
bool bVisible |
Set visibility for this Gizmo | BaseGizmos/CombinedTransformGizmo.h | |
virtual void SetWorld
(
UWorld* World |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual void SetWorldAlignmentFunctions
(
TUniqueFunction< bool()>&& ShouldAlignDestination, |
If used, binds alignment functions to the sub gizmos that they can use to align to geometry in the scene. | BaseGizmos/CombinedTransformGizmo.h | |
void UpdateTransformDuringEditSequence
(
const FTransform& NewTransform, |
Updates the gizmo transform between Begin/EndTransformeditSequence calls. | BaseGizmos/CombinedTransformGizmo.h |
Overridden from UInteractiveGizmo
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Setup() |
Called by GizmoManager to initialize the Gizmo after GizmoBuilder::BuildGizmo() has been called | BaseGizmos/CombinedTransformGizmo.h | |
virtual void Shutdown() |
Called by GizmoManager to shut down the Gizmo | BaseGizmos/CombinedTransformGizmo.h | |
virtual void Tick
(
float DeltaTime |
Allow the Gizmo to do any necessary processing on Tick | BaseGizmos/CombinedTransformGizmo.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UInteractiveGizmo * AddAxisRotationGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddAxisRotationGizmo
(
UPrimitiveComponent* AxisComponent, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddAxisScaleGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddAxisScaleGizmo
(
UPrimitiveComponent* AxisComponent, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddAxisTranslationGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddAxisTranslationGizmo
(
UPrimitiveComponent* AxisComponent, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddFreeRotationGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddFreeTranslationGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddPlaneScaleGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddPlaneScaleGizmo
(
UPrimitiveComponent* AxisComponent, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddPlaneTranslationGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddPlaneTranslationGizmo
(
UPrimitiveComponent* AxisComponent, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddUniformScaleGizmo
(
UPrimitiveComponent* ScaleComponent, |
BaseGizmos/CombinedTransformGizmo.h | ||
virtual UInteractiveGizmo * AddUniformScaleGizmo
(
FTransformSubGizmoCommonParams& Params, |
BaseGizmos/CombinedTransformGizmo.h | ||
bool PositionAxisDeltaSnapFunction
(
double AxisDelta, |
BaseGizmos/CombinedTransformGizmo.h | ||
bool PositionSnapFunction
(
const FVector& WorldPosition, |
Axis and Plane TransformSources use these function to execute snapping queries. | BaseGizmos/CombinedTransformGizmo.h | |
bool RotationAxisAngleSnapFunction
(
double AxisAngleDelta, |
BaseGizmos/CombinedTransformGizmo.h | ||
FQuat RotationSnapFunction
(
const FQuat& DeltaRotation |
BaseGizmos/CombinedTransformGizmo.h | ||
bool ScaleAxisDeltaSnapFunction
(
double ScaleAxisDelta, |
Used for uniform scale delta snapping. | BaseGizmos/CombinedTransformGizmo.h | |
bool ScaleSnapFunction
(
double DeltaScale |
Currently not implemented because WorldGridSnapping currently has no affect on scale/scale-snapping | BaseGizmos/CombinedTransformGizmo.h | |
void UpdateCameraAxisSource() |
Internal function that updates CameraAxisSource by getting current view state from GizmoManager | BaseGizmos/CombinedTransformGizmo.h |