Navigation
Unreal Engine C++ API Reference > Runtime > InteractiveToolsFramework > BaseGizmos
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInteractiveGizmo
- UCombinedTransformGizmo
- URepositionableTransformGizmo
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
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< TObjectPtr< UPrimitiveComponent > > | ActiveComponents | List of current-active child components |
![]() |
EToolContextTransformGizmoMode | ActiveGizmoMode | 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 |
![]() |
TArray< TObjectPtr< UInteractiveGizmo > > | ActiveGizmos | List of currently-active child gizmos |
![]() |
TObjectPtr< UTransformProxy > | ActiveTarget | The active target object for the Gizmo |
![]() |
FString | AxisAngleBuilderIdentifier | |
![]() |
FString | AxisPositionBuilderIdentifier | |
![]() |
TObjectPtr< UGizmoComponentAxisSource > | AxisXSource | X-axis source is shared across Gizmos, and created internally during SetActiveTarget() |
![]() |
TObjectPtr< UGizmoComponentAxisSource > | AxisYSource | Y-axis source is shared across Gizmos, and created internally during SetActiveTarget() |
![]() |
TObjectPtr< UGizmoComponentAxisSource > | AxisZSource | Z-axis source is shared across Gizmos, and created internally during SetActiveTarget() |
![]() |
bool | bDisallowNegativeScaling | |
![]() |
bool | bGridSizeIsExplicit | Optional grid size which overrides the Context Grid |
![]() |
bool | bRotationGridSizeIsExplicit | Optional grid size which overrides the Context Rotation Grid |
![]() |
bool | bSnapToWorldGrid | 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 |
![]() |
bool | bSnapToWorldRotGrid | If true, then when using world frame, Axis and Plane translation snap to the world grid via the ContextQueriesAPI (in RotationSnapFunction) |
![]() |
bool | bUseContextCoordinateSystem | Whether to use the World/Local coordinate system provided by the context via the ContextyQueriesAPI. |
![]() |
bool | bUseContextGizmoMode | Whether to use the Gizmo Mode provided by the context via the ContextyQueriesAPI. |
![]() |
TObjectPtr< UGizmoConstantFrameAxisSource > | CameraAxisSource | Axis SourcesAxis that points towards camera, X/Y plane tangents aligned to right/up. |
![]() |
EToolContextCoordinateSystem | CurrentCoordinateSystem | Current coordinate system in use. |
![]() |
TUniqueFunction< bool(const FRay &, FVector &)> | DestinationAlignmentRayCaster | |
![]() |
TOptional< FTransform > | DisplaySpaceTransform | See comment for SetDisplaySpaceTransform;. |
![]() |
FVector | ExplicitGridSize | |
![]() |
FRotator | ExplicitRotationGridSize | |
![]() |
ACombinedTransformGizmoActor * | GizmoActor | Current active GizmoActor that was spawned by this Gizmo. Will be destroyed when Gizmo is. |
![]() |
TSharedPtr< FCombinedTransformGizmoActorFactory > | GizmoActorBuilder | |
![]() |
TUniqueFunction< bool()> | IsNonUniformScaleAllowedFunc | |
![]() |
TArray< FSubGizmoInfo > | NonUniformScaleSubGizmos | |
![]() |
FOnClearActiveTarget | OnAboutToClearActiveTarget | |
![]() |
FOnDisplaySpaceTransformChanged | OnDisplaySpaceTransformChanged | |
![]() |
FOnSetActiveTarget | OnSetActiveTarget | |
![]() |
FOnVisibilityChanged | OnVisibilityChanged | |
![]() |
FString | PlanePositionBuilderIdentifier | |
![]() |
FToolContextOptionalToggle | RelativeTranslationSnapping | Specify whether Relative snapping for Translations should be used in World frame mode. |
![]() |
TArray< FSubGizmoInfo > | RotationSubGizmos | |
![]() |
TUniqueFunction< bool()> | ShouldAlignDestination | These are used to let the translation subgizmos use raycasts into the scene to align the gizmo with scene geometry. |
![]() |
TObjectPtr< UGizmoTransformChangeStateTarget > | StateTarget | Other Gizmo Components State target is shared across gizmos, and created internally during SetActiveTarget(). |
![]() |
TArray< FSubGizmoInfo > | TranslationSubGizmos | |
![]() |
TArray< FSubGizmoInfo > | UniformScaleSubGizmos | |
![]() |
TObjectPtr< UGizmoComponentAxisSource > | UnitAxisXSource | Scaling support. |
![]() |
TObjectPtr< UGizmoComponentAxisSource > | UnitAxisYSource | Y-axis source (ie 0,1,0) is shared across Scale Gizmos, and created internally during SetActiveTarget() |
![]() |
TObjectPtr< UGizmoComponentAxisSource > | UnitAxisZSource | Z-axis source (ie 0,0,1) is shared across Scale Gizmos, and created internally during SetActiveTarget() |
![]() |
TFunction< void(UPrimitiveComponent *, EToolContextCoordinateSystem)> | UpdateCoordSystemFunction | This function is called on each active GizmoActor Component to update it's coordinate system (eg world/local). |
![]() |
TFunction< void(UPrimitiveComponent *, bool)> | UpdateHoverFunction | This function is called on each active GizmoActor Component to update it's hover state. |
![]() |
UWorld * | World | GizmoActors will be spawned in this World |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
UInteractiveGizmo * | AddAxisRotationGizmo
(
UPrimitiveComponent* AxisComponent, |
|
![]() ![]() |
UInteractiveGizmo * | AddAxisScaleGizmo
(
UPrimitiveComponent* AxisComponent, |
|
![]() ![]() |
UInteractiveGizmo * | AddAxisTranslationGizmo
(
UPrimitiveComponent* AxisComponent, |
|
![]() ![]() |
UInteractiveGizmo * | AddPlaneScaleGizmo
(
UPrimitiveComponent* AxisComponent, |
|
![]() ![]() |
UInteractiveGizmo * | AddPlaneTranslationGizmo
(
UPrimitiveComponent* AxisComponent, |
|
![]() ![]() |
UInteractiveGizmo * | AddUniformScaleGizmo
(
UPrimitiveComponent* ScaleComponent, |
|
![]() ![]() |
void | Called at the start of a sequence of gizmo transform edits, for instance while dragging or manipulating the gizmo numerical UI. | |
![]() ![]() |
void | Clear the active target object for the Gizmo | |
![]() ![]() |
void | Called at the end of a sequence of gizmo transform edits. | |
![]() |
const TOptional< FTransform > & | ||
![]() ![]() |
ACombinedTransformGizmoActor * | ||
![]() |
ETransformGizmoSubElements | Gets the elements that this gizmo was initialized with. | |
![]() ![]() |
FTransform | ||
![]() ![]() ![]() |
bool | Exposes the return value of the current IsNonUniformScaleAllowed function so that, for instance, numerical UI can react appropriately. | |
![]() ![]() |
bool | IsVisible () |
|
![]() ![]() |
bool | PositionAxisDeltaSnapFunction
(
double AxisDelta, |
|
![]() ![]() |
bool | PositionSnapFunction
(
const FVector& WorldPosition, |
Axis and Plane TransformSources use these function to execute snapping queries. |
![]() |
void | ReinitializeGizmoTransform
(
const FTransform& NewTransform, |
Repositions the gizmo without issuing undo/redo changes, triggering callbacks, or moving any components. |
![]() ![]() |
bool | RotationAxisAngleSnapFunction
(
double AxisAngleDelta, |
|
![]() ![]() |
FQuat | RotationSnapFunction
(
const FQuat& DeltaRotation |
|
![]() ![]() |
void | SetActiveTarget
(
UTransformProxy* Target, |
Set the active target object for the Gizmo |
![]() ![]() |
void | SetDisallowNegativeScaling
(
bool bDisallow |
By default, the nonuniform scale components can scale negatively. |
![]() |
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. |
![]() ![]() |
void | SetGizmoActorBuilder
(
TSharedPtr< FCombinedTransformGizmoActorFactory > Builder |
|
![]() ![]() |
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. |
![]() ![]() |
void | SetNewChildScale
(
const FVector& NewChildScale |
Explicitly set the child scale. |
![]() ![]() |
void | SetNewGizmoTransform
(
const FTransform& NewTransform, |
Set a new position for the Gizmo. |
![]() ![]() |
void | SetSubGizmoBuilderIdentifiers
(
FString AxisPositionBuilderIdentifier, |
|
![]() ![]() |
void | SetUpdateCoordSystemFunction
(
TFunction< void(UPrimitiveComponent*, EToolContextCoordinateSystem)> CoordSysFunction |
|
![]() ![]() |
void | SetUpdateHoverFunction
(
TFunction< void(UPrimitiveComponent*, bool)> HoverFunction |
|
![]() ![]() |
void | SetVisibility
(
bool bVisible |
Set visibility for this Gizmo |
![]() ![]() |
void | ||
![]() ![]() |
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. |
![]() |
void | Internal function that updates CameraAxisSource by getting current view state from GizmoManager | |
![]() |
void | UpdateTransformDuringEditSequence
(
const FTransform& NewTransform, |
Updates the gizmo transform between Begin/EndTransformeditSequence calls. |
Overridden from UInteractiveGizmo
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Setup () |
Called by GizmoManager to initialize the Gizmo after GizmoBuilder::BuildGizmo() has been called |
![]() ![]() |
void | Shutdown () |
Called by GizmoManager to shut down the Gizmo |
![]() ![]() |
void | Tick
(
float DeltaTime |
Allow the Gizmo to do any necessary processing on Tick |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FSubGizmoInfo | FSubGizmoInfo stores the (UPrimitiveComponent,UInteractiveGizmo) pair for a sub-element of the widget. |
Typedefs
Name | Description |
---|---|
FOnClearActiveTarget | Broadcast at the beginning of a ClearActiveTarget call, when the ActiveTarget (if present) is not yet disconnected. |
FOnDisplaySpaceTransformChanged | Broadcast at the end of a SetDisplaySpaceTransform call that changes the display space transform. |
FOnSetActiveTarget | Broadcast at the end of a SetActiveTarget call. |
FOnVisibilityChanged | Broadcast at the end of a SetVisibility call if the visibility changes. |