Navigation
API > API/Plugins > API/Plugins/ModelingComponents
Helper class for binding a UCombinedTransformGizmo to several FVector3d's such that they are updated when the gizmo is changed, and the gizmo is updated from the vectors if the approriate function is called. The vectors can serve as a display of the gizmo's values, and if they are made modifiable, they can serve as a numerical control of the gizmo.
To use, just call InitializeBoundVectors with 3 vectors (it can be fewer, but the binder currently does the same amount of work regardless of whether 3 or fewer are bound), and then either call BindToGizmoContextObject with the context object that will be used to create the gizmos (in which case the vectors will bind to all newly created gizmos, and will switch bindings as different gizmos are dragged), or just bind to a particular gizmo using BindToInitializedGizmo after its SetActiveTarget call has been made..
| Name | FTransformGizmoDataBinder |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Transforms/TransformGizmoDataBinder.h |
| Include Path | #include "Transforms/TransformGizmoDataBinder.h" |
Syntax
class FTransformGizmoDataBinder : public TSharedFromThis< FTransformGizmoDataBinder, ESPMode::ThreadSafe >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FTransformGizmoDataBinder
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FTransformGizmoDataBinder() |
Transforms/TransformGizmoDataBinder.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnTrackedGizmoChanged | TMulticastDelegate_OneParam< void, UCombinedTransformGizmo * > | Broadcast whenever the tracked gizmo is changed (because one of multiple gizmos is dragged, or a new gizmo appears after no others are present). | Transforms/TransformGizmoDataBinder.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnTrackedGizmoChanged | FOnTrackedGizmoChanged | Transforms/TransformGizmoDataBinder.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAvoidDestinationModeWhenUnsafe | bool | Transforms/TransformGizmoDataBinder.h | ||
| bChangeDisplayedGizmoOnDrag | bool | Transforms/TransformGizmoDataBinder.h | ||
| bEnforceUniformScaleConstraintsIfPresent | bool | Transforms/TransformGizmoDataBinder.h | ||
| bTriggerSequenceBookendsForNonSequenceUpdates | bool | Currently we don't expose any of these because it is not clear whether we want them to be customizable. | Transforms/TransformGizmoDataBinder.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BeginDataEditSequence() |
Should be called at the beginning of a sequence of UpdateAfterDataEdit calls, for instance if the bound values are being scrubbed in a display. | Transforms/TransformGizmoDataBinder.h | |
virtual void BindToGizmoContextObject
(
UCombinedTransformGizmoContextObject* ContextObject |
Makes it so that the gizmo binder attaches to any gizmos created by the context object in the future. | Transforms/TransformGizmoDataBinder.h | |
virtual void BindToInitializedGizmo
(
UCombinedTransformGizmo* Gizmo, |
Binds to a specific gizmo for tracking. | Transforms/TransformGizmoDataBinder.h | |
void EndDataEditSequence() |
Should be called at the end of a sequence of UpdateAfterDataEdit calls, for instance if the bound values are being scrubbed in a display. | Transforms/TransformGizmoDataBinder.h | |
virtual bool HasVisibleGizmo() |
Determines whether there is a visible currently tracked gizmo. | Transforms/TransformGizmoDataBinder.h | |
virtual void InitializeBoundVectors
(
FVector3d* Translation, |
Set the vectors that should reflect the gizmo transform. | Transforms/TransformGizmoDataBinder.h | |
virtual bool IsInDeltaMode () |
In delta mode, the bound values hold the difference of the current gizmo transform relative to some previous start transform. | Transforms/TransformGizmoDataBinder.h | |
virtual void Reset() |
Unbinds from everything | Transforms/TransformGizmoDataBinder.h | |
virtual void ResetToDeltaMode() |
Much like SetToDeltaMode, but uses the current gizmo transform as the start transform, meaning that the bound data values will be reset to zero. | Transforms/TransformGizmoDataBinder.h | |
void SetDefaultLocalReferenceTransform
(
TOptional< FTransform > DefaultTransform |
In local coordinate destination mode, when a DisplaySpaceTransform is not available on the gizmo, this default transform can be used instead. | Transforms/TransformGizmoDataBinder.h | |
virtual void SetToDeltaMode
(
const FTransform& StartTransform |
Sets to delta mode with given start transform. | Transforms/TransformGizmoDataBinder.h | |
virtual void SetToDestinationMode () |
Sets to destination mode (as opposed to delta mode). | Transforms/TransformGizmoDataBinder.h | |
virtual void SetTrackedGizmo
(
UCombinedTransformGizmo* Gizmo |
Changes which gizmo is being tracked, out of those to which the data binder has been bound to via BindToInitializedGizmo(). | Transforms/TransformGizmoDataBinder.h | |
virtual void SetTranslationConversionFunctions
(
TFunction< FVector3d(const FVector3d&InternalValue)> ActualToBoundConversionIn, |
Allows the data bound to the translation component to be stored in different units than used by the gizmo. | Transforms/TransformGizmoDataBinder.h | |
virtual bool ShouldDestinationModeBeAllowed () |
If the gizmo doesn't have all three axes, then it likely needs to stay constrained in some plane/line. | Transforms/TransformGizmoDataBinder.h | |
virtual void UnbindFromGizmo
(
UCombinedTransformGizmo* Gizmo, |
Unbinds from a given gizmo. | Transforms/TransformGizmoDataBinder.h | |
void UpdateAfterDataEdit () |
Called to update the gizmo after updating the bound data. | Transforms/TransformGizmoDataBinder.h | |
virtual void UpdateCoordinateSystem () |
Can either be called on tick or in response to some broadcast to allow the binder to respond to coordinate system changes. | Transforms/TransformGizmoDataBinder.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BindToUninitializedGizmo
(
UCombinedTransformGizmo* Gizmo |
Used for binding to context object, called from the OnGizmoCreated delegate. | Transforms/TransformGizmoDataBinder.h | |
FTransform GetGizmoTransformFromDataValues
(
bool bLocalCoordinates |
Transforms/TransformGizmoDataBinder.h | ||
void OnDisplaySpaceTransformChanged
(
UCombinedTransformGizmo* Gizmo, |
Transforms/TransformGizmoDataBinder.h | ||
void OnGizmoVisibilityChanged
(
UCombinedTransformGizmo* Gizmo, |
Transforms/TransformGizmoDataBinder.h | ||
void OnProxyBeginTransformEdit
(
UTransformProxy* TransformProxy, |
Used in binding to gizmos. | Transforms/TransformGizmoDataBinder.h | |
void OnProxyEndTransformEdit
(
UTransformProxy* TransformProxy, |
Transforms/TransformGizmoDataBinder.h | ||
void OnProxyTransformChanged
(
UTransformProxy* TransformProxy, |
Transforms/TransformGizmoDataBinder.h | ||
void UpdateDataValuesFromGizmo() |
Transforms/TransformGizmoDataBinder.h |