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"
7#include "InputState.h"
9#include "GizmoElementCylinder.generated.h"
10
16UCLASS(Transient, MinimalAPI)
18{
20
21public:
22
23 //~ Begin UGizmoElementBase Interface.
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
56protected:
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};
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
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition ToolContextInterfaces.h:427
Definition GizmoElementBase.h:26
Definition GizmoElementCylinder.h:18
Definition GizmoViewContext.h:20
@ false
Definition radaudio_common.h:23
Definition InputState.h:52
Definition Optional.h:131
Definition GizmoElementBase.h:125
Definition GizmoElementBase.h:96
Definition GizmoElementBase.h:52