UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GizmoElementGroup.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 "
UObject/ObjectMacros.h
"
7
#include "
BaseGizmos/GizmoElementLineBase.h
"
8
#include "
InputState.h
"
9
#include "GizmoElementGroup.generated.h"
10
15
UCLASS
(
Transient
, Abstract, MinimalAPI)
16
class
UGizmoElementGroupBase
:
public
UGizmoElementLineBase
17
{
18
GENERATED_BODY
()
19
20
friend
class
FGizmoElementAccessor
;
21
22
public
:
23
24
//~ Begin UGizmoElementBase Interface.
25
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
Render
(
IToolsContextRenderAPI
*
RenderAPI
, const
FRenderTraversalState
&
RenderState
)
override
;
26
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
DrawHUD(
FCanvas
* Canvas,
IToolsContextRenderAPI
*
RenderAPI
, const
FRenderTraversalState
&
RenderState
)
override
;
27
INTERACTIVETOOLSFRAMEWORK_API
virtual
FInputRayHit
LineTrace(const
UGizmoViewContext
*
ViewContext
, const
FLineTraceTraversalState
&
LineTraceState
, const
FVector
& RayOrigin, const
FVector
& RayDirection,
FLineTraceOutput
&
OutLineTraceOutput
)
override
;
28
29
// Sets the part identifier for this element and all of its children whose current ID is 0/Default.
30
using
UGizmoElementBase
::SetPartIdentifier;
31
32
// Sets the part identifier for this element and all of its children whose current ID is 0/Default.
33
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetPartIdentifier(
uint32
InPartId
, const
bool
bInOverrideUnsetChildren
, const
bool
bInOverrideSet
=
true
)
override
;
34
35
// Returns the element associated with the specified part id, or nullptr if not found.
36
INTERACTIVETOOLSFRAMEWORK_API
virtual
UGizmoElementBase
* FindPartElement(const
uint32
InPartId
)
override
;
37
38
// Returns the element associated with the specified part id, or nullptr if not found.
39
INTERACTIVETOOLSFRAMEWORK_API
virtual
const
UGizmoElementBase
* FindPartElement(const
uint32
InPartId
) const
override
;
40
41
// Get the (top-level) sub-elements, if any.
42
INTERACTIVETOOLSFRAMEWORK_API
virtual
TConstArrayView
<
TObjectPtr
<
UGizmoElementBase
>> GetSubElements() const
override
;
43
44
// Update group and contained elements' visibility state for elements in specified gizmo parts, return true if part was found.
45
// Setting bAllowMultipleElements to true will allow multiple elements with the same Part Id to be updated.
46
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
UpdatePartVisibleState(
bool
bVisible,
uint32
InPartIdentifier
,
bool
bInAllowMultipleElements
=
false
)
override
;
47
48
// Get element's visible state for element associated with the specified gizmo part, if part was found.
49
INTERACTIVETOOLSFRAMEWORK_API
virtual
TOptional
<
bool
> GetPartVisibleState(
uint32
InPartIdentifier
) const
override
;
50
51
// Update group and contained elements' hittable state for elements in specified gizmo parts, return true if part was found.
52
// Setting bAllowMultipleElements to true will allow multiple elements with the same Part Id to be updated.
53
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
UpdatePartHittableState(
bool
bHittable
,
uint32
InPartIdentifier
,
bool
bInAllowMultipleElements
=
false
)
override
;
54
55
// Get element's hittable state for element associated with the specified gizmo part, if part was found.
56
INTERACTIVETOOLSFRAMEWORK_API
virtual
TOptional
<
bool
> GetPartHittableState(
uint32
InPartIdentifier
) const
override
;
57
58
// Update group and contained elements' interaction state for elements in specified gizmo parts, return true if part was found.
59
// Setting bAllowMultipleElements to true will allow multiple elements with the same Part Id to be updated.
60
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
UpdatePartInteractionState(
EGizmoElementInteractionState
InInteractionState
,
uint32
InPartIdentifier
,
bool
bInAllowMultipleElements
=
false
)
override
;
61
62
// Get element's interaction state for element associated with the specified gizmo part, if part was found.
63
INTERACTIVETOOLSFRAMEWORK_API
virtual
TOptional
<
EGizmoElementInteractionState
> GetPartInteractionState(
uint32
InPartIdentifier
) const
override
;
64
65
// When true, maintains view-dependent constant scale for this gizmo object hierarchy
66
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetConstantScale(
bool
InConstantScale
);
67
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
GetConstantScale() const;
68
69
// Set whether this group should be treated as a hit owner and its part identifier returned when any of its sub-elements are hit.
70
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetHitOwner(
bool
bInHitOwner
);
71
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
GetHitOwner() const;
72
73
protected
:
74
75
// Add object to group.
76
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
Add
(
UGizmoElementBase
*
InElement
);
77
78
// Remove object from group, if it exists
79
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
Remove
(
UGizmoElementBase
*
InElement
);
80
81
protected
:
82
83
// When true, maintains view-dependent constant scale for this gizmo object hierarchy
84
UPROPERTY
()
85
bool
bConstantScale =
false
;
86
87
// When true, this group is treated as a single element such that when LineTrace is called, if any of its sub-elements is hit,
88
// this group will be returned as the owner of the hit. This should be used when a group of elements should be treated as a single handle.
89
UPROPERTY
()
90
bool
bHitOwner =
false
;
91
92
// Gizmo elements within this group
93
UPROPERTY
()
94
TArray
<
TObjectPtr
<
UGizmoElementBase
>> Elements;
95
96
// Updates input transform's scale component to have uniform scale and applies constant scale if bConstantScale is true
97
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
ApplyUniformConstantScaleToTransform(
double
PixelToWorldScale,
FTransform
&
InOutLocalToWorldTransform
) const;
98
99
// Updates input transform's scale component to have uniform scale and applies constant scale if bConstantScale or bInForceApply is true
100
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
ApplyUniformConstantScaleToTransform(
double
PixelToWorldScale,
FTransform
&
InOutLocalToWorldTransform
, const
bool
bInForceApply
) const;
101
};
102
107
UCLASS
(
Transient
, MinimalAPI)
108
class
UGizmoElementGroup
:
public
UGizmoElementGroupBase
109
{
110
GENERATED_BODY
()
111
112
public
:
113
114
// Add object to group.
115
using
UGizmoElementGroupBase::Add
;
116
117
// Remove object from group, if it exists
118
using
UGizmoElementGroupBase::Remove
;
119
};
EModifyCurveApplyMode::Add
@ Add
CoreMinimal.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EPackageAutoSaveType::Transient
@ Transient
true
return true
Definition
ExternalRpcRegistry.cpp:601
GizmoElementLineBase.h
EGizmoElementInteractionState
EGizmoElementInteractionState
Definition
GizmoElementShared.h:28
InputState.h
ObjectMacros.h
UPROPERTY
#define UPROPERTY(...)
UObject definition macros.
Definition
ObjectMacros.h:744
GENERATED_BODY
#define GENERATED_BODY(...)
Definition
ObjectMacros.h:765
UCLASS
#define UCLASS(...)
Definition
ObjectMacros.h:776
EOpenGLFormatCapabilities::Render
@ Render
EOverriddenPropertyOperation::Remove
@ Remove
EBulkReregister::RenderState
@ RenderState
uint32
uint32_t uint32
Definition
binka_ue_file_header.h:6
FCanvas
Definition
CanvasTypes.h:211
FGizmoElementAccessor
Definition
GizmoUtil.h:19
IToolsContextRenderAPI
Definition
ToolContextInterfaces.h:427
TArray
Definition
Array.h:670
UGizmoElementBase
Definition
GizmoElementBase.h:26
UGizmoElementGroupBase
Definition
GizmoElementGroup.h:17
UGizmoElementGroupBase::Remove
virtual INTERACTIVETOOLSFRAMEWORK_API void Remove(UGizmoElementBase *InElement)
Definition
GizmoElementGroup.cpp:292
UGizmoElementGroupBase::Add
virtual INTERACTIVETOOLSFRAMEWORK_API void Add(UGizmoElementBase *InElement)
Definition
GizmoElementGroup.cpp:284
UGizmoElementGroup
Definition
GizmoElementGroup.h:109
UGizmoElementLineBase
Definition
GizmoElementLineBase.h:18
UGizmoViewContext
Definition
GizmoViewContext.h:20
false
@ false
Definition
radaudio_common.h:23
FInputRayHit
Definition
InputState.h:52
TObjectPtr
Definition
ObjectPtr.h:488
TOptional
Definition
Optional.h:131
UE::Math::TTransform< double >
UE::Math::TVector< double >
UGizmoElementBase::FLineTraceOutput
Definition
GizmoElementBase.h:125
UGizmoElementBase::FLineTraceTraversalState
Definition
GizmoElementBase.h:96
UGizmoElementBase::FRenderTraversalState
Definition
GizmoElementBase.h:52
Engine
Source
Runtime
InteractiveToolsFramework
Public
BaseGizmos
GizmoElementGroup.h
Generated by
1.9.8