UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GizmoElementCylinder.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/GizmoElementBase.h
"
7
#include "
InputState.h
"
8
#include "
UObject/ObjectMacros.h
"
9
#include "GizmoElementCylinder.generated.h"
10
16
UCLASS
(
Transient
, MinimalAPI)
17
class
UGizmoElementCylinder
:
public
UGizmoElementBase
18
{
19
GENERATED_BODY
()
20
21
public
:
22
23
//~ Begin UGizmoElementBase Interface.
24
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
Render
(
IToolsContextRenderAPI
*
RenderAPI
,
const
FRenderTraversalState
&
RenderState
)
override
;
25
INTERACTIVETOOLSFRAMEWORK_API
virtual
FInputRayHit
LineTrace(
const
UGizmoViewContext
*
ViewContext
,
const
FLineTraceTraversalState
&
LineTraceState
,
const
FVector
& RayOrigin,
const
FVector
& RayDirection,
FLineTraceOutput
&
OutLineTraceOutput
)
override
;
26
//~ End UGizmoElementBase Interface.
27
28
// Location of center of cylinder's base circle.
29
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetBase(
const
FVector
&
InBase
);
30
INTERACTIVETOOLSFRAMEWORK_API
virtual
FVector
GetBase()
const
;
31
32
// Cylinder axis direction.
33
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetDirection(
const
FVector
&
InDirection
);
34
INTERACTIVETOOLSFRAMEWORK_API
virtual
FVector
GetDirection()
const
;
35
36
// Cylinder height.
37
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetHeight(
float
InHeight
);
38
INTERACTIVETOOLSFRAMEWORK_API
virtual
float
GetHeight()
const
;
39
40
// Cylinder radius.
41
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetRadius(
float
InRadius
);
42
INTERACTIVETOOLSFRAMEWORK_API
virtual
float
GetRadius()
const
;
43
44
// Number of sides for tessellating cylinder.
45
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetNumSides(
int32
InNumSides
);
46
INTERACTIVETOOLSFRAMEWORK_API
virtual
int32
GetNumSides()
const
;
47
48
// Whether to render with dashing.
49
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetIsDashed(
bool
bInDashing
);
50
INTERACTIVETOOLSFRAMEWORK_API
virtual
bool
GetIsDashed()
const
;
51
52
// The dash parameter, if enabled. If GapLength is not specified, it defaults to half DashLength.
53
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
SetDashParameters(
const
float
InDashLength
= 10.0f,
const
TOptional<float>
&
InGapLength
=
TOptional<float>
());
54
INTERACTIVETOOLSFRAMEWORK_API
virtual
void
GetDashParameters(
float
&
OutDashLength
,
float
&
OutGapLength
)
const
;
55
56
protected
:
57
58
// Location of center of cylinder's base circle.
59
UPROPERTY
()
60
FVector
Base =
FVector
::ZeroVector;
61
62
// Cylinder axis direction.
63
UPROPERTY
()
64
FVector
Direction =
FVector
(0.0f, 0.0f, 1.0f);
65
66
// Cylinder height.
67
UPROPERTY
()
68
float
Height = 1.0f;
69
70
// Cylinder radius.
71
UPROPERTY
()
72
float
Radius = 0.5f;
73
74
// Number of sides for tessellating cylinder.
75
UPROPERTY
()
76
int32
NumSides = 32;
77
78
// Whether to render with dashing.
79
UPROPERTY
()
80
bool
bIsDashed =
false
;
81
82
// The Dash Length, if Dashing is enabled.
83
UPROPERTY
()
84
float
DashLength = 10.0f;
85
86
// The Dash Gap Length, if Dashing is enabled.
87
UPROPERTY
()
88
float
DashGapLength = 5.0f;
89
};
CoreMinimal.h
int32
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition
Platform.h:1125
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EPackageAutoSaveType::Transient
@ Transient
GizmoElementBase.h
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
EBulkReregister::RenderState
@ RenderState
IToolsContextRenderAPI
Definition
ToolContextInterfaces.h:427
UGizmoElementBase
Definition
GizmoElementBase.h:26
UGizmoElementCylinder
Definition
GizmoElementCylinder.h:18
UGizmoViewContext
Definition
GizmoViewContext.h:20
false
@ false
Definition
radaudio_common.h:23
FInputRayHit
Definition
InputState.h:52
TOptional
Definition
Optional.h:131
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
GizmoElementCylinder.h
Generated by
1.9.8