Navigation
Unreal Engine C++ API Reference > Plugins > ModelingComponents > Transforms
Inheritance Hierarchy
- TSharedFromThis
- FTransformGizmoDataBinder
References
Module | ModelingComponents |
Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Transforms/TransformGizmoDataBinder.h |
Include | #include "Transforms/TransformGizmoDataBinder.h" |
Syntax
class FTransformGizmoDataBinder : public TSharedFromThis< FTransformGizmoDataBinder, ESPMode::ThreadSafe >
Remarks
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..
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TFunction< FVector3d(const FVector3d &UIValues)> | ActualToBoundConversion | See comment for SetTranslationConversionFunctions. |
![]() |
bool | bCurrentGizmoLacksDegreeOfFreedom | If a gizmo doesn't have all three axes and is not aligned to world (i.e. is in local mode) then we currently require a reference transform to allow the user to be in destination mode. |
![]() |
bool | bCurrentGizmoOnlyHasUniformScale | |
![]() |
bool | bGizmoIsBeingDragged | |
![]() |
bool | bIgnoreCallbackForDebouncing | Used for debouncing when editing the gizmo via the UI. |
![]() |
bool | bInDataEditSequence | Additional state that lets us respond appropriately to various notifications. |
![]() |
FVector3d * | BoundEulerAngles | |
![]() |
TSet< TWeakObjectPtr< UCombinedTransformGizmo > > | BoundGizmos | All the gizmos the numerical UI can correspond to. |
![]() |
FVector3d * | BoundScale | |
![]() |
TFunction< FVector3d(const FVector3d &UIValues)> | BoundToActualConversion | |
![]() |
FVector3d * | BoundTranslation | |
![]() |
bool | bUsingDeltaMode | Controls delta mode, where the gizmo specifies a difference from some start transform. |
![]() |
TArray< TWeakObjectPtr< UCombinedTransformGizmoContextObject > > | ContextObjectsToUnregisterWith | Used to clean up our registration with context object when being destroyed. |
![]() |
TOptional< FTransform > | CurrentCustomLocalReferenceTransform | Reference transform to use when in local gizmo mode. |
![]() |
TWeakObjectPtr< UCombinedTransformGizmo > | CurrentlyTrackedGizmo | Gizmo to which the values are currently bound. |
![]() |
TOptional< FTransform > | DefaultCustomLocalReferenceTransform | Reference transform to use in local gizmo mode by default. |
![]() |
FTransform | DeltaStartTransform | |
![]() |
EToolContextCoordinateSystem | LastCoordinateSystem | Used to determine whether the current gizmo's coordinate system has changed, when we receive an UpdateCoordinateSystem() call. |
![]() |
FVector3d | LastEulerAngles | |
![]() |
FVector3d | LastScale | |
![]() |
FVector3d | LastTranslation | Used to detect whether anything actually changed. |
![]() |
FOnTrackedGizmoChanged | OnTrackedGizmoChanged | |
![]() |
FVector3d | ProportionalDragInitialVector | Used when we only allow uniform scaling, to scale everything proportionally. |
![]() |
FVector3d[3] | VectorsToUseIfUnbound |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Should be called at the beginning of a sequence of UpdateAfterDataEdit calls, for instance if the bound values are being scrubbed in a display. | |
![]() ![]() |
void | BindToGizmoContextObject
(
UCombinedTransformGizmoContextObject* ContextObject |
Makes it so that the gizmo binder attaches to any gizmos created by the context object in the future. |
![]() ![]() |
void | BindToInitializedGizmo
(
UCombinedTransformGizmo* Gizmo, |
Binds to a specific gizmo for tracking. |
![]() |
void | BindToUninitializedGizmo
(
UCombinedTransformGizmo* Gizmo |
Used for binding to context object, called from the OnGizmoCreated delegate. |
![]() |
void | Should be called at the end of a sequence of UpdateAfterDataEdit calls, for instance if the bound values are being scrubbed in a display. | |
![]() |
FTransform | GetGizmoTransformFromDataValues
(
bool bLocalCoordinates |
|
![]() ![]() |
bool | Determines whether there is a visible currently tracked gizmo. | |
![]() ![]() |
void | InitializeBoundVectors
(
FVector3d* Translation, |
Set the vectors that should reflect the gizmo transform. |
![]() ![]() |
bool | In delta mode, the bound values hold the difference of the current gizmo transform relative to some previous start transform. | |
![]() |
void | OnDisplaySpaceTransformChanged
(
UCombinedTransformGizmo* Gizmo, |
|
![]() |
void | OnGizmoVisibilityChanged
(
UCombinedTransformGizmo* Gizmo, |
|
![]() |
void | OnProxyBeginTransformEdit
(
UTransformProxy* TransformProxy, |
Used in binding to gizmos. |
![]() |
void | OnProxyEndTransformEdit
(
UTransformProxy* TransformProxy, |
|
![]() |
void | OnProxyTransformChanged
(
UTransformProxy* TransformProxy, |
|
![]() ![]() |
void | Reset () |
Unbinds from everything |
![]() ![]() |
void | Much like SetToDeltaMode, but uses the current gizmo transform as the start transform, meaning that the bound data values will be reset to zero. | |
![]() |
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. |
![]() ![]() |
void | SetToDeltaMode
(
const FTransform& StartTransform |
Sets to delta mode with given start transform. |
![]() ![]() |
void | Sets to destination mode (as opposed to delta mode). | |
![]() ![]() |
void | SetTrackedGizmo
(
UCombinedTransformGizmo* Gizmo |
Changes which gizmo is being tracked, out of those to which the data binder has been bound to via BindToInitializedGizmo(). |
![]() ![]() |
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. |
![]() ![]() |
bool | If the gizmo doesn't have all three axes, then it likely needs to stay constrained in some plane/line. | |
![]() ![]() |
void | UnbindFromGizmo
(
UCombinedTransformGizmo* Gizmo, |
Unbinds from a given gizmo. |
![]() |
void | Called to update the gizmo after updating the bound data. | |
![]() ![]() |
void | Can either be called on tick or in response to some broadcast to allow the binder to respond to coordinate system changes. | |
![]() |
void |
Typedefs
Name | Description |
---|---|
FOnTrackedGizmoChanged | Broadcast whenever the tracked gizmo is changed (because one of multiple gizmos is dragged, or a new gizmo appears after no others are present). |