![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
Classes | |
| struct | FInitMeshSubGizmoParams |
| struct | FTransformSubGizmoCommonParams |
| struct | FTransformSubGizmoSharedState |
This file holds implementation helpers that don't necessarily need exposing. If eventually needed, we can move some of these into GizmoUtil or TransformSubGizmoUtil
This file is meant for utilities that are specific to allowing gizmos to act as sub gizmos inside a UCombinedTransformGizmo.
| double UE::GizmoUtil::ClampRayOrigin | ( | const UGizmoViewContext * | InViewContext, |
| FVector & | InOutRayOrigin, | ||
| const FVector & | InRayDirection, | ||
| const double | InMaxDepth = UE_OLD_HALF_WORLD_MAX |
||
| ) |
Helper to ensure that the ray origin is not too far in orthographic views to avoid numerical imprecision later
| GizmoClass * UE::GizmoUtil::CreateGizmoViaSimpleBuilder | ( | UInteractiveGizmoManager * | GizmoManager, |
| const FString & | InstanceIdentifier, | ||
| void * | GizmoOwner | ||
| ) |
Template version of CreateGizmoViaSimpleBuilder that does a cast on return.
| UInteractiveGizmo * UE::GizmoUtil::CreateGizmoViaSimpleBuilder | ( | UInteractiveGizmoManager * | GizmoManager, |
| TSubclassOf< UInteractiveGizmo > | GizmoClass, | ||
| const FString & | InstanceIdentifier, | ||
| void * | Owner | ||
| ) |
Uses the gizmo manager to create a gizmo of the given class (assuming that the gizmo type does not need any special setup beyond instantiation) without having to register a custom builder for that class ahead of time.
This function lets the user bypass the need to define, register, and use a builder class, while still registering the gizmo properly with the gizmo manager. Under the hood, it creates and registers a temporary generic builder, uses it to make the gizmo, and then immediately deregisters the builder.
| UGizmoViewContext * UE::GizmoUtil::GetGizmoViewContext | ( | UInteractiveGizmoManager * | GizmoManager | ) |
Simple helper that gets the gizmo view context out of the context object store associated with a gizmo manager. Fires ensures if it does not find the expected objects along the way.
| FTransform UE::GizmoUtil::GetRotatedBasisTransform | ( | const FTransform & | TransformIn, |
| EAxis::Type | AxisToBeX | ||
| ) |
Rotates a transform such that its basis still lies along the cardinal axes but rotated in such a way that the given axis is in the X direction. For example, if you have a transform that makes a component work well as an X axis in a TRS gizmo, using this function with AxisToBeX set to Y will rotate the transform to work well as the Y axis, because the basis will have been rotated to be YZX.
| void UE::GizmoUtil::InitializeSubGizmoElementsWithMesh | ( | const FInitMeshSubGizmoParams & | Params, |
| TArray< TPair< ETransformGizmoSubElements, UViewAdjustedStaticMeshGizmoComponent * > > * | ElementComponentsOut = nullptr |
||
| ) |
Given a UCombinedTransformGizmo, swaps selected elements with custom meshes.
| ComponentsOut | Optional output array of newly created gizmo components, as pairs with the single element that they were created for. |
| bool UE::GizmoUtil::SetCommonSubGizmoProperties | ( | SubGizmoType * | Gizmo, |
| const UE::GizmoUtil::FTransformSubGizmoCommonParams & | Params, | ||
| UE::GizmoUtil::FTransformSubGizmoSharedState * | SharedState, | ||
| UGizmoScaledAndUnscaledTransformSources *& | TransformSourceOut | ||
| ) |
Helper that sets some common properties on sub gizmos, namely AxisSource, HitTarget, and StateTarget. Also returns a TransformSource, which typically gets wrapped up in a parameter source.
Template because the properties it manipulates aren't part of a base class. Perhaps they should be, but we have not needed that yet, other than this.
| EAxis::Type UE::GizmoUtil::ToAxis | ( | ETransformGizmoSubElements | Element | ) |
Given a single element, gives the axis that defines that element (e.g., x for TranslateAxisX or TranslatePlaneYZ, etc). Gives EAxis::None if the element is not a single element.
| bool UE::GizmoUtil::UpdateCameraAxisSource | ( | UGizmoConstantFrameAxisSource & | CameraAxisSource, |
| UInteractiveGizmoManager * | GizmoManager, | ||
| const FVector3d & | AxisOrigin | ||
| ) |
Helper to update an axis source that is based on the camera location, called from tick.