UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IntVector.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Misc/Crc.h"
7#include "Misc/Parse.h"
8#include "Math/MathFwd.h" // IWYU pragma: export
13
14namespace UE::Math
15{
16
20template <typename InIntType>
22{
24 static_assert(std::is_integral_v<IntType>, "Only an integer types are supported.");
25
26 union
27 {
28 struct
29 {
32
35
38 };
39
40 UE_DEPRECATED(all, "For internal use only")
42 };
43
46
49
53 [[nodiscard]] TIntVector3() = default;
54
63 : X(InX)
64 , Y(InY)
65 , Z(InZ)
66 {
67 }
68
75 : X(InValue)
76 , Y(InValue)
77 , Z(InValue)
78 {
79 }
80
82 : X(Other.X)
83 , Y(Other.Y)
84 , Z(Other.Z)
85 {
86 }
87
93 template <typename FloatType>
94 [[nodiscard]] explicit TIntVector3(TVector<FloatType> InVector);
95
102 : X(0)
103 , Y(0)
104 , Z(0)
105 {
106 }
107
111 template <typename OtherIntType>
118
119 // Workaround for clang deprecation warnings for deprecated XYZ member in implicitly-defined special member functions
122 TIntVector3(const TIntVector3&) = default;
126
133 [[nodiscard]] const IntType& operator()(int32 ComponentIndex) const
134 {
136 return XYZ[ComponentIndex];
138 }
139
146 [[nodiscard]] IntType& operator()(int32 ComponentIndex)
147 {
149 return XYZ[ComponentIndex];
151 }
152
159 [[nodiscard]] const IntType& operator[](int32 ComponentIndex) const
160 {
162 return XYZ[ComponentIndex];
164 }
165
172 [[nodiscard]] IntType& operator[](int32 ComponentIndex)
173 {
175 return XYZ[ComponentIndex];
177 }
178
185 [[nodiscard]] bool operator==(const TIntVector3& Other) const
186 {
187 return X == Other.X && Y == Other.Y && Z == Other.Z;
188 }
189
196 [[nodiscard]] bool operator!=(const TIntVector3& Other) const
197 {
198 return X != Other.X || Y != Other.Y || Z != Other.Z;
199 }
200
208 {
209 X *= Other.X;
210 Y *= Other.Y;
211 Z *= Other.Z;
212
213 return *this;
214 }
215
223 {
224 X *= Scale;
225 Y *= Scale;
226 Z *= Scale;
227
228 return *this;
229 }
230
238 {
239 X /= Divisor;
240 Y /= Divisor;
241 Z /= Divisor;
242
243 return *this;
244 }
245
253 {
254 X %= Divisor;
255 Y %= Divisor;
256 Z %= Divisor;
257
258 return *this;
259 }
260
268 {
269 X += Other.X;
270 Y += Other.Y;
271 Z += Other.Z;
272
273 return *this;
274 }
275
283 {
284 X -= Other.X;
285 Y -= Other.Y;
286 Z -= Other.Z;
287
288 return *this;
289 }
290
298 {
299 return TIntVector3(*this) *= Other;
300 }
301
309 {
310 return TIntVector3(*this) *= Scale;
311 }
312
320 {
321 return TIntVector3(*this) /= Divisor;
322 }
323
331 {
332 return TIntVector3(*this) %= Divisor;
333 }
334
342 {
343 return TIntVector3(*this) += Other;
344 }
345
353 {
354 return TIntVector3(*this) -= Other;
355 }
356
364 {
365 return TIntVector3(X >> Shift, Y >> Shift, Z >> Shift);
366 }
367
375 {
376 return TIntVector3(X << Shift, Y << Shift, Z << Shift);
377 }
378
386 {
387 return TIntVector3(X & Value, Y & Value, Z & Value);
388 }
389
397 {
398 return TIntVector3(X | Value, Y | Value, Z | Value);
399 }
400
408 {
409 return TIntVector3(X ^ Value, Y ^ Value, Z ^ Value);
410 }
411
416 [[nodiscard]] bool IsZero() const
417 {
418 return *this == ZeroValue;
419 }
420
427 {
428 return FMath::Max(FMath::Max(X, Y), Z);
429 }
430
437 {
438 if constexpr (std::is_signed_v<IntType>)
439 {
440 return FMath::Max(FMath::Max(FMath::Abs(X), FMath::Abs(Y)), FMath::Abs(Z));
441 }
442 else
443 {
444 return GetMax();
445 }
446 }
447
454 {
455 return FMath::Min(FMath::Min(X, Y), Z);
456 }
457
464 {
465 if constexpr (std::is_signed_v<IntType>)
466 {
467 return FMath::Min(FMath::Min(FMath::Abs(X), FMath::Abs(Y)), FMath::Abs(Z));
468 }
469 else
470 {
471 return GetMin();
472 }
473 }
474
482 {
483 return TIntVector3(
484 FMath::Max(X, Other.X),
485 FMath::Max(Y, Other.Y),
486 FMath::Max(Z, Other.Z));
487 }
488
496 {
497 return TIntVector3(
498 FMath::Min(X, Other.X),
499 FMath::Min(Y, Other.Y),
500 FMath::Min(Z, Other.Z));
501 }
502
509 {
513 return IntType(FMath::Sqrt(double(LocalX64 * LocalX64 + LocalY64 * LocalY64 + LocalZ64 * LocalZ64)));
514 }
515
521 template <typename CharType>
523 {
524 Out << "X=" << X << " Y=" << Y << " Z=" << Z;
525 }
526
533 template <typename CharType>
535 {
536 Vector.AppendString(Builder);
537 return Builder;
538 }
539
545 void AppendString(FString& Out) const
546 {
547 TStringBuilder<128> Builder;
548 Builder << *this;
549 Out.Append(Builder);
550 }
551
557 [[nodiscard]] FString ToString() const
558 {
559 FString Out;
560 AppendString(Out);
561 return Out;
562 }
563
571 bool InitFromString(const FString& InSourceString)
572 {
573 X = Y = Z = 0;
574
575 // The initialization is only successful if the X, Y and Z values can all be parsed from the string
576 const bool bSuccessful = FParse::Value(*InSourceString, TEXT("X="), X) && FParse::Value(*InSourceString, TEXT("Y="), Y) && FParse::Value(*InSourceString, TEXT("Z="), Z);
577
578 return bSuccessful;
579 }
580
589 {
590 return TIntVector3(FMath::DivideAndRoundUp(Lhs.X, Divisor), FMath::DivideAndRoundUp(Lhs.Y, Divisor), FMath::DivideAndRoundUp(Lhs.Z, Divisor));
591 }
592
594 {
595 return TIntVector3(FMath::DivideAndRoundUp(Lhs.X, Divisor.X), FMath::DivideAndRoundUp(Lhs.Y, Divisor.Y), FMath::DivideAndRoundUp(Lhs.Z, Divisor.Z));
596 }
597
603 [[nodiscard]] static int32 Num()
604 {
605 return 3;
606 }
607
616 {
617 return Ar << Vector.X << Vector.Y << Vector.Z;
618 }
619
621 {
623 Record << SA_VALUE(TEXT("X"), Vector.X);
624 Record << SA_VALUE(TEXT("Y"), Vector.Y);
625 Record << SA_VALUE(TEXT("Z"), Vector.Z);
626 }
627
629 {
630 Ar << *this;
631 return true;
632 }
633
635 {
636 if constexpr (std::is_same_v<IntType, int32>)
637 {
639 }
640 else if constexpr (std::is_same_v<IntType, int64>)
641 {
643 }
644 else if constexpr (std::is_same_v<IntType, uint32>)
645 {
647 }
648 else if constexpr (std::is_same_v<IntType, uint64>)
649 {
651 }
652 else
653 {
654 static_assert(sizeof(IntType) == 0, "Unimplemented");
655 return false;
656 }
657 }
658};
659
660template <typename IntType>
662
663template <typename IntType>
665
667
668template <typename InIntType>
670{
672 static_assert(std::is_integral_v<IntType>, "Only an integer types are supported.");
673
674 union
675 {
676 struct
677 {
680
683 };
684
685 UE_DEPRECATED(all, "For internal use only")
686 IntType XY[2];
687 };
688
690 static const TIntVector2 ZeroValue;
691
693 static const TIntVector2 NoneValue;
694
695 TIntVector2() = default;
696
698 : X(InX)
699 , Y(InY)
700 {
701 }
702
704 : X(InValue)
705 , Y(InValue)
706 {
707 }
708
710 : X(0)
711 , Y(0)
712 {
713 }
714
716 : X(Other.X)
717 , Y(Other.Y)
718 {
719 }
720
722 : X(Other.X)
723 , Y(Other.Y)
724 {
725 }
726
730 template <typename OtherIntType>
736
737 // Workaround for clang deprecation warnings for deprecated XY member in implicitly-defined special member functions
740 TIntVector2(const TIntVector2&) = default;
744
745 const IntType& operator[](int32 ComponentIndex) const
746 {
748 return XY[ComponentIndex];
750 }
751
752 IntType& operator[](int32 ComponentIndex)
753 {
755 return XY[ComponentIndex];
757 }
758
759 bool operator==(const TIntVector2& Other) const
760 {
761 return X==Other.X && Y==Other.Y;
762 }
763
764 bool operator!=(const TIntVector2& Other) const
765 {
766 return X!=Other.X || Y!=Other.Y;
767 }
768
776 {
777 X *= Other.X;
778 Y *= Other.Y;
779
780 return *this;
781 }
782
790 {
791 X *= Scale;
792 Y *= Scale;
793
794 return *this;
795 }
796
804 {
805 X /= Divisor;
806 Y /= Divisor;
807
808 return *this;
809 }
810
818 {
819 X %= Divisor;
820 Y %= Divisor;
821
822 return *this;
823 }
824
832 {
833 X += Other.X;
834 Y += Other.Y;
835
836 return *this;
837 }
838
846 {
847 X -= Other.X;
848 Y -= Other.Y;
849
850 return *this;
851 }
852
860 {
861 return TIntVector2(*this) *= Other;
862 }
863
871 {
872 return TIntVector2(*this) *= Scale;
873 }
874
882 {
883 return TIntVector2(*this) /= Divisor;
884 }
885
893 {
894 return TIntVector2(*this) %= Divisor;
895 }
896
904 {
905 return TIntVector2(*this) += Other;
906 }
907
915 {
916 return TIntVector2(*this) -= Other;
917 }
918
926 {
927 return TIntVector2(X >> Shift, Y >> Shift);
928 }
929
937 {
938 return TIntVector2(X << Shift, Y << Shift);
939 }
940
948 {
949 return TIntVector2(X & Value, Y & Value);
950 }
951
959 {
960 return TIntVector2(X | Value, Y | Value);
961 }
962
970 {
971 return TIntVector2(X ^ Value, Y ^ Value);
972 }
973
978 bool IsZero() const
979 {
980 return *this == ZeroValue;
981 }
982
989 {
990 return FMath::Max(X, Y);
991 }
992
999 {
1000 if constexpr (std::is_signed_v<IntType>)
1001 {
1002 return FMath::Max(FMath::Abs(X), FMath::Abs(Y));
1003 }
1004 else
1005 {
1006 return GetMax();
1007 }
1008 }
1009
1016 {
1017 return FMath::Min(X, Y);
1018 }
1019
1026 {
1027 if constexpr (std::is_signed_v<IntType>)
1028 {
1029 return FMath::Min(FMath::Abs(X), FMath::Abs(Y));
1030 }
1031 else
1032 {
1033 return GetMin();
1034 }
1035 }
1036
1044 {
1045 return TIntVector2(
1046 FMath::Max(X, Other.X),
1047 FMath::Max(Y, Other.Y));
1048 }
1049
1057 {
1058 return TIntVector2(
1059 FMath::Min(X, Other.X),
1060 FMath::Min(Y, Other.Y));
1061 }
1062
1068 template <typename CharType>
1070 {
1071 Out << "X=" << X << " Y=" << Y;
1072 }
1073
1080 template <typename CharType>
1082 {
1083 Vector.AppendString(Builder);
1084 return Builder;
1085 }
1086
1092 void AppendString(FString& Out) const
1093 {
1094 TStringBuilder<128> Builder;
1095 Builder << *this;
1096 Out.Append(Builder);
1097 }
1098
1104 FString ToString() const
1105 {
1106 FString Out;
1107 AppendString(Out);
1108 return Out;
1109 }
1110
1118 bool InitFromString(const FString& InSourceString)
1119 {
1120 X = Y = 0;
1121
1122 // The initialization is only successful if the X and Y values can all be parsed from the string
1123 const bool bSuccessful = FParse::Value(*InSourceString, TEXT("X="), X) && FParse::Value(*InSourceString, TEXT("Y="), Y);
1124
1125 return bSuccessful;
1126 }
1127
1136 {
1137 return TIntVector2(FMath::DivideAndRoundUp(Lhs.X, Divisor), FMath::DivideAndRoundUp(Lhs.Y, Divisor));
1138 }
1139
1141 {
1142 return TIntVector2(FMath::DivideAndRoundUp(Lhs.X, Divisor.X), FMath::DivideAndRoundUp(Lhs.Y, Divisor.Y));
1143 }
1144
1150 static int32 Num()
1151 {
1152 return 2;
1153 }
1154
1163 {
1164 return Ar << Vector.X << Vector.Y;
1165 }
1166
1168 {
1170 Record << SA_VALUE(TEXT("X"), Vector.X);
1171 Record << SA_VALUE(TEXT("Y"), Vector.Y);
1172 }
1173
1175 {
1176 Ar << *this;
1177 return true;
1178 }
1179
1181 {
1182 if constexpr (std::is_same_v<IntType, int32>)
1183 {
1185 }
1186 else if constexpr (std::is_same_v<IntType, int64>)
1187 {
1189 }
1190 else if constexpr (std::is_same_v<IntType, uint32>)
1191 {
1193 }
1194 else if constexpr (std::is_same_v<IntType, uint64>)
1195 {
1197 }
1198 else
1199 {
1200 static_assert(sizeof(IntType) == 0, "Unimplemented");
1201 return false;
1202 }
1203 }
1204};
1205
1206template <typename IntType>
1207const TIntVector2<IntType> TIntVector2<IntType>::ZeroValue(0, 0);
1208
1209template <typename IntType>
1210const TIntVector2<IntType> TIntVector2<IntType>::NoneValue(INDEX_NONE, INDEX_NONE);
1211
1213
1214template <typename InIntType>
1216{
1218 static_assert(std::is_integral_v<IntType>, "Only an integer types are supported.");
1219
1220 union
1221 {
1222 struct
1223 {
1226
1229
1232
1235 };
1236
1237 UE_DEPRECATED(all, "For internal use only")
1238 IntType XYZW[4];
1239 };
1240
1242 static const TIntVector4 ZeroValue;
1243
1245 static const TIntVector4 NoneValue;
1246
1247 TIntVector4() = default;
1248
1250 : X(InX)
1251 , Y(InY)
1252 , Z(InZ)
1253 , W(InW)
1254 {
1255 }
1256
1258 : X(InValue)
1259 , Y(InValue)
1260 , Z(InValue)
1261 , W(InValue)
1262 {
1263 }
1264
1266 : X(InValue.X)
1267 , Y(InValue.Y)
1268 , Z(InValue.Z)
1269 , W(InW)
1270 {
1271 }
1272
1274 : X(0)
1275 , Y(0)
1276 , Z(0)
1277 , W(0)
1278 {
1279 }
1280
1284 template <typename OtherIntType>
1292
1293 // Workaround for clang deprecation warnings for deprecated XYZW member in implicitly-defined special member functions
1296 TIntVector4(const TIntVector4&) = default;
1300
1307 const IntType& operator()(int32 ComponentIndex) const
1308 {
1310 return XYZW[ComponentIndex];
1312 }
1313
1320 IntType& operator()(int32 ComponentIndex)
1321 {
1323 return XYZW[ComponentIndex];
1325 }
1326
1333 const IntType& operator[](int32 ComponentIndex) const
1334 {
1336 return XYZW[ComponentIndex];
1338 }
1339
1346 IntType& operator[](int32 ComponentIndex)
1347 {
1349 return XYZW[ComponentIndex];
1351 }
1352
1359 bool operator==(const TIntVector4& Other) const
1360 {
1361 return X == Other.X && Y == Other.Y && Z == Other.Z && W == Other.W;
1362 }
1363
1370 bool operator!=(const TIntVector4& Other) const
1371 {
1372 return X != Other.X || Y != Other.Y || Z != Other.Z || W != Other.W;
1373 }
1374
1382 {
1383 X *= Other.X;
1384 Y *= Other.Y;
1385 Z *= Other.Z;
1386 W *= Other.W;
1387
1388 return *this;
1389 }
1390
1398 {
1399 X *= Scale;
1400 Y *= Scale;
1401 Z *= Scale;
1402 W *= Scale;
1403
1404 return *this;
1405 }
1406
1414 {
1415 X /= Divisor;
1416 Y /= Divisor;
1417 Z /= Divisor;
1418 W /= Divisor;
1419
1420 return *this;
1421 }
1422
1430 {
1431 X %= Divisor;
1432 Y %= Divisor;
1433 Z %= Divisor;
1434 W %= Divisor;
1435
1436 return *this;
1437 }
1438
1446 {
1447 X += Other.X;
1448 Y += Other.Y;
1449 Z += Other.Z;
1450 W += Other.W;
1451
1452 return *this;
1453 }
1454
1462 {
1463 X -= Other.X;
1464 Y -= Other.Y;
1465 Z -= Other.Z;
1466 W -= Other.W;
1467
1468 return *this;
1469 }
1470
1478 {
1479 return TIntVector4(*this) *= Other;
1480 }
1481
1489 {
1490 return TIntVector4(*this) *= Scale;
1491 }
1492
1500 {
1501 return TIntVector4(*this) /= Divisor;
1502 }
1503
1511 {
1512 return TIntVector4(*this) %= Divisor;
1513 }
1514
1522 {
1523 return TIntVector4(*this) += Other;
1524 }
1525
1533 {
1534 return TIntVector4(*this) -= Other;
1535 }
1536
1544 {
1545 return TIntVector4(X >> Shift, Y >> Shift, Z >> Shift, W >> Shift);
1546 }
1547
1555 {
1556 return TIntVector4(X << Shift, Y << Shift, Z << Shift, W << Shift);
1557 }
1558
1566 {
1567 return TIntVector4(X & Value, Y & Value, Z & Value, W & Value);
1568 }
1569
1577 {
1578 return TIntVector4(X | Value, Y | Value, Z | Value, W | Value);
1579 }
1580
1588 {
1589 return TIntVector4(X ^ Value, Y ^ Value, Z ^ Value, W ^ Value);
1590 }
1591
1596 bool IsZero() const
1597 {
1598 return *this == ZeroValue;
1599 }
1600
1607 {
1608 return FMath::Max(FMath::Max(FMath::Max(X, Y), Z), W);
1609 }
1610
1617 {
1618 if constexpr (std::is_signed_v<IntType>)
1619 {
1620 return FMath::Max(FMath::Max(FMath::Max(FMath::Abs(X), FMath::Abs(Y)), FMath::Abs(Z)), FMath::Abs(W));
1621 }
1622 else
1623 {
1624 return GetMax();
1625 }
1626 }
1627
1634 {
1635 return FMath::Min(FMath::Min(FMath::Min(X, Y), Z), W);
1636 }
1637
1644 {
1645 if constexpr (std::is_signed_v<IntType>)
1646 {
1647 return FMath::Min(FMath::Min(FMath::Min(FMath::Abs(X), FMath::Abs(Y)), FMath::Abs(Z)), FMath::Abs(W));
1648 }
1649 else
1650 {
1651 return GetMin();
1652 }
1653 }
1654
1662 {
1663 return TIntVector4(
1664 FMath::Max(X, Other.X),
1665 FMath::Max(Y, Other.Y),
1666 FMath::Max(Z, Other.Z),
1667 FMath::Max(W, Other.W));
1668 }
1669
1677 {
1678 return TIntVector4(
1679 FMath::Min(X, Other.X),
1680 FMath::Min(Y, Other.Y),
1681 FMath::Min(Z, Other.Z),
1682 FMath::Min(W, Other.W));
1683 }
1684
1690 template <typename CharType>
1692 {
1693 Out << "X=" << X << " Y=" << Y << " Z=" << Z << " W=" << W;
1694 }
1695
1702 template <typename CharType>
1704 {
1705 Vector.AppendString(Builder);
1706 return Builder;
1707 }
1708
1714 void AppendString(FString& Out) const
1715 {
1716 TStringBuilder<128> Builder;
1717 Builder << *this;
1718 Out.Append(Builder);
1719 }
1720
1726 FString ToString() const
1727 {
1728 FString Out;
1729 AppendString(Out);
1730 return Out;
1731 }
1732
1740 bool InitFromString(const FString& InSourceString)
1741 {
1742 X = Y = Z = W = 0;
1743
1744 // The initialization is only successful if the X, Y, Z and W values can all be parsed from the string
1745 const bool bSuccessful = FParse::Value(*InSourceString, TEXT("X="), X) && FParse::Value(*InSourceString, TEXT("Y="), Y) && FParse::Value(*InSourceString, TEXT("Z="), Z) && FParse::Value(*InSourceString, TEXT("W="), W);
1746
1747 return bSuccessful;
1748 }
1749
1758 {
1759 return TIntVector4(
1760 FMath::DivideAndRoundUp(Lhs.X, Divisor),
1761 FMath::DivideAndRoundUp(Lhs.Y, Divisor),
1762 FMath::DivideAndRoundUp(Lhs.Z, Divisor),
1763 FMath::DivideAndRoundUp(Lhs.W, Divisor));
1764 }
1765
1767 {
1768 return TIntVector4(
1769 FMath::DivideAndRoundUp(Lhs.X, Divisor.X),
1770 FMath::DivideAndRoundUp(Lhs.Y, Divisor.Y),
1771 FMath::DivideAndRoundUp(Lhs.Z, Divisor.Z),
1772 FMath::DivideAndRoundUp(Lhs.W, Divisor.W));
1773 }
1774
1780 static int32 Num()
1781 {
1782 return 4;
1783 }
1784
1793 {
1794 return Ar << Vector.X << Vector.Y << Vector.Z << Vector.W;
1795 }
1796
1798 {
1800 Record << SA_VALUE(TEXT("X"), Vector.X);
1801 Record << SA_VALUE(TEXT("Y"), Vector.Y);
1802 Record << SA_VALUE(TEXT("Z"), Vector.Z);
1803 Record << SA_VALUE(TEXT("W"), Vector.W);
1804 }
1805
1807 {
1808 Ar << *this;
1809 return true;
1810 }
1811
1813 {
1814 if constexpr (std::is_same_v<IntType, int32>)
1815 {
1817 }
1818 else if constexpr (std::is_same_v<IntType, int64>)
1819 {
1821 }
1822 else if constexpr (std::is_same_v<IntType, uint32>)
1823 {
1825 }
1826 else if constexpr (std::is_same_v<IntType, uint64>)
1827 {
1829 }
1830 else
1831 {
1832 static_assert(sizeof(IntType) == 0, "Unimplemented");
1833 return false;
1834 }
1835 }
1836};
1837
1838template <typename IntType>
1839const TIntVector4<IntType> TIntVector4<IntType>::ZeroValue(0, 0, 0, 0);
1840
1841template <typename IntType>
1842const TIntVector4<IntType> TIntVector4<IntType>::NoneValue(INDEX_NONE, INDEX_NONE, INDEX_NONE, INDEX_NONE);
1843
1850template<typename T>
1851uint32 GetTypeHash(const TIntVector2<T>& Vector)
1852{
1853 // Note: this assumes there's no padding in Vector that could contain uncompared data.
1854 return FCrc::MemCrc32(&Vector, sizeof(Vector));
1855}
1856
1863template<typename T>
1864uint32 GetTypeHash(const TIntVector3<T>& Vector)
1865{
1866 // Note: this assumes there's no padding in Vector that could contain uncompared data.
1867 return FCrc::MemCrc_DEPRECATED(&Vector, sizeof(Vector));
1868}
1869
1876template<typename T>
1877uint32 GetTypeHash(const TIntVector4<T>& Vector)
1878{
1879 // Note: this assumes there's no padding in Vector that could contain uncompared data.
1880 return FCrc::MemCrc32(&Vector, sizeof(Vector));
1881}
1882
1883}
1884
1885template <> struct TIsPODType<FInt32Vector2> { enum { Value = true }; };
1886template <> struct TIsPODType<FUint32Vector2> { enum { Value = true }; };
1887template <> struct TIsPODType<FInt32Vector3> { enum { Value = true }; };
1888template <> struct TIsPODType<FUint32Vector3> { enum { Value = true }; };
1889template <> struct TIsPODType<FInt32Vector4> { enum { Value = true }; };
1890template <> struct TIsPODType<FUint32Vector4> { enum { Value = true }; };
1891
1892template <> struct TIsUECoreVariant<FInt32Vector2> { enum { Value = true }; };
1893template <> struct TIsUECoreVariant<FUint32Vector2> { enum { Value = true }; };
1894template <> struct TIsUECoreVariant<FInt32Vector3> { enum { Value = true }; };
1895template <> struct TIsUECoreVariant<FUint32Vector3> { enum { Value = true }; };
1896template <> struct TIsUECoreVariant<FInt32Vector4> { enum { Value = true }; };
1897template <> struct TIsUECoreVariant<FUint32Vector4> { enum { Value = true }; };
1898
1899template <> struct TIsPODType<FInt64Vector2> { enum { Value = true }; };
1900template <> struct TIsPODType<FUint64Vector2> { enum { Value = true }; };
1901template <> struct TIsPODType<FInt64Vector3> { enum { Value = true }; };
1902template <> struct TIsPODType<FUint64Vector3> { enum { Value = true }; };
1903template <> struct TIsPODType<FInt64Vector4> { enum { Value = true }; };
1904template <> struct TIsPODType<FUint64Vector4> { enum { Value = true }; };
1905
1906template <> struct TIsUECoreVariant<FInt64Vector2> { enum { Value = true }; };
1907template <> struct TIsUECoreVariant<FUint64Vector2> { enum { Value = true }; };
1908template <> struct TIsUECoreVariant<FInt64Vector3> { enum { Value = true }; };
1909template <> struct TIsUECoreVariant<FUint64Vector3> { enum { Value = true }; };
1910template <> struct TIsUECoreVariant<FInt64Vector4> { enum { Value = true }; };
1911template <> struct TIsUECoreVariant<FUint64Vector4> { enum { Value = true }; };
@ INDEX_NONE
Definition CoreMiscDefines.h:150
EForceInit
Definition CoreMiscDefines.h:154
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
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 X(Name, Desc)
Definition FormatStringSan.h:47
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
#define UE_SERIALIZE_VARIANT_FROM_MISMATCHED_TAG(AR_OR_SLOT, ALIAS, TYPE, ALT_TYPE)
Definition LargeWorldCoordinatesSerializer.h:9
#define SA_VALUE(Name, Value)
Definition StructuredArchiveNameHelpers.h:77
OutType IntCastChecked(InType In)
Definition UnrealTemplate.h:166
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition NameTypes.h:617
Definition StructuredArchiveSlots.h:144
Definition StructuredArchiveSlots.h:52
UE_API FStructuredArchiveRecord EnterRecord()
Definition StructuredArchiveSlots.h:252
Definition StringBuilder.h:79
BuilderType & Append(const OtherCharType *const String, const int32 Length)
Definition StringBuilder.h:238
Definition StringBuilder.h:509
Definition Sphere.cpp:10
static CORE_API uint32 MemCrc_DEPRECATED(const void *Data, int32 Length, uint32 CRC=0)
Definition Crc.cpp:592
static UE_FORCEINLINE_HINT uint32 MemCrc32(const void *Data, int32 Length, uint32 CRC=0)
Definition Crc.h:31
static constexpr UE_FORCEINLINE_HINT T DivideAndRoundUp(T Dividend, T Divisor)
Definition UnrealMathUtility.h:694
static CORE_API bool Value(const TCHAR *Stream, const TCHAR *Match, FName &Name)
Definition Parse.cpp:584
Definition IsPODType.h:12
Definition IsUECoreType.h:19
Definition IntPoint.h:25
Definition IntVector.h:670
TIntVector2 operator*(const TIntVector2 &Other) const
Definition IntVector.h:859
TIntVector2 operator/(IntType Divisor) const
Definition IntVector.h:881
TIntVector2 operator-(const TIntVector2 &Other) const
Definition IntVector.h:914
bool operator!=(const TIntVector2 &Other) const
Definition IntVector.h:764
TIntVector2(IntType InValue)
Definition IntVector.h:703
void AppendString(FString &Out) const
Definition IntVector.h:1092
bool InitFromString(const FString &InSourceString)
Definition IntVector.h:1118
TIntVector2 & operator%=(IntType Divisor)
Definition IntVector.h:817
IntType GetAbsMin() const
Definition IntVector.h:1025
TIntVector2(const TIntVector2 &)=default
TIntVector2(TIntVector3< IntType > Other)
Definition IntVector.h:721
TIntVector2 ComponentMax(const TIntVector2 &Other) const
Definition IntVector.h:1043
TIntVector2 & operator=(const TIntVector2 &)=default
FString ToString() const
Definition IntVector.h:1104
TIntVector2 & operator/=(IntType Divisor)
Definition IntVector.h:803
PRAGMA_DISABLE_DEPRECATION_WARNINGS TIntVector2(TIntVector2 &&)=default
friend void operator<<(FStructuredArchive::FSlot Slot, TIntVector2 &Vector)
Definition IntVector.h:1167
TIntVector2 & operator-=(const TIntVector2 &Other)
Definition IntVector.h:845
bool SerializeFromMismatchedTag(FName StructTag, FArchive &Ar)
Definition IntVector.h:1180
TIntVector2 operator%(IntType Divisor) const
Definition IntVector.h:892
void AppendString(TStringBuilderBase< CharType > &Out) const
Definition IntVector.h:1069
IntType GetMax() const
Definition IntVector.h:988
IntType GetAbsMax() const
Definition IntVector.h:998
static int32 Num()
Definition IntVector.h:1150
bool IsZero() const
Definition IntVector.h:978
bool Serialize(FArchive &Ar)
Definition IntVector.h:1174
IntType Y
Definition IntVector.h:682
TIntVector2(EForceInit)
Definition IntVector.h:709
IntType X
Definition IntVector.h:679
TIntVector2 operator>>(IntType Shift) const
Definition IntVector.h:925
bool operator==(const TIntVector2 &Other) const
Definition IntVector.h:759
TIntVector2 operator&(IntType Value) const
Definition IntVector.h:947
TIntVector2(TIntPoint< IntType > Other)
Definition IntVector.h:715
friend FArchive & operator<<(FArchive &Ar, TIntVector2 &Vector)
Definition IntVector.h:1162
TIntVector2 operator^(IntType Value) const
Definition IntVector.h:969
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntType & operator[](int32 ComponentIndex) const
Definition IntVector.h:745
TIntVector2 & operator*=(IntType Scale)
Definition IntVector.h:789
static TIntVector2 DivideAndRoundUp(TIntVector2 Lhs, TIntVector2 Divisor)
Definition IntVector.h:1140
TIntVector2 operator<<(IntType Shift) const
Definition IntVector.h:936
IntType & operator[](int32 ComponentIndex)
Definition IntVector.h:752
InIntType IntType
Definition IntVector.h:671
TIntVector2 operator|(IntType Value) const
Definition IntVector.h:958
TIntVector2 ComponentMin(const TIntVector2 &Other) const
Definition IntVector.h:1056
IntType GetMin() const
Definition IntVector.h:1015
TIntVector2 operator+(const TIntVector2 &Other) const
Definition IntVector.h:903
TIntVector2 & operator+=(const TIntVector2 &Other)
Definition IntVector.h:831
TIntVector2 operator*(IntType Scale) const
Definition IntVector.h:870
static TIntVector2 DivideAndRoundUp(TIntVector2 Lhs, IntType Divisor)
Definition IntVector.h:1135
TIntVector2 & operator=(TIntVector2 &&)=default
TIntVector2 & operator*=(const TIntVector2 &Other)
Definition IntVector.h:775
friend TStringBuilderBase< CharType > & operator<<(TStringBuilderBase< CharType > &Builder, const TIntVector2 &Vector)
Definition IntVector.h:1081
TIntVector2(TIntVector2< OtherIntType > Other)
Definition IntVector.h:731
Definition IntVector.h:22
IntType GetAbsMin() const
Definition IntVector.h:463
FString ToString() const
Definition IntVector.h:557
TIntVector3 operator*(const TIntVector3 &Other) const
Definition IntVector.h:297
IntType Y
Definition IntVector.h:34
TIntVector3 & operator/=(IntType Divisor)
Definition IntVector.h:237
TIntVector3 ComponentMax(const TIntVector3 &Other) const
Definition IntVector.h:481
TIntVector3 operator*(IntType Scale) const
Definition IntVector.h:308
TIntVector3 operator/(IntType Divisor) const
Definition IntVector.h:319
IntType Size() const
Definition IntVector.h:508
TIntVector3 operator+(const TIntVector3 &Other) const
Definition IntVector.h:341
static int32 Num()
Definition IntVector.h:603
TIntVector3 & operator*=(IntType Scale)
Definition IntVector.h:222
TIntVector3(EForceInit)
Definition IntVector.h:101
bool IsZero() const
Definition IntVector.h:416
PRAGMA_DISABLE_DEPRECATION_WARNINGS TIntVector3(TIntVector3 &&)=default
TIntVector3 & operator=(const TIntVector3 &)=default
void AppendString(FString &Out) const
Definition IntVector.h:545
TIntVector3 ComponentMin(const TIntVector3 &Other) const
Definition IntVector.h:495
friend void operator<<(FStructuredArchive::FSlot Slot, TIntVector3 &Vector)
Definition IntVector.h:620
TIntVector3 & operator=(TIntVector3 &&)=default
bool Serialize(FArchive &Ar)
Definition IntVector.h:628
friend FArchive & operator<<(FArchive &Ar, TIntVector3 &Vector)
Definition IntVector.h:615
TIntVector3 operator>>(IntType Shift) const
Definition IntVector.h:363
IntType X
Definition IntVector.h:31
static const TIntVector3 ZeroValue
Definition IntVector.h:45
TIntVector3(TIntVector4< IntType > Other)
Definition IntVector.h:81
TIntVector3 & operator%=(IntType Divisor)
Definition IntVector.h:252
TIntVector3 operator%(IntType Divisor) const
Definition IntVector.h:330
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntType & operator()(int32 ComponentIndex) const
Definition IntVector.h:133
TIntVector3 operator|(IntType Value) const
Definition IntVector.h:396
static TIntVector3 DivideAndRoundUp(TIntVector3 Lhs, TIntVector3 Divisor)
Definition IntVector.h:593
TIntVector3 operator-(const TIntVector3 &Other) const
Definition IntVector.h:352
TIntVector3(IntType InValue)
Definition IntVector.h:74
IntType & operator()(int32 ComponentIndex)
Definition IntVector.h:146
bool operator!=(const TIntVector3 &Other) const
Definition IntVector.h:196
static TIntVector3 DivideAndRoundUp(TIntVector3 Lhs, IntType Divisor)
Definition IntVector.h:588
IntType GetMax() const
Definition IntVector.h:426
TIntVector3(TIntVector3< OtherIntType > Other)
Definition IntVector.h:112
InIntType IntType
Definition IntVector.h:23
void AppendString(TStringBuilderBase< CharType > &Out) const
Definition IntVector.h:522
const IntType & operator[](int32 ComponentIndex) const
Definition IntVector.h:159
bool operator==(const TIntVector3 &Other) const
Definition IntVector.h:185
TIntVector3 & operator*=(const TIntVector3 &Other)
Definition IntVector.h:207
TIntVector3(const TIntVector3 &)=default
TIntVector3 & operator+=(const TIntVector3 &Other)
Definition IntVector.h:267
TIntVector3 operator&(IntType Value) const
Definition IntVector.h:385
static const TIntVector3 NoneValue
Definition IntVector.h:48
friend TStringBuilderBase< CharType > & operator<<(TStringBuilderBase< CharType > &Builder, const TIntVector3 &Vector)
Definition IntVector.h:534
IntType GetAbsMax() const
Definition IntVector.h:436
bool SerializeFromMismatchedTag(FName StructTag, FArchive &Ar)
Definition IntVector.h:634
TIntVector3 operator^(IntType Value) const
Definition IntVector.h:407
TIntVector3 & operator-=(const TIntVector3 &Other)
Definition IntVector.h:282
IntType Z
Definition IntVector.h:37
IntType XYZ[3]
Definition IntVector.h:41
bool InitFromString(const FString &InSourceString)
Definition IntVector.h:571
IntType GetMin() const
Definition IntVector.h:453
IntType & operator[](int32 ComponentIndex)
Definition IntVector.h:172
TIntVector3 operator<<(IntType Shift) const
Definition IntVector.h:374
Definition IntVector.h:1216
PRAGMA_ENABLE_DEPRECATION_WARNINGS const IntType & operator()(int32 ComponentIndex) const
Definition IntVector.h:1307
TIntVector4 & operator*=(IntType Scale)
Definition IntVector.h:1397
IntType GetMax() const
Definition IntVector.h:1606
bool IsZero() const
Definition IntVector.h:1596
FString ToString() const
Definition IntVector.h:1726
TIntVector4 operator^(IntType Value) const
Definition IntVector.h:1587
bool operator!=(const TIntVector4 &Other) const
Definition IntVector.h:1370
TIntVector4 & operator=(TIntVector4 &&)=default
TIntVector4(EForceInit)
Definition IntVector.h:1273
TIntVector4(const TIntVector4 &)=default
TIntVector4 & operator%=(IntType Divisor)
Definition IntVector.h:1429
static TIntVector4 DivideAndRoundUp(TIntVector4 Lhs, TIntVector4 Divisor)
Definition IntVector.h:1766
PRAGMA_DISABLE_DEPRECATION_WARNINGS TIntVector4(TIntVector4 &&)=default
TIntVector4 operator%(IntType Divisor) const
Definition IntVector.h:1510
bool Serialize(FArchive &Ar)
Definition IntVector.h:1806
TIntVector4 operator>>(IntType Shift) const
Definition IntVector.h:1543
TIntVector4 ComponentMax(const TIntVector4 &Other) const
Definition IntVector.h:1661
TIntVector4 operator<<(IntType Shift) const
Definition IntVector.h:1554
IntType GetAbsMax() const
Definition IntVector.h:1616
bool InitFromString(const FString &InSourceString)
Definition IntVector.h:1740
const IntType & operator[](int32 ComponentIndex) const
Definition IntVector.h:1333
friend FArchive & operator<<(FArchive &Ar, TIntVector4 &Vector)
Definition IntVector.h:1792
TIntVector4 & operator+=(const TIntVector4 &Other)
Definition IntVector.h:1445
TIntVector4 & operator*=(const TIntVector4 &Other)
Definition IntVector.h:1381
IntType Z
Definition IntVector.h:1231
TIntVector4 operator&(IntType Value) const
Definition IntVector.h:1565
TIntVector4 & operator=(const TIntVector4 &)=default
friend void operator<<(FStructuredArchive::FSlot Slot, TIntVector4 &Vector)
Definition IntVector.h:1797
TIntVector4 ComponentMin(const TIntVector4 &Other) const
Definition IntVector.h:1676
TIntVector4(const TIntVector3< IntType > &InValue, IntType InW=0)
Definition IntVector.h:1265
IntType GetMin() const
Definition IntVector.h:1633
friend TStringBuilderBase< CharType > & operator<<(TStringBuilderBase< CharType > &Builder, const TIntVector4 &Vector)
Definition IntVector.h:1703
void AppendString(TStringBuilderBase< CharType > &Out) const
Definition IntVector.h:1691
IntType & operator()(int32 ComponentIndex)
Definition IntVector.h:1320
static int32 Num()
Definition IntVector.h:1780
void AppendString(FString &Out) const
Definition IntVector.h:1714
TIntVector4 operator/(IntType Divisor) const
Definition IntVector.h:1499
TIntVector4(TIntVector4< OtherIntType > Other)
Definition IntVector.h:1285
IntType GetAbsMin() const
Definition IntVector.h:1643
IntType & operator[](int32 ComponentIndex)
Definition IntVector.h:1346
TIntVector4(IntType InValue)
Definition IntVector.h:1257
bool SerializeFromMismatchedTag(FName StructTag, FArchive &Ar)
Definition IntVector.h:1812
IntType W
Definition IntVector.h:1234
TIntVector4 operator-(const TIntVector4 &Other) const
Definition IntVector.h:1532
IntType X
Definition IntVector.h:1225
TIntVector4 operator+(const TIntVector4 &Other) const
Definition IntVector.h:1521
TIntVector4 operator*(const TIntVector4 &Other) const
Definition IntVector.h:1477
TIntVector4 operator*(IntType Scale) const
Definition IntVector.h:1488
static TIntVector4 DivideAndRoundUp(TIntVector4 Lhs, IntType Divisor)
Definition IntVector.h:1757
bool operator==(const TIntVector4 &Other) const
Definition IntVector.h:1359
IntType Y
Definition IntVector.h:1228
TIntVector4 operator|(IntType Value) const
Definition IntVector.h:1576
InIntType IntType
Definition IntVector.h:1217
TIntVector4 & operator/=(IntType Divisor)
Definition IntVector.h:1413
TIntVector4 & operator-=(const TIntVector4 &Other)
Definition IntVector.h:1461
Definition Vector.h:51