21 template<
typename TRealType>
24 return A * FMath::Abs(
A);
28 template<
class TINT = u
int64>
41 template<
class TINT = u
int64>
49 template<
class TINT = u
int64>
57 template<
class T,
class TARRAY = TArray<T>>
63 for (
const T& V : Values)
65 MinV = V < MinV ? V : MinV;
80 template<
class T,
class TARRAY = TArray<T>>
84 for (
const T& V : Values)
92 return static_cast<T
>(
AvgV);
96 template<
class T,
class TARRAY = TArray<T>>
100 for (
const T& V : Values)
113 template<
class T,
class TARRAY = TArray<T>>
120 template<
class T,
class TARRAY = TArray<T>>
128 template<
class T,
class TARRAY = TArray<T>>
161 L.M[0][0] *
R.M[0][0] + L.M[1][0] *
R.M[0][1] + L.M[2][0] *
R.M[0][2],
162 L.M[0][0] *
R.M[1][0] + L.M[1][0] *
R.M[1][1] + L.M[2][0] *
R.M[1][2],
163 L.M[0][0] *
R.M[2][0] + L.M[1][0] *
R.M[2][1] + L.M[2][0] *
R.M[2][2],
165 L.M[0][1] *
R.M[0][0] + L.M[1][1] *
R.M[0][1] + L.M[2][1] *
R.M[0][2],
166 L.M[0][1] *
R.M[1][0] + L.M[1][1] *
R.M[1][1] + L.M[2][1] *
R.M[1][2],
167 L.M[0][1] *
R.M[2][0] + L.M[1][1] *
R.M[2][1] + L.M[2][1] *
R.M[2][2],
169 L.M[0][2] *
R.M[0][0] + L.M[1][2] *
R.M[0][1] + L.M[2][2] *
R.M[0][2],
170 L.M[0][2] *
R.M[1][0] + L.M[1][2] *
R.M[1][1] + L.M[2][2] *
R.M[1][2],
171 L.M[0][2] *
R.M[2][0] + L.M[1][2] *
R.M[2][1] + L.M[2][2] *
R.M[2][2]
182 L.M[0][0] *
R.M[0][0] + L.M[1][0] *
R.M[0][1] + L.M[2][0] *
R.M[0][2] + L.M[3][0] *
R.M[0][3],
183 L.M[0][0] *
R.M[1][0] + L.M[1][0] *
R.M[1][1] + L.M[2][0] *
R.M[1][2] + L.M[3][0] *
R.M[1][3],
184 L.M[0][0] *
R.M[2][0] + L.M[1][0] *
R.M[2][1] + L.M[2][0] *
R.M[2][2] + L.M[3][0] *
R.M[2][3],
185 L.M[0][0] *
R.M[3][0] + L.M[1][0] *
R.M[3][1] + L.M[2][0] *
R.M[3][2] + L.M[3][0] *
R.M[3][3],
187 L.M[0][1] *
R.M[0][0] + L.M[1][1] *
R.M[0][1] + L.M[2][1] *
R.M[0][2] + L.M[3][1] *
R.M[0][3],
188 L.M[0][1] *
R.M[1][0] + L.M[1][1] *
R.M[1][1] + L.M[2][1] *
R.M[1][2] + L.M[3][1] *
R.M[1][3],
189 L.M[0][1] *
R.M[2][0] + L.M[1][1] *
R.M[2][1] + L.M[2][1] *
R.M[2][2] + L.M[3][1] *
R.M[2][3],
190 L.M[0][1] *
R.M[3][0] + L.M[1][1] *
R.M[3][1] + L.M[2][1] *
R.M[3][2] + L.M[3][1] *
R.M[3][3],
192 L.M[0][2] *
R.M[0][0] + L.M[1][2] *
R.M[0][1] + L.M[2][2] *
R.M[0][2] + L.M[3][2] *
R.M[0][3],
193 L.M[0][2] *
R.M[1][0] + L.M[1][2] *
R.M[1][1] + L.M[2][2] *
R.M[1][2] + L.M[3][2] *
R.M[1][3],
194 L.M[0][2] *
R.M[2][0] + L.M[1][2] *
R.M[2][1] + L.M[2][2] *
R.M[2][2] + L.M[3][2] *
R.M[2][3],
195 L.M[0][2] *
R.M[3][0] + L.M[1][2] *
R.M[3][1] + L.M[2][2] *
R.M[3][2] + L.M[3][2] *
R.M[3][3],
197 L.M[0][3] *
R.M[0][0] + L.M[1][3] *
R.M[0][1] + L.M[2][3] *
R.M[0][2] + L.M[3][3] *
R.M[0][3],
198 L.M[0][3] *
R.M[1][0] + L.M[1][3] *
R.M[1][1] + L.M[2][3] *
R.M[1][2] + L.M[3][3] *
R.M[1][3],
199 L.M[0][3] *
R.M[2][0] + L.M[1][3] *
R.M[2][1] + L.M[2][3] *
R.M[2][2] + L.M[3][3] *
R.M[2][3],
200 L.M[0][3] *
R.M[3][0] + L.M[1][3] *
R.M[3][1] + L.M[2][3] *
R.M[3][2] + L.M[3][3] *
R.M[3][3]
212 L.M[0][0] *
R.M[0][0] + L.M[1][0] *
R.M[1][0] + L.M[2][0] *
R.M[2][0],
213 L.M[0][0] *
R.M[0][1] + L.M[1][0] *
R.M[1][1] + L.M[2][0] *
R.M[2][1],
214 L.M[0][0] *
R.M[0][2] + L.M[1][0] *
R.M[1][2] + L.M[2][0] *
R.M[2][2],
216 L.M[0][1] *
R.M[0][0] + L.M[1][1] *
R.M[1][0] + L.M[2][1] *
R.M[2][0],
217 L.M[0][1] *
R.M[0][1] + L.M[1][1] *
R.M[1][1] + L.M[2][1] *
R.M[2][1],
218 L.M[0][1] *
R.M[0][2] + L.M[1][1] *
R.M[1][2] + L.M[2][1] *
R.M[2][2],
220 L.M[0][2] *
R.M[0][0] + L.M[1][2] *
R.M[1][0] + L.M[2][2] *
R.M[2][0],
221 L.M[0][2] *
R.M[0][1] + L.M[1][2] *
R.M[1][1] + L.M[2][2] *
R.M[2][1],
222 L.M[0][2] *
R.M[0][2] + L.M[1][2] *
R.M[1][2] + L.M[2][2] *
R.M[2][2]
229 L.M[0][0] *
R.M[0][0] + L.M[0][1] *
R.M[0][1] + L.M[0][2] *
R.M[0][2],
230 L.M[0][0] *
R.M[1][0] + L.M[0][1] *
R.M[1][1] + L.M[0][2] *
R.M[1][2],
231 L.M[0][0] *
R.M[2][0] + L.M[0][1] *
R.M[2][1] + L.M[0][2] *
R.M[2][2],
233 L.M[1][0] *
R.M[0][0] + L.M[1][1] *
R.M[0][1] + L.M[1][2] *
R.M[0][2],
234 L.M[1][0] *
R.M[1][0] + L.M[1][1] *
R.M[1][1] + L.M[1][2] *
R.M[1][2],
235 L.M[1][0] *
R.M[2][0] + L.M[1][1] *
R.M[2][1] + L.M[1][2] *
R.M[2][2],
237 L.M[2][0] *
R.M[0][0] + L.M[2][1] *
R.M[0][1] + L.M[2][2] *
R.M[0][2],
238 L.M[2][0] *
R.M[1][0] + L.M[2][1] *
R.M[1][1] + L.M[2][2] *
R.M[1][2],
239 L.M[2][0] *
R.M[2][0] + L.M[2][1] *
R.M[2][1] + L.M[2][2] *
R.M[2][2]
252 L.M[0][0] *
R.X + L.M[1][0] *
R.Y + L.M[2][0] *
R.Z,
253 L.M[0][1] *
R.X + L.M[1][1] *
R.Y + L.M[2][1] *
R.Z,
254 L.M[0][2] *
R.X + L.M[1][2] *
R.Y + L.M[2][2] *
R.Z);
261 L.M[0][0] *
R.X + L.M[1][0] *
R.Y + L.M[2][0] *
R.Z,
262 L.M[0][1] *
R.X + L.M[1][1] *
R.Y + L.M[2][1] *
R.Z,
263 L.M[0][2] *
R.X + L.M[1][2] *
R.Y + L.M[2][2] *
R.Z);
270 L.M[0][0] *
R.X + L.M[1][0] *
R.Y + L.M[2][0] *
R.Z + L.M[3][0] *
R.W,
271 L.M[0][1] *
R.X + L.M[1][1] *
R.Y + L.M[2][1] *
R.Z + L.M[3][1] *
R.W,
272 L.M[0][2] *
R.X + L.M[1][2] *
R.Y + L.M[2][2] *
R.Z + L.M[3][2] *
R.W,
273 L.M[0][3] *
R.X + L.M[1][3] *
R.Y + L.M[2][3] *
R.Z + L.M[3][3] *
R.W
281 const FReal Determinant =
A.Determinant();
289 const FVec3 C1 =
A.GetColumn(1);
290 const FVec3 C2 =
A.GetColumn(2);
311 X[1] = R1[3] - R1[2] *
X[2];
312 X[0] = R0[3] - (R0[1] *
X[1] + R0[2] *
X[2]);
321 return FRigidTransform3(L.GetTranslation() + L.GetRotation().RotateVector(
R.GetTranslation()), L.GetRotation() *
R.GetRotation());
355 -V[2] * (-V[2] * M.M[1][1] + V[1] * M.M[2][1]) + V[1] * (-V[2] * M.M[2][1] + V[1] * M.M[2][2]) +
Im,
356 V[2] * (-V[2] * M.M[1][0] + V[1] * M.M[2][0]) - V[0] * (-V[2] * M.M[2][1] + V[1] * M.M[2][2]),
357 -V[1] * (-V[2] * M.M[1][0] + V[1] * M.M[2][0]) + V[0] * (-V[2] * M.M[1][1] + V[1] * M.M[2][1]),
358 V[2] * (V[2] * M.M[0][0] - V[0] * M.M[2][0]) - V[0] * (V[2] * M.M[2][0] - V[0] * M.M[2][2]) +
Im,
359 -V[1] * (V[2] * M.M[0][0] - V[0] * M.M[2][0]) + V[0] * (V[2] * M.M[1][0] - V[0] * M.M[2][1]),
360 -V[1] * (-V[1] * M.M[0][0] + V[0] * M.M[1][0]) + V[0] * (-V[1] * M.M[1][0] + V[0] * M.M[1][1]) +
Im);
373 -V[2] * (-V[2] * M.M[1][1] + V[1] * M.M[2][1]) + V[1] * (-V[2] * M.M[2][1] + V[1] * M.M[2][2]) +
Im,
374 V[2] * (V[2] * M.M[0][0] - V[0] * M.M[2][0]) - V[0] * (V[2] * M.M[2][0] - V[0] * M.M[2][2]) +
Im,
375 -V[1] * (-V[1] * M.M[0][0] + V[0] * M.M[1][0]) + V[0] * (-V[1] * M.M[1][0] + V[0] * M.M[1][1]) +
Im);
470 FReal F = Numerator / Denominator;
482 if (Denominator > Epsilon)
485 FReal F = Numerator / Denominator;
497 V = V * FMath::InvSqrt(
VLenSq);
507 for (
int32 i = 0; i <
X.Num(); i++)
509 Result +=
X[i] *
Y[i];
543 FVec3 D = Inertia.GetDiagonal();
553 MassScale *
XX, MassScale * XY, MassScale * XZ,
554 MassScale * XY, MassScale *
YY, MassScale * YZ,
555 MassScale * XZ, MassScale * YZ, MassScale *
ZZ);
591 FReal DXSq = (Inertia.X - FMath::Min(Inertia.Y, Inertia.Z));
601 FReal DYSq = (Inertia.Y - FMath::Min(Inertia.X, Inertia.Z));
611 FReal DZSq = (Inertia.Z - FMath::Min(Inertia.X, Inertia.Y));
654 const FReal Epsilon = 1.e-4f)
660 const FReal A = FVec3::DotProduct(D1, D1);
661 const FReal B = FVec3::DotProduct(D1, D2);
662 const FReal C = FVec3::DotProduct(D1,
R);
663 const FReal E = FVec3::DotProduct(D2, D2);
664 const FReal F = FVec3::DotProduct(D2,
R);
677 T = FMath::Clamp<FReal>(
F /
E,
Min,
Max);
682 S = FMath::Clamp<FReal>(-
C /
A,
Min,
Max);
696 S = FMath::Clamp<FReal>(-
C /
A,
Min,
Max);
701 S = FMath::Clamp<FReal>((
B -
C) /
A,
Min,
Max);
718 const FReal Epsilon = 1.e-4f)
727 const FReal A = FVec3::DotProduct(D1, D1);
728 const FReal B = FVec3::DotProduct(D1, D2);
729 const FReal C = FVec3::DotProduct(D1,
R);
730 const FReal E = FVec3::DotProduct(D2, D2);
731 const FReal F = FVec3::DotProduct(D2,
R);
749 S = FMath::Clamp<FReal>(-
C /
A,
Min,
Max);
775#if defined(_MSC_VER) && !defined(__clang__)
817 return (V - FMath::Sqrt(
Disc));
843 constexpr T
C0 = T(1.0);
844 constexpr T C1 = T(1.0 / 6.0);
846 return X * (
C0 + X2 * (C1 ));
856 constexpr T
C0 = T(1.0);
857 constexpr T C1 = T(1.0 / 6.0);
858 constexpr T C2 = T(3.0 / 40.0);
860 return X * (
C0 + X2 * (C1 + X2 * (C2 )));
871 constexpr T
C0 = T(1.0);
872 constexpr T C1 = T(1.0 / 6.0);
873 constexpr T C2 = T(3.0 / 40.0);
874 constexpr T
C3 = T(15.0 / 336.0);
876 return X * (
C0 + X2 * (C1 + X2 * (C2 + X2 * (
C3 ))));
882 template<
typename T,
int Order = 5>
885 static_assert((
Order == 1) || (
Order == 3) || (
Order == 5) || (
Order == 7),
"AsinEst: Only 1, 3, 5, or 7 is supported for the Order");
907 template<
typename T,
int Order = 5>
916 return FMath::Asin(
X);
923 template <
class T,
class TV,
class TV_INT4>
926 Mesh.SetNum(20 *
Grid.GetNumCells() / 4);
929 const int32 NumNodes =
Grid.GetNumNodes();
937 for (
int32 i = 0; i <
Grid.Counts()[0]; i++)
939 for (
int32 j = 0; j <
Grid.Counts()[1]; j++)
941 for (
int32 k = 0; k <
Grid.Counts()[2]; k++)
1018 for (
int32 j = 0; j < d; j++)
1021 MaxIdx = MaxIdx > NodeIdx ? MaxIdx : NodeIdx;
1026 IncidentElements.
SetNum(MaxIdx + 1);
1028 LocalIndex->SetNum(MaxIdx + 1);
1032 for (
int32 j = 0; j < d; j++)
1037 IncidentElements[NodeIdx].
Add(i);
1039 (*LocalIndex)[NodeIdx].Add(j);
1044 return IncidentElements;
1050 while (!Stack.IsEmpty()) {
1068 Visited.Init(
false, L.Num());
1069 for (
int32 v = 0;
v < L.Num(); ++
v) {
1085 Ranges.
Init(-1, Elements.
Num()*4 + 1);
1086 for (
int32 i = 0; i < Elements.
Num(); i++)
1088 for (
int32 j = 0; j < 4; j++)
1093 Ranges[4*i+j] =
count++;
1096 Ranges[Elements.
Num() * 4] =
count;
1104 for (
int32 i = 0; i < Ranges.
Num() - 2; ++i)
1140 Ranges.
Init(-1, Elements.
Num() * 3 + 1);
1141 for (
int32 i = 0; i < Elements.
Num(); i++)
1143 for (
int32 j = 0; j < 3; j++)
1148 Ranges[3 * i + j] =
count++;
1151 Ranges[Elements.
Num() * 3] =
count;
1159 for (
int32 i = 0; i < Ranges.
Num() - 2; ++i)
1210 return GetCount(
A,
B) > 1 || GetCount(
B,
C) > 1 || GetCount(
C,
A) > 1;
1242 MaxIdx = MaxIdx > NodeIdx ? MaxIdx : NodeIdx;
1247 IncidentElements.
SetNum(MaxIdx + 1);
1250 LocalIndex->SetNum(MaxIdx + 1);
1259 IncidentElements[NodeIdx].
Add(i);
1261 (*LocalIndex)[NodeIdx].Add(j);
1266 return IncidentElements;
1273 for (
int32 i = 0; i < IncidentElements.Num(); i++)
1296 else if (V[2] < V[1])
1318 return { -1, -1, -1 };
1322 template <
typename Func1,
typename Func2>
1365 else if (
i1[0] ==
i2[0] &&
i1[1] >
i2[1])
1367 return (
i1[0] ==
i2[0] &&
i1[1] ==
i2[1] &&
i1[2] >
i2[2]);
1413 float TotalWeight = 0;
1414 for (
int32 j = 0; j < 4; ++j) {
1416 TotalWeight += Weights[j];
1418 for (
int32 j = 0; j < 4; ++j) {
1419 Weights[j] /= TotalWeight;
#define check(expr)
Definition AssertionMacros.h:314
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TIntVector2< int32 > FIntVector2
Definition MathFwd.h:91
UE::Math::TIntVector3< int32 > FIntVector3
Definition MathFwd.h:92
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
#define UE_SMALL_NUMBER
Definition UnrealMathUtility.h:130
T X
Definition Vector.h:1168
T Z
Definition Vector.h:1170
T Y
Definition Vector.h:1169
Definition Constraints.Build.cs:6
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_FORCEINLINE_HINT SizeType Emplace(ArgsType &&... Args)
Definition Array.h:2561
void SetNum(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2308
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
void Init(const ElementType &Element, SizeType Number)
Definition Array.h:3043
UE_NODEBUG UE_FORCEINLINE_HINT void Heapify(const PREDICATE_CLASS &Predicate)
Definition Array.h:3640
UE_NODEBUG void Sort()
Definition Array.h:3418
Definition UnrealString.h.inl:34
T AsinEst3(const T X)
Definition Utilities.h:841
bool NormalizeSafe(FVec3 &V, FReal EpsilonSq=UE_SMALL_NUMBER)
Definition Utilities.h:492
T AsinEst7(const T X)
Definition Utilities.h:869
TVec3< T > ComputeDiagonalJointFactorMatrix(const TVec3< T > &V, const PMatrix< T, 3, 3 > &M, const T &Im)
Definition Utilities.h:367
void FindConnectedRegions(const TArray< FIntVector4 > &Elements, TArray< TArray< int32 > > &ConnectedComponents)
Definition Utilities.h:1078
T GetAverage(const TARRAY &Values)
Compute the average value.
Definition Utilities.h:81
void NearestPointsOnLineSegmentToLine(const FVec3 &SegmentBegin, const FVec3 &SegmentEnd, const FVec3 &LinePos, const FVec3 &LineVector, FReal &S, FReal &T, FVec3 &C1, FVec3 &C2, const FReal Epsilon=1.e-4f)
Definition Utilities.h:713
void TetMeshFromGrid(const TUniformGrid< T, 3 > &Grid, TArray< TV_INT4 > &Mesh, TArray< TV > &X)
Generate a tetrahedral mesh from a Freudenthal lattice defined on a 3 dimensional grid.
Definition Utilities.h:924
TVec3< T > ScaleInertia(const TVec3< T > &Inertia, const TVec3< T > &Scale, const bool bScaleMass)
Definition Utilities.h:519
TArray< FIntVector2 > ComputeMeshFacePairs(const TArray< FIntVector4 > &Mesh, Func1 GreaterThan, Func2 Equal)
Definition Utilities.h:1323
TArray< TArray< int > > ComputeIncidentElements(const TArray< TVector< int32, d > > &Mesh, TArray< TArray< int32 > > *LocalIndex=nullptr)
Definition Utilities.h:1013
void ProjectPointOntoAxisAlignedPlane(FVec3 &V, const FVec3 &Dir, int32 AxisIndex, FReal PlaneDir, FReal PlanePos)
Definition Utilities.h:465
T AsinEst5(const T X)
Definition Utilities.h:854
FMatrix33 MultiplyAB(const FMatrix33 &LIn, const FMatrix33 &RIn)
Definition Utilities.h:204
FMatrix33 MultiplyAtB(const FMatrix33 &L, const FMatrix33 &R)
Definition Utilities.h:226
TINT Factorial(TINT Num)
Take the factorial of Num, which should be of integral type.
Definition Utilities.h:29
bool ProjectPointOntoAxisAlignedPlaneSafe(FVec3 &V, const FVec3 &Dir, int32 AxisIndex, FReal PlaneDir, FReal PlanePos, FReal Epsilon)
Definition Utilities.h:478
T DotProduct(const TArray< T > &X, const TArray< T > &Y)
Definition Utilities.h:504
FIntVector3 TetFace(int32 f)
Definition Utilities.h:1307
TRealType SignedSquare(TRealType A)
Definition Utilities.h:22
void DFS_iterative(const TArray< TArray< int32 > > &L, int32 v, TArray< bool > &visited, TArray< int32 > &component)
Definition Utilities.h:1047
FIntVector3 SortFIntVector3(FIntVector3 &V)
Definition Utilities.h:1281
void MergeIncidentElements(const TArray< TArray< int32 > > &ExtraIncidentElements, const TArray< TArray< int32 > > &ExtraIncidentElementsLocal, TArray< TArray< int32 > > &IncidentElements, TArray< TArray< int32 > > &IncidentElementsLocal)
Definition Utilities.h:1269
T RaySphereIntersectionDistance(const TVec3< T > &RayStart, const TVec3< T > &RayDir, const TVec3< T > &SpherePos, const T SphereRadius)
The distance from Start to the sphere along the vector Dir. Returns numeric max if no intersection.
Definition Utilities.h:810
bool ClipLineSegmentToAxisAlignedPlane(FVec3 &V0, FVec3 &V1, const int32 AxisIndex, const FReal PlaneDir, const FReal PlanePos)
Definition Utilities.h:435
T AsinEst(const T X)
Definition Utilities.h:883
void NearestPointsOnLineSegments(const FVec3 &P1, const FVec3 &Q1, const FVec3 &P2, const FVec3 &Q2, FReal &S, FReal &T, FVec3 &C1, FVec3 &C2, const FReal Epsilon=1.e-4f)
Definition Utilities.h:649
FMatrix33 MultiplyABt(const FMatrix33 &L, const FMatrix33 &R)
Definition Utilities.h:209
T AsinEst1(const T X)
Definition Utilities.h:830
FMatrix33 ComputeWorldSpaceInertia(const FRotation3 &CoMRotation, const FMatrix33 &I)
Definition Utilities.h:327
TINT NPermuteR(const TINT N, const TINT R)
Number of ways to choose of R elements from a set of size N, with repetitions.
Definition Utilities.h:50
T GetStandardDeviation(const TARRAY &Values, const T Avg)
Compute the standard deviation of Values, given the average value of Avg.
Definition Utilities.h:121
T ClosestTimeOnLineSegment(const TVec3< T > &Point, const TVec3< T > &StartPoint, const TVec3< T > &EndPoint)
Definition Utilities.h:783
TINT NChooseR(const TINT N, const TINT R)
Number of ways to choose of R elements from a set of size N, with no repetitions.
Definition Utilities.h:42
bool IntersectLineSegments2D(const TVec2< T > &InStartA, const TVec2< T > &InEndA, const TVec2< T > &InStartB, const TVec2< T > &InEndB, T &OutTA, T &OutTB)
Definition Utilities.h:383
FVec3 GetAngularVelocityAdjustedForGyroscopicTorques(const FRotation3 &Q, const FVec3 &I, const FVec3 &W, const FReal Dt)
Definition Utilities.cpp:27
TArray< FIntVector2 > ComputeTetMeshFacePairs(const TArray< FIntVector4 > &TetMesh)
Definition Utilities.h:1358
void GetMinAvgMax(const TARRAY &Values, T &MinV, double &AvgV, T &MaxV)
Compute the minimum, average, and maximum values of Values.
Definition Utilities.h:58
bool BoxFromInertia(const FVec3 &InInertia, const FReal Mass, FVec3 &OutCenter, FVec3 &OutSize)
Definition Utilities.h:560
T AsinEstCrossover(const T X, const T Crossover=T(0.7))
Definition Utilities.h:908
TArray< TArray< FVector3f > > RandomPointsInTet(const TArray< FVector3f > &x, const TArray< FIntVector4 > &TetMesh, const TArray< int32 > &SampleElements, int32 NumRandomPointsPerElement=1)
Definition Utilities.h:1403
PMatrix< T, 3, 3 > ComputeJointFactorMatrix(const TVec3< T > &V, const PMatrix< T, 3, 3 > &M, const T &Im)
Definition Utilities.h:349
void ConnectedComponentsDFSIterative(const TArray< TArray< int32 > > &L, TArray< TArray< int32 > > &C)
Definition Utilities.h:1064
bool Solve(FVec3 &X, const FMatrix33 &A, const FVec3 &B)
Definition Utilities.h:279
T GetVariance(const TARRAY &Values, const T Avg)
Compute the variance of Values, given the average value of Avg.
Definition Utilities.h:97
TArray< int32 > ComputeBoundaryNodes(const TArray< TVec3< int32 > > &TriangleMesh)
Definition Utilities.h:1188
bool ClipLineSegmentToPlane(FVec3 &V0, FVec3 &V1, const FVec3 &PlaneNormal, const FVec3 &PlanePos)
Definition Utilities.h:406
int32 WrapIndex(int32 V, int32 Begin, int32 End)
Definition Utilities.h:632
Definition SkeletalMeshComponent.h:307
TRigidTransform< FReal, 3 > FRigidTransform3
Definition Core.h:22
@ Y
Definition SimulationModuleBase.h:153
@ X
Definition SimulationModuleBase.h:152
TVector< FReal, 4 > FVec4
Definition Core.h:18
FRealDouble FReal
Definition Real.h:22
void Order(int32 &A, int32 &B)
Definition TriangleMesh.cpp:792
PMatrix< FReal, 3, 3 > FMatrix33
Definition Core.h:20
PMatrix< FReal, 4, 4 > FMatrix44
Definition Core.h:21
TVector< FReal, 3 > FVec3
Definition Core.h:17
float v
Definition radaudio_mdct.cpp:62
static constexpr UE_FORCEINLINE_HINT T Lerp(const T &A, const T &B, const U &Alpha)
Definition UnrealMathUtility.h:1116
static UE_FORCEINLINE_HINT bool IsNearlyZero(float Value, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:407
Definition IsIntegral.h:12
Definition NumericLimits.h:41