UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GizmoElementArrowHead.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "GizmoElementBase.h"
6#include "GizmoElementGroup.h"
7
8#include "GizmoElementArrowHead.generated.h"
9
13
14UENUM()
16{
17 None,
18 Cone,
19 Cube,
20 Sphere
21};
22
27UCLASS(Transient, MinimalAPI)
29{
31
32public:
34
35 //~ Begin UGizmoElementBase Interface.
38 //~ End UGizmoElementBase Interface.
39
40 // Location of center of the arrow head
43
44 // Arrow direction.
45 INTERACTIVETOOLSFRAMEWORK_API virtual void SetDirection(const FVector& InDirection);
46 INTERACTIVETOOLSFRAMEWORK_API virtual FVector GetDirection() const;
47
48 // Arrow side direction for box head.
49 INTERACTIVETOOLSFRAMEWORK_API virtual void SetSideDirection(const FVector& InSideDirection);
50 INTERACTIVETOOLSFRAMEWORK_API virtual FVector GetSideDirection() const;
51
52 // Arrow head length, used for both cone and cube head.
53 INTERACTIVETOOLSFRAMEWORK_API virtual void SetLength(float InLength);
54 INTERACTIVETOOLSFRAMEWORK_API virtual float GetLength() const;
55
56 // Arrow head radius, if cone or sphere.
58 INTERACTIVETOOLSFRAMEWORK_API virtual float GetRadius() const;
59
60 // Number of sides for cylinder and cone, if relevant.
63
64 // Head type cone or cube.
67
68 // Pixel hit distance threshold, element will be scaled enough to add this threshold when line-tracing.
70
71 // Hit Mask Gizmo element used for adaptive pixel hit threshold
73
74protected:
75
76 // Update the appropriate shape based on parameters
78
79protected:
80
81 // Flag indicating properties need to be updated prior to render
82 bool bUpdate = true;
83
84 // Cone head
85 UPROPERTY()
87
88 // Box head
89 UPROPERTY()
91
92 // Sphere head
93 UPROPERTY()
95
96 // Location of center
97 UPROPERTY()
98 FVector Center = FVector::ZeroVector;
99
100 // Direction of arrow axis
101 UPROPERTY()
102 FVector Direction = FVector(0.0f, 0.0f, 1.0f);
103
104 // Side direction for box
105 UPROPERTY()
106 FVector SideDirection = FVector(0.0f, 1.0f, 0.0f);
107
108 // Length of head, cone or box
109 UPROPERTY()
110 float Length = 0.5f;
111
112 // Radius of head cone
113 UPROPERTY()
114 float Radius = 0.75f;
115
116 // Number of sides for tessellating cone and cylinder
117 UPROPERTY()
119
120 // Head type
121 UPROPERTY()
123
124 // Hit mask
125 UPROPERTY()
127};
128
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EGizmoElementArrowHeadType
Definition GizmoElementArrowHead.h:16
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
Definition ToolContextInterfaces.h:427
Definition GizmoElementArrowHead.h:29
Definition GizmoElementBase.h:26
virtual FInputRayHit LineTrace(const UGizmoViewContext *ViewContext, const FLineTraceTraversalState &LineTraceState, const FVector &RayOrigin, const FVector &RayDirection, FLineTraceOutput &OutLineTraceOutput) PURE_VIRTUAL(UGizmoElementBase
Definition GizmoElementBase.h:142
virtual INTERACTIVETOOLSFRAMEWORK_API void SetPixelHitDistanceThreshold(float InPixelHitDistanceThreshold)
Definition GizmoElementBase.cpp:830
Definition GizmoElementBox.h:18
Definition GizmoElementCone.h:18
Definition GizmoElementGroup.h:17
Definition GizmoElementSphere.h:18
float Radius
Definition GizmoElementSphere.h:48
virtual INTERACTIVETOOLSFRAMEWORK_API void SetCenter(const FVector &InCenter)
Definition GizmoElementSphere.cpp:58
virtual INTERACTIVETOOLSFRAMEWORK_API void SetNumSides(int32 InNumSides)
Definition GizmoElementSphere.cpp:78
virtual INTERACTIVETOOLSFRAMEWORK_API FVector GetCenter() const
Definition GizmoElementSphere.cpp:63
virtual INTERACTIVETOOLSFRAMEWORK_API int32 GetNumSides() const
Definition GizmoElementSphere.cpp:83
virtual INTERACTIVETOOLSFRAMEWORK_API void SetRadius(float InRadius)
Definition GizmoElementSphere.cpp:68
int32 NumSides
Definition GizmoElementSphere.h:52
virtual INTERACTIVETOOLSFRAMEWORK_API float GetRadius() const
Definition GizmoElementSphere.cpp:73
Definition GizmoViewContext.h:20
Definition InputState.h:52
Definition ObjectPtr.h:488
Definition WeakObjectPtrTemplates.h:25
Definition GizmoElementBase.h:125
Definition GizmoElementBase.h:96
Definition GizmoElementBase.h:52