UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WidgetTransform.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"
9#include "WidgetTransform.generated.h"
10
14USTRUCT(BlueprintType)
16{
18
19public:
20
22 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Transform, meta=( Delta = "1" ))
24
26 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Transform, meta=( UIMin = "-5", UIMax = "5", Delta = "0.05" ))
28
30 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Transform, meta=( UIMin = "-89", ClampMin = "-89", UIMax = "89", ClampMax = "89", Delta = "1" ))
32
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Transform, meta=( UIMin = "-180", UIMax = "180", Delta = "1" ))
35 float Angle;
36
37public:
38
40 : Translation(FVector2D::ZeroVector)
41 , Scale(FVector2D::UnitVector)
42 , Shear(FVector2D::ZeroVector)
43 , Angle(0)
44 {
45 }
46
54
55 bool IsIdentity() const
56 {
57 const static FWidgetTransform Identity;
58
59 return Identity == *this;
60 }
61
62 inline bool operator==( const FWidgetTransform &Other ) const
63 {
64 return Scale == Other.Scale && Shear == Other.Shear && Angle == Other.Angle && Translation == Other.Translation;
65 }
66
67 inline bool operator!=( const FWidgetTransform& Other ) const
68 {
69 return !( *this == Other );
70 }
71
80};
81
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TVector2< double > FVector2D
Definition MathFwd.h:48
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
FScale2f FScale2D
Definition TransformCalculus2D.h:182
FQuat2f FQuat2D
Definition TransformCalculus2D.h:395
static TShear2 FromShearAngles(const UE::Math::TVector2< VType > &InShearAngles)
Definition TransformCalculus2D.h:220
Definition TransformCalculus2D.h:682
static constexpr UE_FORCEINLINE_HINT auto DegreesToRadians(T const &DegVal) -> decltype(DegVal *(UE_PI/180.f))
Definition UnrealMathUtility.h:871
Definition WidgetTransform.h:16
FSlateRenderTransform ToSlateRenderTransform() const
Definition WidgetTransform.h:72
FWidgetTransform(const FVector2D &InTranslation, const FVector2D &InScale, const FVector2D &InShear, float InAngle)
Definition WidgetTransform.h:47
bool operator==(const FWidgetTransform &Other) const
Definition WidgetTransform.h:62
bool IsIdentity() const
Definition WidgetTransform.h:55
bool operator!=(const FWidgetTransform &Other) const
Definition WidgetTransform.h:67