23 template<
typename VectorType,
typename Allocator>
52 return P[a].X == P[b].X ? P[a].Y < P[b].Y : P[a].X < P[b].X;
57 [](
const VectorType& O,
const VectorType&
A,
const VectorType&
B)
59 return ((
A.X - O.X) * (
B.Y - O.Y) - (
A.Y - O.Y) * (
B.X - O.X)) <= 0;
68 const VectorType&
B = Points[SortedIndices[
Index]];
80 const VectorType&
B = Points[SortedIndices[
Index - 1]];
100 return u1 * v2 - v1 *
u2;
135 template<
typename Allocator>
138 if (Points.
Num() == 0)
148 for (
int32 i = 1; i < Points.
Num(); ++i)
172 bool bFinished =
false;
179 for (
int j = 0; j < Points.
Num(); ++j)
197 else if(
Deter < 0.001)
256 return u1 * v2 - v1 *
u2;
264 template<
typename Allocator>
267 if (Points.
Num() == 0)
295 for (
int32 j = 1; j < Points.
Num(); j++)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
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 SetNumUninitialized(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2369
UE_REWRITE void Sort(RangeType &&Range)
Definition Sort.h:16
Definition ConvexHull2d.h:10
FVector::FReal ComputeDeterminant(const FVector &A, const FVector &B, const FVector &C)
Definition ConvexHull2d.h:93
void ComputeConvexHullLegacy2(const TArray< FVector2D, Allocator > &Points, TArray< int32, Allocator > &OutIndices)
Definition ConvexHull2d.h:265
void ComputeConvexHullLegacy(const TArray< FVector, Allocator > &Points, TArray< int32, Allocator > &OutIndices)
Definition ConvexHull2d.h:136
bool ComparePoints(const FVector &A, const FVector &B)
Definition ConvexHull2d.h:104
FVector2D::FReal ComputeDeterminant2D(const FVector2D &A, const FVector2D &B, const FVector2D &C)
Definition ConvexHull2d.h:249
void ComputeConvexHull(const TArray< VectorType, Allocator > &Points, TArray< int32, Allocator > &OutIndices)
Definition ConvexHull2d.h:24
U16 Index
Definition radfft.cpp:71
double FReal
Definition Vector2D.h:42
double FReal
Definition Vector.h:55