UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GizmoInterfaces.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "InputState.h"
7#include "Math/Transform.h"
9#include "Math/Vector2D.h"
11#include "UObject/Interface.h"
14
15#include "GizmoInterfaces.generated.h"
16
18class UObject;
19struct FFrame;
20
21
22//
23// UInterfaces for the various UObjects used in the Standard Gizmo Library.
24//
25
26
27
28UINTERFACE(MinimalAPI)
37{
39public:
40 UFUNCTION()
42
43 UFUNCTION()
44 virtual void SetTransform(const FTransform& NewTransform) = 0;
45};
46
47
48
49
50
51UINTERFACE(MinimalAPI)
64{
66public:
68 UFUNCTION()
69 virtual FVector GetOrigin() const = 0;
70
72 UFUNCTION()
73 virtual FVector GetDirection() const = 0;
74
76 UFUNCTION()
77 virtual bool HasTangentVectors() const { return false; }
78
82 UFUNCTION()
83 virtual void GetTangentVectors(FVector& TangentXOut, FVector& TangentYOut) const { }
84
85
90 INTERACTIVETOOLSFRAMEWORK_API void GetAxisFrame(
92};
93
94
95
96
97
98
99UINTERFACE(MinimalAPI)
108{
110public:
114 //UFUNCTION() // FInputDeviceRay is not USTRUCT because FRay is not USTRUCT
115 virtual FInputRayHit IsHit(const FInputDeviceRay& ClickPos) const = 0;
116
117 /*
118 * Updates the hover state indicating whether the input device is currently hovering over the Standard gizmo.
119 * This should be be set to false once interaction with the gizmo commences.
120 */
121 UFUNCTION()
122 virtual void UpdateHoverState(bool bHovering) = 0;
123
124 /*
125 * Updates the interacting state indicating when interaction with the Standard gizmo is actively occurring,
126 * typically upon the input device clicking and dragging the Standard gizmo.
127 */
128 UFUNCTION()
129 virtual void UpdateInteractingState(bool bInteracting) = 0;
130
131 /*
132 * Updates the selected state, indicating when the gizmo is currently selected,
133 * typically upon the input device clicking the Standard gizmo.
134 */
135 UFUNCTION()
136 virtual void UpdateSelectedState(bool bSelected) = 0;
137
138 /*
139 * Updates the subdued state, indicating when the element should have a subdued/background appearance,
140 * typically upon interacting with one of a set of gizmos representing 3 axis - the two not interacted with would be subdued.
141 */
142 UFUNCTION()
143 virtual void UpdateSubdueState(bool bSubdued) = 0;
144};
145
146UINTERFACE(MinimalAPI)
161{
163public:
168 //UFUNCTION() // FInputDeviceRay is not USTRUCT because FRay is not USTRUCT
169 virtual FInputRayHit IsHit(const FInputDeviceRay& ClickPos) const = 0;
170
171 /*
172 * Updates the hover state of the specified gizmo part, indicating whether the input device is currently hovering
173 * over the Standard gizmo.
174 */
175 UFUNCTION()
176 virtual void UpdateHoverState(bool bHovering, uint32 InPartIdentifier) = 0;
177
178 /*
179 * Updates the interacting state of the specified gizmo part, indicating when interaction with the
180 * Standard gizmo is actively occurring, typically upon the input device clicking and dragging the Standard gizmo.
181 */
182 UFUNCTION()
183 virtual void UpdateInteractingState(bool bInteracting, uint32 InPartIdentifier) = 0;
184
185 /*
186 * Updates the selected state of the specified gizmo part, indicating when the gizmo part is currently selected,
187 * typically upon the input device clicking the Standard gizmo.
188 */
189 UFUNCTION()
190 virtual void UpdateSelectedState(bool bSelected, uint32 InPartIdentifier) = 0;
191
192 /*
193 * Updates the subdued state of the specified gizmo part, indicating when the element should have a subdued/background appearance,
194 * typically upon interacting with one of a set of gizmos representing 3 axis - the two not interacted with would be subdued.
195 */
196 UFUNCTION()
197 virtual void UpdateSubdueState(bool bSubdued, uint32 InPartIdentifier) = 0;
198
199 /*
200 * Updates the hittable state of the specified gizmo part.
201 */
202 UFUNCTION()
203 virtual void UpdateHittableState(bool bHittable, uint32 InPartIdentifier) = 0;
204};
205
206
207
208
209UINTERFACE(MinimalAPI)
214
219{
221public:
225 virtual void Render(IToolsContextRenderAPI* RenderAPI) const = 0;
226};
227
228
229
230
231UINTERFACE(MinimalAPI)
236
247{
249public:
253 virtual void Render(IToolsContextRenderAPI* RenderAPI) const = 0;
254
255 /*
256 * Updates the visibility state of the specified gizmo part.
257 */
258 UFUNCTION()
259 virtual void UpdateVisibilityState(bool bVisible, uint32 InPartIdentifier) = 0;
260};
261
262
263UINTERFACE(MinimalAPI)
272{
274public:
278 UFUNCTION()
279 virtual void BeginUpdate() = 0;
280
284 UFUNCTION()
285 virtual void EndUpdate() = 0;
286};
287
288
289
290
291
292UINTERFACE(MinimalAPI)
301{
303public:
304
306 UFUNCTION()
307 virtual float GetParameter() const = 0;
308
310 UFUNCTION()
311 virtual void BeginModify() = 0;
312
314 UFUNCTION()
315 virtual void SetParameter(float NewValue) = 0;
316
318 UFUNCTION()
319 virtual void EndModify() = 0;
320};
321
322
323
324
325UINTERFACE(MinimalAPI)
334{
336public:
337
339 UFUNCTION()
340 virtual FVector2D GetParameter() const = 0;
341
343 UFUNCTION()
344 virtual void BeginModify() = 0;
345
347 UFUNCTION()
348 virtual void SetParameter(const FVector2D& NewValue) = 0;
349
351 UFUNCTION()
352 virtual void EndModify() = 0;
353};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UINTERFACE(...)
Definition ObjectMacros.h:780
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition GizmoInterfaces.h:64
Definition GizmoInterfaces.h:161
virtual FInputRayHit IsHit(const FInputDeviceRay &ClickPos) const =0
Definition GizmoInterfaces.h:108
virtual FInputRayHit IsHit(const FInputDeviceRay &ClickPos) const =0
Definition GizmoInterfaces.h:301
Definition GizmoInterfaces.h:247
virtual void Render(IToolsContextRenderAPI *RenderAPI) const =0
Definition GizmoInterfaces.h:219
virtual void Render(IToolsContextRenderAPI *RenderAPI) const =0
Definition GizmoInterfaces.h:272
Definition GizmoInterfaces.h:37
virtual void SetTransform(const FTransform &NewTransform)=0
virtual FTransform GetTransform() const =0
Definition GizmoInterfaces.h:334
Definition ToolContextInterfaces.h:427
Definition GizmoInterfaces.h:53
Definition GizmoInterfaces.h:148
Definition GizmoInterfaces.h:101
Definition GizmoInterfaces.h:294
Definition GizmoInterfaces.h:233
Definition GizmoInterfaces.h:211
Definition GizmoInterfaces.h:265
Definition GizmoInterfaces.h:30
Definition GizmoInterfaces.h:327
Definition Interface.h:19
Definition Object.h:95
Definition Stack.h:114
Definition InputState.h:367
Definition InputState.h:52