UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GizmoElementRenderState.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/Object.h"
10#include "GizmoElementRenderState.generated.h"
11
12
13//
14// Structs used to store gizmo element render state.
15//
16
17//
18// Color state attribute struct
19//
20// Stores color state value, whether state is set and whether it overrides child state.
21//
22USTRUCT()
24{
26
27 static constexpr FLinearColor DefaultColor = FLinearColor(1.0f, 1.0f, 1.0f);
28
29 // Color value
30 UPROPERTY()
31 FLinearColor Value = DefaultColor;
32
33 // True if value has been set.
34 UPROPERTY()
35 bool bHasValue = false;
36
37 // True if this attribute overrides child state attributes
38 UPROPERTY()
39 bool bOverridesChildState = false;
40
41 // Return the color value. This returns the default color value if no value has been set.
43
44 // Set color value and override flag
46
47 // Reset attribute to default values.
49
50 // Update this state based on a child state attribute.
52};
53
54//
55// Material state attribute struct
56//
57// Stores material state value, whether state is set and whether it overrides child state.
58//
59USTRUCT()
61{
63
64 // Material value
65 UPROPERTY()
67
68 // True if this attribute overrides child state attributes
69 UPROPERTY()
70 bool bOverridesChildState = false;
71
72 // Return the material value.
73 INTERACTIVETOOLSFRAMEWORK_API const UMaterialInterface* GetMaterial() const;
74
75 // Return the material value.
77
78 // Set material value and override flag
80
81 // Reset attribute to default values.
83
84 // Update this state based on a child state attribute.
86};
87
88//
89// Mesh render state structure.
90//
91USTRUCT()
93{
95
96 // Default material
97 UPROPERTY()
99
100 // Hover material
101 UPROPERTY()
103
104 // Interact material
105 UPROPERTY()
107
108 // Select material
109 UPROPERTY()
111
112 // Subdue material
113 UPROPERTY()
115
116 // Mesh vertex color
117 UPROPERTY()
119
120 // Hover mesh vertex color
121 UPROPERTY()
123
124 // Interact mesh vertex color
125 UPROPERTY()
126 FGizmoElementColorAttribute InteractVertexColor;
127
128 // Select mesh vertex color
129 UPROPERTY()
131
132 // Subdue mesh vertex color
133 UPROPERTY()
135
136 // Returns the material corresponding to the input interaction state
138
139 // Returns the material corresponding to the input interaction state
140 INTERACTIVETOOLSFRAMEWORK_API const UMaterialInterface* GetMaterial(EGizmoElementInteractionState InteractionState) const;
141
142 // Returns mesh vertex color
144
145 // Returns mesh vertex color
146 INTERACTIVETOOLSFRAMEWORK_API FLinearColor GetVertexColor(EGizmoElementInteractionState InteractionState) const;
147
148 // Update this mesh render state based on a child mesh render state attribute.
150
151private:
152 // Returns the material corresponding to the input interaction state
153 const UMaterialInterface* GetMaterialInternal(EGizmoElementInteractionState InteractionState) const;
154
155 // Returns mesh vertex color
156 FLinearColor GetVertexColorInternal(EGizmoElementInteractionState InteractionState) const;
157};
158
159//
160// Line render state structure.
161//
162USTRUCT()
164{
166
167 // Line color
168 UPROPERTY()
170
171 // Hover line color
172 UPROPERTY()
174
175 // Interact line color
176 UPROPERTY()
178
179 // Select line color
180 UPROPERTY()
182
183 // Subdue line color
184 UPROPERTY()
186
187 // Returns the line color corresponding to the input interaction state
189
190 // Update this line render state based on a child mesh render state attribute.
192};
193
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EGizmoElementInteractionState
Definition GizmoElementShared.h:28
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
Definition MaterialInterface.h:296
@ false
Definition radaudio_common.h:23
Definition GizmoElementRenderState.h:24
Definition GizmoElementRenderState.h:164
Definition GizmoElementRenderState.h:61
Definition GizmoElementRenderState.h:93
Definition Color.h:48
Definition WeakObjectPtrTemplates.h:25