9#include "Misc/Optional.h"
11#include "SlateVector2.generated.h"
16#ifndef UE_ENABLE_SLATE_VECTOR_DEPRECATION_MECHANISMS
17 #define UE_ENABLE_SLATE_VECTOR_DEPRECATION_MECHANISMS 1
25#define UE_INCLUDETOOL_IGNORE_INCONSISTENT_STATE
32#ifndef UE_REPORT_SLATE_VECTOR_DEPRECATION
33 #define UE_REPORT_SLATE_VECTOR_DEPRECATION 0
38#ifndef UE_REPORT_SLATE_VECTOR_DEPRECATION_VERSION
39 #define UE_REPORT_SLATE_VECTOR_DEPRECATION_VERSION all
43#if UE_REPORT_SLATE_VECTOR_DEPRECATION
44 #define UE_SLATE_VECTOR_DEPRECATED(Text) UE_DEPRECATED(UE_REPORT_SLATE_VECTOR_DEPRECATION_VERSION, Text)
45 #define UE_SLATE_VECTOR_DEPRECATED_DEFAULT() UE_DEPRECATED(UE_REPORT_SLATE_VECTOR_DEPRECATION_VERSION, "Use FVector2f or float directly; this Slate API no longer interfaces directly with double-precision scalars and vectors.")
47 #define UE_SLATE_VECTOR_DEPRECATED(Text)
48 #define UE_SLATE_VECTOR_DEPRECATED_DEFAULT()
51#if UE_REPORT_SLATE_VECTOR_DEPRECATION && UE_WARNINGS_AS_ERRORS
52 #define UE_SLATE_DEPRECATED_VECTOR_VIRTUAL_FUNCTION final
54 #define UE_SLATE_DEPRECATED_VECTOR_VIRTUAL_FUNCTION
58#undef UE_INCLUDETOOL_IGNORE_INCONSISTENT_STATE
59#undef UE_REPORT_SLATE_VECTOR_DEPRECATION
75#if UE_ENABLE_SLATE_VECTOR_DEPRECATION_MECHANISMS
77 struct FDeprecateVector2DParameter;
78 struct FDeprecateOptionalVector2DParameter;
123USTRUCT(BlueprintInternalUseOnly, DisplayName=
"Vector2D", meta=(HiddenByDefault, ShortTooltip=
"Vector2D (single-precision)",
ToolTip=
"Vector2D (single-precision)",
ScriptDefaultMake,
ScriptDefaultBreak, HasNativeMake=
"/Script/Engine.KismetMathLibrary.MakeVector2D", HasNativeBreak=
"/Script/Engine.KismetMathLibrary.BreakVector2D"))
176#if UE_ENABLE_SLATE_VECTOR_DEPRECATION_MECHANISMS
264#if UE_ENABLE_SLATE_VECTOR_DEPRECATION_MECHANISMS
269 #define UE_SLATE_BINARY_VECTOR_OPERATORS_A(Type, ...)\
271 friend FDeprecateSlateVector2D operator+(const Type& A, const FDeprecateSlateVector2D& B)\
273 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) + UE::Slate::CastToVector2f(B));\
276 friend FDeprecateSlateVector2D operator-(const Type& A, const FDeprecateSlateVector2D& B)\
278 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) - UE::Slate::CastToVector2f(B));\
281 friend FDeprecateSlateVector2D operator*(const Type& A, const FDeprecateSlateVector2D& B)\
283 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) * UE::Slate::CastToVector2f(B));\
286 friend FDeprecateSlateVector2D operator/(const Type& A, const FDeprecateSlateVector2D& B)\
288 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) / UE::Slate::CastToVector2f(B));\
291 friend bool operator==(const Type& A, const FDeprecateSlateVector2D& B)\
293 return UE::Slate::CastToVector2f(A) == UE::Slate::CastToVector2f(B);\
296 friend bool operator!=(const Type& A, const FDeprecateSlateVector2D& B)\
298 return UE::Slate::CastToVector2f(A) != UE::Slate::CastToVector2f(B);\
301 #define UE_SLATE_BINARY_ASSIGNMENT_VECTOR_OPERATORS_A(Type, ...)\
303 friend Type& operator+=(Type& A, const FDeprecateSlateVector2D& B)\
305 A = Type(FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) + UE::Slate::CastToVector2f(B)));\
309 friend Type& operator-=(Type& A, const FDeprecateSlateVector2D& B)\
311 A = Type(FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) - UE::Slate::CastToVector2f(B)));\
315 friend Type& operator*=(Type& A, const FDeprecateSlateVector2D& B)\
317 A = Type(FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) * UE::Slate::CastToVector2f(B)));\
321 friend Type& operator/=(Type& A, const FDeprecateSlateVector2D& B)\
323 A = Type(FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) / UE::Slate::CastToVector2f(B)));\
327 #define UE_SLATE_BINARY_VECTOR_OPERATORS_B(Type, ...)\
329 friend FDeprecateSlateVector2D operator+(const FDeprecateSlateVector2D& A, const Type& B)\
331 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) + UE::Slate::CastToVector2f(B));\
334 friend FDeprecateSlateVector2D operator-(const FDeprecateSlateVector2D& A, const Type& B)\
336 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) - UE::Slate::CastToVector2f(B));\
339 friend FDeprecateSlateVector2D operator*(const FDeprecateSlateVector2D& A, const Type& B)\
341 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) * UE::Slate::CastToVector2f(B));\
344 friend FDeprecateSlateVector2D operator/(const FDeprecateSlateVector2D& A, const Type& B)\
346 return FDeprecateSlateVector2D(UE::Slate::CastToVector2f(A) / UE::Slate::CastToVector2f(B));\
349 friend bool operator==(const FDeprecateSlateVector2D& A, const Type& B)\
351 return UE::Slate::CastToVector2f(A) == UE::Slate::CastToVector2f(B);\
354 friend bool operator!=(const FDeprecateSlateVector2D& A, const Type& B)\
356 return UE::Slate::CastToVector2f(A) != UE::Slate::CastToVector2f(B);\
359 #define UE_SLATE_BINARY_ASSIGNMENT_VECTOR_OPERATORS_B(Type, ...)\
361 friend FDeprecateSlateVector2D& operator+=(FDeprecateSlateVector2D& A, const Type& B)\
363 static_cast<FVector2f&>(A) += UE::Slate::CastToVector2f(B);\
367 friend FDeprecateSlateVector2D& operator-=(FDeprecateSlateVector2D& A, const Type& B)\
369 static_cast<FVector2f&>(A) -= UE::Slate::CastToVector2f(B);\
373 friend FDeprecateSlateVector2D& operator*=(FDeprecateSlateVector2D& A, const Type& B)\
375 static_cast<FVector2f&>(A) *= UE::Slate::CastToVector2f(B);\
379 friend FDeprecateSlateVector2D& operator/=(FDeprecateSlateVector2D& A, const Type& B)\
381 static_cast<FVector2f&>(A) /= UE::Slate::CastToVector2f(B);\
432#undef UE_SLATE_BINARY_VECTOR_OPERATORS_A
433#undef UE_SLATE_BINARY_VECTOR_OPERATORS_B
434#undef UE_SLATE_BINARY_ASSIGNMENT_VECTOR_OPERATORS_A
435#undef UE_SLATE_BINARY_ASSIGNMENT_VECTOR_OPERATORS_B
451#if UE_ENABLE_SLATE_VECTOR_DEPRECATION_MECHANISMS
574template <
typename TransformType>
580template <
typename TransformType>
constexpr EUpdateTransformFlags operator&(EUpdateTransformFlags Left, EUpdateTransformFlags Right)
Definition ActorComponent.h:111
#define ensureAlways( InExpression)
Definition AssertionMacros.h:466
UE_FORCEINLINE_HINT FLinearColor operator*(float Scalar, const FLinearColor &Color)
Definition Color.h:473
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_REAL_TO_FLOAT(argument)
Definition LargeWorldCoordinates.h:30
UE::Math::TVector2< float > FVector2f
Definition MathFwd.h:74
UE::Math::TVector2< double > FVector2d
Definition MathFwd.h:61
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
FScreenTransform operator/(const FScreenTransform &AToB, const FVector2f &InvertedScale)
Definition ScreenPass.inl:280
FScreenTransform operator-(const FScreenTransform &AToB, const FVector2f &Bias)
Definition ScreenPass.inl:264
#define UE_ENABLE_SLATE_VECTOR_DEPRECATION_MECHANISMS
Definition SlateVector2.h:17
#define UE_SLATE_BINARY_ASSIGNMENT_VECTOR_OPERATORS_B(Type,...)
#define UE_REPORT_SLATE_VECTOR_DEPRECATION
Definition SlateVector2.h:33
UE::Slate::FDeprecateVector2DResult TransformPoint(float Transform, const UE::Slate::FDeprecateVector2DResult &Point)
Definition SlateVector2.h:564
#define UE_SLATE_BINARY_VECTOR_OPERATORS_B(Type,...)
#define UE_SLATE_VECTOR_DEPRECATED_DEFAULT()
Definition SlateVector2.h:48
#define UE_SLATE_BINARY_VECTOR_OPERATORS_A(Type,...)
UE::Slate::FDeprecateVector2DResult TransformVector(float Transform, const UE::Slate::FDeprecateVector2DResult &Vector)
Definition SlateVector2.h:569
#define UE_SLATE_BINARY_ASSIGNMENT_VECTOR_OPERATORS_A(Type,...)
#define UE_SMALL_NUMBER
Definition UnrealMathUtility.h:130
#define UE_KINDA_SMALL_NUMBER
Definition UnrealMathUtility.h:131
OutType FloatCastChecked(InType In, InType Precision)
Definition UnrealTemplate.h:190
Definition StructuredArchiveSlots.h:52
std::enable_if_t< std::is_floating_point_v< typename FType::FReal >, bool > SerializeFromMismatchedTag(FType &Target, FName StructTag, FArSlot &ArSlot, FName BaseTag, FName ThisTag, FName AltTag)
Definition LargeWorldCoordinatesSerializer.h:18
T GetSafeNormal(const T &Value)
Definition SplineMath.h:221
Definition DockingUtilsPrivate.h:8
FDeprecateSlateVector2D FDeprecateVector2DResult
Definition SlateVector2.h:469
const FVector2f & CastToVector2f(const FVector2f &InValue)
Definition SlateVector2.h:591
static UE_FORCEINLINE_HINT bool IsNearlyEqual(float A, float B, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:388
Definition PropertyTag.h:38
Definition Optional.h:131
FVector2f & Emplace(ArgsType &&... Args)
Definition Optional.h:323
Definition StructOpsTypeTraits.h:11
@ WithStructuredSerializeFromMismatchedTag
Definition StructOpsTypeTraits.h:29
@ WithStructuredSerializer
Definition StructOpsTypeTraits.h:24
Definition StructOpsTypeTraits.h:46
bool Equals(const TVector2< float > &V, float Tolerance=UE_KINDA_SMALL_NUMBER) const
Definition Vector2D.h:1007
TVector2< float > RoundToVector() const
Definition Vector2D.h:1236
TVector2< float > GetSafeNormal(float Tolerance=UE_SMALL_NUMBER) const
Definition Vector2D.h:1142
TVector2< float > GetRotated(float AngleDeg) const
Definition Vector2D.h:1129
float Y
Definition Vector2D.h:52
TVector2< float > GetSignVector() const
Definition Vector2D.h:1286
UE_FORCEINLINE_HINT TVector2< float > GetAbs() const
Definition Vector2D.h:1296
TVector2< float > ClampAxes(float MinAxisVal, float MaxAxisVal) const
Definition Vector2D.h:1249
T X
Definition Vector2D.h:49
Definition SlateVector2.h:519
FDeprecateOptionalVector2DParameter(const TOptional< FVector2f > &In)
Definition SlateVector2.h:527
FDeprecateOptionalVector2DParameter()
Definition SlateVector2.h:520
FDeprecateOptionalVector2DParameter(const FVector2f &In)
Definition SlateVector2.h:523
Definition SlateVector2.h:85
FDeprecateSlateVector2D * Instance
Definition SlateVector2.h:95
FVector2D DoubleVector
Definition SlateVector2.h:96
Definition SlateVector2.h:485
FDeprecateVector2DParameter(const FVector2f &InValue)
Definition SlateVector2.h:490
FDeprecateVector2DParameter(const FDeprecateVector2DResult &InValue)
Definition SlateVector2.h:494
FDeprecateVector2DParameter(float InX, float InY)
Definition SlateVector2.h:486