UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GizmoElementRectangle.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 "
BaseGizmos/GizmoElementLineBase.h
"
7
#include "
InputState.h
"
8
#include "
UObject/ObjectMacros.h
"
9
#include "GizmoElementRectangle.generated.h"
10
11
class
FPrimitiveDrawInterface
;
12
class
FMaterialRenderProxy
;
13
18
UCLASS
(
Transient
, MinimalAPI)
19
class
UGizmoElementRectangle
:
public
UGizmoElementLineBase
20
{
21
GENERATED_BODY
()
22
23
public
:
24
25
//~ Begin UGizmoElementBase Interface.
26
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
Render
(
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
//~ End UGizmoElementBase Interface.
29
30
// Location of rectangle center
31
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetCenter(
FVector
InCenter
);
32
INTERACTIVETOOLSFRAMEWORK_API
virtual
FVector
GetCenter()
const
;
33
34
// Width
35
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetWidth(
float
InWidth
);
36
INTERACTIVETOOLSFRAMEWORK_API
virtual
float
GetWidth()
const
;
37
38
// Height
39
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetHeight(
float
InHeight
);
40
INTERACTIVETOOLSFRAMEWORK_API
virtual
float
GetHeight()
const
;
41
42
// Up direction
43
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetUpDirection(
const
FVector
&
InUpDirection
);
44
INTERACTIVETOOLSFRAMEWORK_API
virtual
FVector
GetUpDirection()
const
;
45
46
// Side direction
47
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetSideDirection(
const
FVector
&
InSideDirection
);
48
INTERACTIVETOOLSFRAMEWORK_API
virtual
FVector
GetSideDirection()
const
;
49
50
// Draw mesh
51
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetDrawMesh(
bool
InDrawMesh
);
52
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
GetDrawMesh()
const
;
53
54
// Draw line
55
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetDrawLine(
bool
InDrawLine
);
56
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
GetDrawLine()
const
;
57
58
// Hit mesh
59
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetHitMesh(
bool
InHitMesh
);
60
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
GetHitMesh()
const
;
61
62
// Hit line
63
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetHitLine(
bool
InHitLine
);
64
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
GetHitLine()
const
;
65
66
protected
:
67
68
// Location of rectangle center
69
UPROPERTY
()
70
FVector
Center
=
FVector
::ZeroVector;
71
72
// Width
73
UPROPERTY
()
74
float
Width = 1.0f;
75
76
// Height
77
UPROPERTY
()
78
float
Height = 1.0f;
79
80
// Up direction
81
UPROPERTY
()
82
FVector
UpDirection =
FVector
(0.0f, 0.0f, 1.0f);
83
84
// Side direction
85
UPROPERTY
()
86
FVector
SideDirection =
FVector
(0.0f, 1.0f, 0.0f);
87
88
UPROPERTY
()
89
bool
bDrawMesh =
true
;
90
91
UPROPERTY
()
92
bool
bDrawLine =
false
;
93
94
UPROPERTY
()
95
bool
bHitMesh =
true
;
96
97
UPROPERTY
()
98
bool
bHitLine =
false
;
99
};
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
InputState.h
ELevelInstancePivotType::Center
@ Center
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
EBulkReregister::RenderState
@ RenderState
FMaterialRenderProxy
Definition
MaterialRenderProxy.h:102
FPrimitiveDrawInterface
Definition
PrimitiveDrawInterface.h:19
IToolsContextRenderAPI
Definition
ToolContextInterfaces.h:427
UGizmoElementLineBase
Definition
GizmoElementLineBase.h:18
UGizmoElementRectangle
Definition
GizmoElementRectangle.h:20
UGizmoViewContext
Definition
GizmoViewContext.h:20
false
@ false
Definition
radaudio_common.h:23
FInputRayHit
Definition
InputState.h:52
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
GizmoElementRectangle.h
Generated by
1.9.8