From 30b74f2f9da38739486cbe78a639656cc44d35d8 Mon Sep 17 00:00:00 2001 From: dai zengtao <1711467513@qq.com> Date: Tue, 29 Apr 2025 16:24:37 +0800 Subject: [PATCH 1/2] Update: Add a Kdtree collection type, collect from Kdtree at a box --- .../Kdtree/Private/AsyncKdtreeBPLibrary.cpp | 3 +- .../Source/Kdtree/Private/KdtreeBPLibrary.cpp | 5 +-- .../Source/Kdtree/Private/KdtreeInternal.cpp | 33 ++++++++++++++----- Kdtree/Source/Kdtree/Private/KdtreeInternal.h | 2 +- Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h | 5 +-- Kdtree/Source/Kdtree/Public/KdtreeCommon.h | 10 ++++++ 6 files changed, 43 insertions(+), 15 deletions(-) diff --git a/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp b/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp index a7493f2..87ec9ad 100644 --- a/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp +++ b/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp @@ -89,6 +89,7 @@ struct FCollectFromKdtreeTaskParams float Radius; TArray* Indices; TArray* Data; + EKdtreeCollectionType Method = EKdtreeCollectionType::Circle; }; class FCollectFromKdtreeTask : public FNonAbandonableTask @@ -100,7 +101,7 @@ class FCollectFromKdtreeTask : public FNonAbandonableTask void DoWork() { - KdtreeInternal::CollectFromKdtree(Params.Tree->Internal, Params.Center, Params.Radius, Params.Indices); + KdtreeInternal::CollectFromKdtree(Params.Tree->Internal, Params.Center, Params.Radius, Params.Indices, Params.Method); for (int Index = 0; Index < Params.Indices->Num(); ++Index) { Params.Data->Add(Params.Tree->Internal.Data[(*Params.Indices)[Index]]); diff --git a/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp b/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp index e562e07..6341f32 100644 --- a/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp +++ b/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp @@ -27,9 +27,10 @@ void UKdtreeBPLibrary::ClearKdtree(FKdtree& Tree) } void UKdtreeBPLibrary::CollectFromKdtree( - const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data) + const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data, + EKdtreeCollectionType Method) { - KdtreeInternal::CollectFromKdtree(Tree.Internal, Center, Radius, &Indices); + KdtreeInternal::CollectFromKdtree(Tree.Internal, Center, Radius, &Indices, Method); for (int Index = 0; Index < Indices.Num(); ++Index) { Data.Add(Tree.Internal.Data[Indices[Index]]); diff --git a/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp b/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp index 5ee1c94..0464b7f 100644 --- a/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp +++ b/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp @@ -198,7 +198,8 @@ void DumpKdTree(const FKdtreeInternal& Tree, const FKdtreeNode* Node) } void CollectFromKdtree( - const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FVector& Center, float Radius, TArray* Result) + const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FVector& Center, float Radius, TArray* Result, + EKdtreeCollectionType Method) { if (Node == nullptr) { @@ -206,19 +207,32 @@ void CollectFromKdtree( } const FVector& Current = Tree.Data[Node->Index]; - if (FVector::DistSquared(Center, Current) < Radius * Radius) + switch (Method) { - Result->Add(Node->Index); + case EKdtreeCollectionType::Circle: + if (FVector::DistSquared(Center, Current) < Radius * Radius) + { + Result->Add(Node->Index); + } + break; + case EKdtreeCollectionType::Box: + if (FMath::Abs(Current.X - Center.X) <= Radius + && FMath::Abs(Current.Y - Center.Y) <= Radius + && FMath::Abs(Current.Z - Center.Z) <= Radius) + { + Result->Add(Node->Index); + } + break; } int Axis = Node->Axis; if (Center[Axis] < Current[Axis]) { - CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result); + CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result, Method); } else { - CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result); + CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result, Method); } float Diff = FMath::Abs(Center[Axis] - Current[Axis]); @@ -226,11 +240,11 @@ void CollectFromKdtree( { if (Center[Axis] < Current[Axis]) { - CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result); + CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result, Method); } else { - CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result); + CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result, Method); } } } @@ -257,9 +271,10 @@ void ClearKdtree(FKdtreeInternal* Tree) Tree->Data.Empty(); } -void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result) +void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result, + EKdtreeCollectionType Method) { - CollectFromKdtree(Tree, Tree.Root, Center, Radius, Result); + CollectFromKdtree(Tree, Tree.Root, Center, Radius, Result, Method); } void ValidateKdtree(const FKdtreeInternal& Tree) diff --git a/Kdtree/Source/Kdtree/Private/KdtreeInternal.h b/Kdtree/Source/Kdtree/Private/KdtreeInternal.h index 363c84b..b64179c 100644 --- a/Kdtree/Source/Kdtree/Private/KdtreeInternal.h +++ b/Kdtree/Source/Kdtree/Private/KdtreeInternal.h @@ -23,7 +23,7 @@ struct FKdtreeNode void BuildKdtree(FKdtreeInternal* Tree, const TArray& Data); void ClearKdtree(FKdtreeInternal* Tree); -void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result); +void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result, EKdtreeCollectionType Method); void ValidateKdtree(const FKdtreeInternal& Tree); void DumpKdTree(const FKdtreeInternal& Tree); } // namespace KdtreeInternal diff --git a/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h b/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h index 2a3ff82..d1aec3e 100644 --- a/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h +++ b/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h @@ -28,9 +28,10 @@ class KDTREE_API UKdtreeBPLibrary : public UBlueprintFunctionLibrary UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree") static void ClearKdtree(UPARAM(ref) FKdtree& Tree); - UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree") + UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree", meta = (AdvancedDisplay = "Method")) static void CollectFromKdtree( - const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data); + const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data, + EKdtreeCollectionType Method = EKdtreeCollectionType::Circle); UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree") static void ValidateKdtree(const FKdtree& Tree); diff --git a/Kdtree/Source/Kdtree/Public/KdtreeCommon.h b/Kdtree/Source/Kdtree/Public/KdtreeCommon.h index d8b8b66..a80a69a 100644 --- a/Kdtree/Source/Kdtree/Public/KdtreeCommon.h +++ b/Kdtree/Source/Kdtree/Public/KdtreeCommon.h @@ -31,3 +31,13 @@ struct KDTREE_API FKdtree FKdtreeInternal Internal; }; + +/** + * Enum to represent different collection methods for Kdtree + */ +UENUM(BlueprintType) +enum class EKdtreeCollectionType : uint8 +{ + Circle UMETA(DisplayName = "Circle (Default)"), + Box UMETA(DisplayName = "Box") +}; From 5f232c697019e32c27f426ca4175881665f6a2fd Mon Sep 17 00:00:00 2001 From: dai zengtao <1711467513@qq.com> Date: Tue, 6 May 2025 11:37:16 +0800 Subject: [PATCH 2/2] Update: function improvement --- .../Kdtree/Private/AsyncKdtreeBPLibrary.cpp | 67 ++++++++++++++++++- .../Source/Kdtree/Private/KdtreeBPLibrary.cpp | 15 ++++- .../Source/Kdtree/Private/KdtreeInternal.cpp | 65 +++++++++++------- Kdtree/Source/Kdtree/Private/KdtreeInternal.h | 3 +- .../Kdtree/Public/AsyncKdtreeBPLibrary.h | 9 ++- Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h | 9 ++- Kdtree/Source/Kdtree/Public/KdtreeCommon.h | 10 --- 7 files changed, 133 insertions(+), 45 deletions(-) diff --git a/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp b/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp index 87ec9ad..ef70d77 100644 --- a/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp +++ b/Kdtree/Source/Kdtree/Private/AsyncKdtreeBPLibrary.cpp @@ -89,7 +89,6 @@ struct FCollectFromKdtreeTaskParams float Radius; TArray* Indices; TArray* Data; - EKdtreeCollectionType Method = EKdtreeCollectionType::Circle; }; class FCollectFromKdtreeTask : public FNonAbandonableTask @@ -101,7 +100,7 @@ class FCollectFromKdtreeTask : public FNonAbandonableTask void DoWork() { - KdtreeInternal::CollectFromKdtree(Params.Tree->Internal, Params.Center, Params.Radius, Params.Indices, Params.Method); + KdtreeInternal::CollectFromKdtree(Params.Tree->Internal, Params.Center, Params.Radius, Params.Indices); for (int Index = 0; Index < Params.Indices->Num(); ++Index) { Params.Data->Add(Params.Tree->Internal.Data[(*Params.Indices)[Index]]); @@ -156,3 +155,67 @@ void UAsyncKdtreeBPLibrary::CollectFromKdtreeAsync(const UObject* WorldContextOb } } } + +class FCollectFromKdtreeBoxTask : public FNonAbandonableTask +{ +public: + FCollectFromKdtreeBoxTask(const FCollectFromKdtreeTaskParams& InParams, const FBox& InBox) : Params(InParams), Box(InBox) + { + } + + void DoWork() + { + KdtreeInternal::CollectFromKdtree(Params.Tree->Internal, Box, Params.Indices); + for (int Index = 0; Index < Params.Indices->Num(); ++Index) + { + Params.Data->Add(Params.Tree->Internal.Data[(*Params.Indices)[Index]]); + } + } + + FORCEINLINE TStatId GetStatId() const + { + RETURN_QUICK_DECLARE_CYCLE_STAT(FCollectFromKdtreeTask, STATGROUP_ThreadPoolAsyncTasks); + } + +private: + FCollectFromKdtreeTaskParams Params; + FBox Box; +}; + +class FCollectFromKdtreeBoxAction : public FPendingLatentAction +{ +public: + FLatentActionInfo LatentInfo; + FAsyncTask* Task; + + FCollectFromKdtreeBoxAction(const FLatentActionInfo& InLatentInfo, const FKdtree* Tree, const FBox Box, + TArray* Indices, TArray* Data) + : LatentInfo(InLatentInfo), Task(nullptr) + { + FCollectFromKdtreeTaskParams Params; + Params.Tree = Tree; + Params.Indices = Indices; + Params.Data = Data; + Task = new FAsyncTask(Params, Box); + Task->StartBackgroundTask(); + } + + void UpdateOperation(FLatentResponse& Response) override + { + Response.FinishAndTriggerIf(Task->IsDone(), LatentInfo.ExecutionFunction, LatentInfo.Linkage, LatentInfo.CallbackTarget); + } +}; + +void UAsyncKdtreeBPLibrary::CollectFromKdtreeAsync_Box(const UObject* WorldContextObject, const FKdtree& Tree, const FBox Box, + TArray& Indices, TArray& Data, FLatentActionInfo LatentInfo) +{ + if (UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull)) + { + FLatentActionManager& LatentManager = World->GetLatentActionManager(); + if (LatentManager.FindExistingAction(LatentInfo.CallbackTarget, LatentInfo.UUID) == nullptr) + { + FCollectFromKdtreeBoxAction* NewAction = new FCollectFromKdtreeBoxAction(LatentInfo, &Tree, Box, &Indices, &Data); + LatentManager.AddNewAction(LatentInfo.CallbackTarget, LatentInfo.UUID, NewAction); + } + } +} diff --git a/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp b/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp index 6341f32..9718722 100644 --- a/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp +++ b/Kdtree/Source/Kdtree/Private/KdtreeBPLibrary.cpp @@ -27,10 +27,19 @@ void UKdtreeBPLibrary::ClearKdtree(FKdtree& Tree) } void UKdtreeBPLibrary::CollectFromKdtree( - const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data, - EKdtreeCollectionType Method) + const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data) { - KdtreeInternal::CollectFromKdtree(Tree.Internal, Center, Radius, &Indices, Method); + KdtreeInternal::CollectFromKdtree(Tree.Internal, Center, Radius, &Indices); + for (int Index = 0; Index < Indices.Num(); ++Index) + { + Data.Add(Tree.Internal.Data[Indices[Index]]); + } +} + +void UKdtreeBPLibrary::CollectFromKdtree_Box(const FKdtree& Tree, const FBox Box, TArray& Indices, + TArray& Data) +{ + KdtreeInternal::CollectFromKdtree(Tree.Internal, Box, &Indices); for (int Index = 0; Index < Indices.Num(); ++Index) { Data.Add(Tree.Internal.Data[Indices[Index]]); diff --git a/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp b/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp index 0464b7f..a1a90c7 100644 --- a/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp +++ b/Kdtree/Source/Kdtree/Private/KdtreeInternal.cpp @@ -198,8 +198,7 @@ void DumpKdTree(const FKdtreeInternal& Tree, const FKdtreeNode* Node) } void CollectFromKdtree( - const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FVector& Center, float Radius, TArray* Result, - EKdtreeCollectionType Method) + const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FVector& Center, float Radius, TArray* Result) { if (Node == nullptr) { @@ -207,32 +206,19 @@ void CollectFromKdtree( } const FVector& Current = Tree.Data[Node->Index]; - switch (Method) + if (FVector::DistSquared(Center, Current) < Radius * Radius) { - case EKdtreeCollectionType::Circle: - if (FVector::DistSquared(Center, Current) < Radius * Radius) - { - Result->Add(Node->Index); - } - break; - case EKdtreeCollectionType::Box: - if (FMath::Abs(Current.X - Center.X) <= Radius - && FMath::Abs(Current.Y - Center.Y) <= Radius - && FMath::Abs(Current.Z - Center.Z) <= Radius) - { - Result->Add(Node->Index); - } - break; + Result->Add(Node->Index); } int Axis = Node->Axis; if (Center[Axis] < Current[Axis]) { - CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result, Method); + CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result); } else { - CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result, Method); + CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result); } float Diff = FMath::Abs(Center[Axis] - Current[Axis]); @@ -240,15 +226,40 @@ void CollectFromKdtree( { if (Center[Axis] < Current[Axis]) { - CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result, Method); + CollectFromKdtree(Tree, Node->ChildRight, Center, Radius, Result); } else { - CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result, Method); + CollectFromKdtree(Tree, Node->ChildLeft, Center, Radius, Result); } } } -} // namespace + +void CollectFromKdtree( + const FKdtreeInternal& Tree, const FKdtreeNode* Node, const FBox& Box, TArray* Result) +{ + if (Node == nullptr) + { + return; + } + + const FVector& Current = Tree.Data[Node->Index]; + if (Box.IsInsideOrOn(Current)) + { + Result->Add(Node->Index); + } + + int Axis = Node->Axis; + if (Box.Min[Axis] < Current[Axis]) + { + CollectFromKdtree(Tree, Node->ChildLeft, Box, Result); + } + if (Box.Max[Axis] > Current[Axis]) + { + CollectFromKdtree(Tree, Node->ChildRight, Box, Result); + } +} +} // namespace void BuildKdtree(FKdtreeInternal* Tree, const TArray& Data) { @@ -271,10 +282,14 @@ void ClearKdtree(FKdtreeInternal* Tree) Tree->Data.Empty(); } -void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result, - EKdtreeCollectionType Method) +void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result) +{ + CollectFromKdtree(Tree, Tree.Root, Center, Radius, Result); +} + +void CollectFromKdtree(const FKdtreeInternal& Tree, const FBox& Box, TArray* Result) { - CollectFromKdtree(Tree, Tree.Root, Center, Radius, Result, Method); + CollectFromKdtree(Tree, Tree.Root, Box, Result); } void ValidateKdtree(const FKdtreeInternal& Tree) diff --git a/Kdtree/Source/Kdtree/Private/KdtreeInternal.h b/Kdtree/Source/Kdtree/Private/KdtreeInternal.h index b64179c..ebe904f 100644 --- a/Kdtree/Source/Kdtree/Private/KdtreeInternal.h +++ b/Kdtree/Source/Kdtree/Private/KdtreeInternal.h @@ -23,7 +23,8 @@ struct FKdtreeNode void BuildKdtree(FKdtreeInternal* Tree, const TArray& Data); void ClearKdtree(FKdtreeInternal* Tree); -void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result, EKdtreeCollectionType Method); +void CollectFromKdtree(const FKdtreeInternal& Tree, const FVector& Center, float Radius, TArray* Result); +void CollectFromKdtree(const FKdtreeInternal& Tree, const FBox& Box, TArray* Result); void ValidateKdtree(const FKdtreeInternal& Tree); void DumpKdTree(const FKdtreeInternal& Tree); } // namespace KdtreeInternal diff --git a/Kdtree/Source/Kdtree/Public/AsyncKdtreeBPLibrary.h b/Kdtree/Source/Kdtree/Public/AsyncKdtreeBPLibrary.h index a815dc5..3d66767 100644 --- a/Kdtree/Source/Kdtree/Public/AsyncKdtreeBPLibrary.h +++ b/Kdtree/Source/Kdtree/Public/AsyncKdtreeBPLibrary.h @@ -32,7 +32,14 @@ class KDTREE_API UAsyncKdtreeBPLibrary : public UBlueprintFunctionLibrary UFUNCTION(BlueprintCallable, meta = (WorldContextObject = "WorldContextObject", Latent, LatentInfo = "LatentInfo", HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject"), - Category = "SpacialDataStructure|kd-tree") + Category = "SpacialDataStructure|kd-tree", DisplayName = "Collect From Kdtree Async (Sphere)") static void CollectFromKdtreeAsync(const UObject* WorldContextObject, const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data, FLatentActionInfo LatentInfo); + + UFUNCTION(BlueprintCallable, + meta = (WorldContextObject = "WorldContextObject", Latent, LatentInfo = "LatentInfo", HidePin = "WorldContextObject", + DefaultToSelf = "WorldContextObject"), + Category = "SpacialDataStructure|kd-tree", DisplayName= "Collect From Kdtree Async (Box)") + static void CollectFromKdtreeAsync_Box(const UObject* WorldContextObject, const FKdtree& Tree, const FBox Box, + TArray& Indices, TArray& Data, FLatentActionInfo LatentInfo); }; diff --git a/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h b/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h index d1aec3e..49e1068 100644 --- a/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h +++ b/Kdtree/Source/Kdtree/Public/KdtreeBPLibrary.h @@ -28,10 +28,13 @@ class KDTREE_API UKdtreeBPLibrary : public UBlueprintFunctionLibrary UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree") static void ClearKdtree(UPARAM(ref) FKdtree& Tree); - UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree", meta = (AdvancedDisplay = "Method")) + UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName="Collect From Kdtree (Sphere)") static void CollectFromKdtree( - const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data, - EKdtreeCollectionType Method = EKdtreeCollectionType::Circle); + const FKdtree& Tree, const FVector Center, float Radius, TArray& Indices, TArray& Data); + + UFUNCTION(BlueprintCallable, Category = "SpacialDataStructure|kd-tree", DisplayName="Collect From Kdtree (Box)") + static void CollectFromKdtree_Box( + const FKdtree& Tree, const FBox Box, TArray& Indices, TArray& Data); UFUNCTION(BluePrintCallable, Category = "SpacialDataStructure|kd-tree") static void ValidateKdtree(const FKdtree& Tree); diff --git a/Kdtree/Source/Kdtree/Public/KdtreeCommon.h b/Kdtree/Source/Kdtree/Public/KdtreeCommon.h index a80a69a..d8b8b66 100644 --- a/Kdtree/Source/Kdtree/Public/KdtreeCommon.h +++ b/Kdtree/Source/Kdtree/Public/KdtreeCommon.h @@ -31,13 +31,3 @@ struct KDTREE_API FKdtree FKdtreeInternal Internal; }; - -/** - * Enum to represent different collection methods for Kdtree - */ -UENUM(BlueprintType) -enum class EKdtreeCollectionType : uint8 -{ - Circle UMETA(DisplayName = "Circle (Default)"), - Box UMETA(DisplayName = "Box") -};