Files
UnrealEngineUWP/Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectHashGrid.h
yoan stamant 722ecdcae0 [Smart object] Space partition structure is now configurable
* Created Default SmartObjectOctree
* Created Default SmartObjectHashGrid
* Type of space partition to use can be set in the smartobject config file: [/Script/SmartObjectsModule.SmartObjectSubsystem] SpacePartitionClassName=<ClassPath>
* Created DebugSceneProxy and RenderingComponent to share functionalities between susbystem and testing actor rendering components
#rnx
#rb mieszko.zielinski
#preflight 620fb51dec6f84cdfa3b2772

#ROBOMERGE-OWNER: yoan.stamant
#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19050433 via CL 19050556 via CL 19050564 via CL 19057424
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066037 by yoan stamant in ue5-main branch]
2022-02-21 01:10:34 -05:00

37 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "HierarchicalHashGrid2D.h"
#include "SmartObjectTypes.h"
#include "SmartObjectHashGrid.generated.h"
struct FSmartObjectHandle;
typedef THierarchicalHashGrid2D<2, 4, FSmartObjectHandle> FSmartObjectHashGrid2D;
USTRUCT()
struct SMARTOBJECTSMODULE_API FSmartObjectHashGridEntryData : public FSmartObjectSpatialEntryData
{
GENERATED_BODY()
FSmartObjectHashGrid2D::FCellLocation CellLoc;
};
UCLASS()
class SMARTOBJECTSMODULE_API USmartObjectHashGrid : public USmartObjectSpacePartition
{
GENERATED_BODY()
protected:
virtual FInstancedStruct Add(const FSmartObjectHandle& Handle, const FBox& Bounds) override;
virtual void Remove(const FSmartObjectHandle& Handle, const FStructView& EntryData) override;
virtual void Find(const FBox& QueryBox, TArray<FSmartObjectHandle>& OutResults) override;
#if UE_ENABLE_DEBUG_DRAWING
virtual void Draw(FDebugRenderSceneProxy* DebugProxy) override;
#endif
private:
FSmartObjectHashGrid2D HashGrid;
};