UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits > Class Template Referencefinal

#include <AABBTree.h>

+ Inheritance diagram for Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >:

Classes

struct  EmptyInit
 
struct  FElementsCollection
 
struct  NodeAndLeafIndices
 

Public Types

using PayloadType = TPayloadType
 
using TType = T
 
- Public Types inherited from Chaos::ISpatialAcceleration< TPayloadType, T, d >
using TPayload = TPayloadType
 

Public Member Functions

 TAABBTree ()
 
virtual void Reset () override
 
virtual void ProgressAsyncTimeSlicing (bool ForceBuildCompletion) override
 
template<typename TParticles >
 TAABBTree (const TParticles &Particles, int32 InMaxChildrenInLeaf=DefaultMaxChildrenInLeaf, int32 InMaxTreeDepth=DefaultMaxTreeDepth, T InMaxPayloadBounds=DefaultMaxPayloadBounds, int32 InMaxNumToProcess=DefaultMaxNumToProcess, bool bInDynamicTree=false, bool bInUseDirtyTree=false, bool bInBuildOverlapCache=true)
 
 TAABBTree (EmptyInit, int32 InMaxChildrenInLeaf=DefaultMaxChildrenInLeaf, int32 InMaxTreeDepth=DefaultMaxTreeDepth, T InMaxPayloadBounds=DefaultMaxPayloadBounds, int32 InMaxNumToProcess=DefaultMaxNumToProcess, bool bInDynamicTree=false, bool bInUseDirtyTree=false, bool bInBuildOverlapCache=true)
 
template<typename ParticleView >
void Reinitialize (const ParticleView &Particles, int32 InMaxChildrenInLeaf=DefaultMaxChildrenInLeaf, int32 InMaxTreeDepth=DefaultMaxTreeDepth, T InMaxPayloadBounds=DefaultMaxPayloadBounds, int32 InMaxNumToProcess=DefaultMaxNumToProcess, bool bInDynamicTree=false, bool bInbBuildOverlapCache=true)
 
virtual TArray< TPayloadType > FindAllIntersections (const FAABB3 &Box) const override
 
bool GetAsBoundsArray (TArray< TAABB< T, 3 > > &AllBounds, int32 NodeIdx, int32 ParentNode, TAABB< T, 3 > &Bounds)
 
virtual ~TAABBTree ()
 
void CopyFrom (const TAABBTree &Other)
 
virtual TUniquePtr< ISpatialAcceleration< TPayloadType, T, 3 > > Copy () const override
 
virtual void Raycast (const FVec3 &Start, const FVec3 &Dir, const FReal Length, ISpatialVisitor< TPayloadType, FReal > &Visitor) const override
 
template<typename SQVisitor >
void Raycast (const FVec3 &Start, const FVec3 &Dir, const FReal Length, SQVisitor &Visitor) const
 
template<typename SQVisitor >
bool RaycastFast (const FVec3 &Start, FQueryFastData &CurData, SQVisitor &Visitor, const FVec3 &Dir, const FVec3 InvDir, const bool bParallel[3]) const
 
void Sweep (const FVec3 &Start, const FVec3 &Dir, const FReal Length, const FVec3 QueryHalfExtents, ISpatialVisitor< TPayloadType, FReal > &Visitor) const override
 
template<typename SQVisitor >
void Sweep (const FVec3 &Start, const FVec3 &Dir, const FReal Length, const FVec3 QueryHalfExtents, SQVisitor &Visitor) const
 
template<typename SQVisitor >
bool SweepFast (const FVec3 &Start, FQueryFastData &CurData, const FVec3 QueryHalfExtents, SQVisitor &Visitor, const FVec3 &Dir, const FVec3 InvDir, const bool bParallel[3]) const
 
void Overlap (const FAABB3 &QueryBounds, ISpatialVisitor< TPayloadType, FReal > &Visitor) const override
 
template<typename SQVisitor >
void Overlap (const FAABB3 &QueryBounds, SQVisitor &Visitor) const
 
template<typename SQVisitor >
bool OverlapFast (const FAABB3 &QueryBounds, SQVisitor &Visitor) const
 
void GetCVars ()
 
FORCEINLINE_DEBUGGABLE bool DirtyElementGridEnabled () const
 
FORCEINLINE_DEBUGGABLE bool EnoughSpaceInGridCell (int32 Hash)
 
FORCEINLINE_DEBUGGABLE bool AddNewDirtyParticleIndexToGridCell (int32 Hash, int32 NewDirtyIndex)
 
FORCEINLINE_DEBUGGABLE bool DeleteDirtyParticleIndexFromGridCell (int32 Hash, int32 DirtyIndex)
 
FORCEINLINE_DEBUGGABLE void DeleteDirtyParticleEverywhere (int32 DeleteDirtyParticleIdx, int32 DeleteDirtyGridOverflowIdx)
 
FORCEINLINE_DEBUGGABLE int32 AddDirtyElementToGrid (const TAABB< T, 3 > &NewBounds, int32 NewDirtyElement)
 
FORCEINLINE_DEBUGGABLE int32 UpdateDirtyElementInGrid (const TAABB< T, 3 > &NewBounds, int32 DirtyElementIndex, int32 DirtyGridOverflowIdx)
 
FElementsCollection DebugGetElementsCollection () const
 
void DynamicTreeDebugStats () const
 
void DumpStats () const override
 
void DumpStatsTo (FOutputDevice &Ar) const override
 
int32 AllocateInternalNode ()
 
NodeAndLeafIndices AllocateLeafNodeAndLeaf (const TPayloadType &Payload, const TAABB< T, 3 > &NewBounds)
 
void DeAllocateInternalNode (int32 NodeIdx)
 
void DeAllocateLeafNode (int32 NodeIdx)
 
int32 WhichChildAmI (int32 NodeIdx)
 
int32 GetSiblingIndex (int32 NodeIdx)
 
int32 FindBestSibling (const TAABB< T, 3 > &InNewBounds, bool &bOutAddToLeaf)
 
void RotateNode (uint32 NodeIdx, bool debugAssert=false)
 
NodeAndLeafIndices InsertLeaf (const TPayloadType &Payload, const TAABB< T, 3 > &NewBounds)
 
void UpdateAncestorBounds (int32 NodeIdx, bool bDoRotation=false)
 
void RemoveLeafNode (int32 LeafNodeIdx, const TPayloadType &Payload)
 
virtual bool RemoveElement (const TPayloadType &Payload) override
 
virtual bool NeedUpdateElement (const TPayloadType &Payload, const TAABB< T, 3 > &NewBounds) override
 
virtual bool UpdateElement (const TPayloadType &Payload, const TAABB< T, 3 > &NewBounds, bool bInHasBounds) override
 
int32 NumDirtyElements () const
 
const AABBTreeStatisticsGetAABBTreeStatistics ()
 
const AABBTreeExpensiveStatisticsGetAABBTreeExpensiveStatistics ()
 
const int32 GetSubtreeDepth (const int32 NodeIdx)
 
const TArray< TPayloadBoundsElement< TPayloadType, T > > & GlobalObjects () const
 
virtual bool ShouldRebuild () override
 
virtual void ClearShouldRebuild () override
 
virtual bool IsTreeDynamic () const override
 
void SetTreeToDynamic ()
 
virtual void PrepareCopyTimeSliced (const ISpatialAcceleration< TPayloadType, T, 3 > &InFrom) override
 
virtual void ProgressCopyTimeSliced (const ISpatialAcceleration< TPayloadType, T, 3 > &InFrom, int MaximumBytesToCopy) override
 
FORCEINLINE_DEBUGGABLE bool ValidateBounds (const TAABB< T, 3 > &Bounds)
 
virtual void Serialize (FChaosArchive &Ar) override
 
void FindOverlappingLeaf (const int32 FirstNode, const int32 LeafIndex, TArray< int32 > &NodeStack)
 
void AddNodesOverlappingLeaves (const TAABBTreeNode< T > &LeftNode, const TAABB< T, 3 > &LeftBounds, const TAABBTreeNode< T > &RightNode, const TAABB< T, 3 > &RightBounds, const bool bDirtyFilter)
 
void AddRootOverlappingLeaves (const TAABBTreeNode< T > &TreeNode, const bool bDirtyFilter)
 
void FillPersistentOverlappingPairs ()
 
void PropagateLeavesDirtyFlag ()
 
void ComputeOverlappingCacheFromRoot (const bool bDirtyFilter)
 
void ComputeOverlappingCacheFromLeaf ()
 
virtual void CacheOverlappingLeaves () override
 
void PrintOverlappingLeaves ()
 
const TArray< TAABBTreeNode< T > > & GetNodes () const
 
const TArray< TLeafType > & GetLeaves () const
 
- Public Member Functions inherited from Chaos::ISpatialAcceleration< TPayloadType, T, d >
 ISpatialAcceleration (SpatialAccelerationType InType=static_cast< SpatialAccelerationType >(ESpatialAcceleration::Unknown))
 
 ISpatialAcceleration (ESpatialAcceleration InType)
 
virtual ~ISpatialAcceleration ()=default
 
virtual bool IsAsyncTimeSlicingComplete ()
 
virtual bool UpdateElement (const TPayloadType &Payload, const TAABB< T, d > &NewBounds, bool bHasBounds)
 
virtual bool RemoveElementFrom (const TPayloadType &Payload, FSpatialAccelerationIdx Idx)
 
virtual bool NeedUpdateElementIn (const TPayloadType &Payload, const TAABB< T, d > &NewBounds, FSpatialAccelerationIdx Idx)
 
virtual bool UpdateElementIn (const TPayloadType &Payload, const TAABB< T, d > &NewBounds, bool bHasBounds, FSpatialAccelerationIdx Idx)
 
virtual void DeepAssign (const ISpatialAcceleration< TPayloadType, T, d > &Other)
 
virtual void DebugDrawLeaf (ISpacialDebugDrawInterface< T > &InInterface, const FLinearColor &InLinearColor, float InThickness) const
 
SpatialAccelerationType GetType () const
 
template<typename TConcrete >
TConcreteAs ()
 
template<typename TConcrete >
const TConcreteAs () const
 
template<typename TConcrete >
TConcreteAsChecked ()
 
template<typename TConcrete >
const TConcreteAsChecked () const
 
int32 GetSyncTimestamp ()
 
void SetSyncTimestamp (int32 InTimestamp)
 

Static Public Attributes

static constexpr int D = 3
 
static constexprDefaultMaxPayloadBounds = 100000
 
static constexpr int32 DefaultMaxChildrenInLeaf = 12
 
static constexpr int32 DefaultMaxTreeDepth = 16
 
static constexpr int32 DefaultMaxNumToProcess = 0
 
static constexpr ESpatialAcceleration StaticType
 

Additional Inherited Members

- Static Public Member Functions inherited from Chaos::ISpatialAcceleration< TPayloadType, T, d >
static ISpatialAcceleration< TPayloadType, T, d > * SerializationFactory (FChaosArchive &Ar, ISpatialAcceleration< TPayloadType, T, d > *Accel)
 
- Protected Member Functions inherited from Chaos::ISpatialAcceleration< TPayloadType, T, d >
virtual void SetAsyncTimeSlicingComplete (bool InState)
 

Member Typedef Documentation

◆ PayloadType

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
using Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::PayloadType = TPayloadType

◆ TType

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
using Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::TType = T

Constructor & Destructor Documentation

◆ TAABBTree() [1/3]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::TAABBTree ( )
inline

◆ TAABBTree() [2/3]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename TParticles >
Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::TAABBTree ( const TParticles Particles,
int32  InMaxChildrenInLeaf = DefaultMaxChildrenInLeaf,
int32  InMaxTreeDepth = DefaultMaxTreeDepth,
InMaxPayloadBounds = DefaultMaxPayloadBounds,
int32  InMaxNumToProcess = DefaultMaxNumToProcess,
bool  bInDynamicTree = false,
bool  bInUseDirtyTree = false,
bool  bInBuildOverlapCache = true 
)
inline

◆ TAABBTree() [3/3]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::TAABBTree ( EmptyInit  ,
int32  InMaxChildrenInLeaf = DefaultMaxChildrenInLeaf,
int32  InMaxTreeDepth = DefaultMaxTreeDepth,
InMaxPayloadBounds = DefaultMaxPayloadBounds,
int32  InMaxNumToProcess = DefaultMaxNumToProcess,
bool  bInDynamicTree = false,
bool  bInUseDirtyTree = false,
bool  bInBuildOverlapCache = true 
)
inline

◆ ~TAABBTree()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::~TAABBTree ( )
inlinevirtual

Member Function Documentation

◆ AddDirtyElementToGrid()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::AddDirtyElementToGrid ( const TAABB< T, 3 > &  NewBounds,
int32  NewDirtyElement 
)
inline

◆ AddNewDirtyParticleIndexToGridCell()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::AddNewDirtyParticleIndexToGridCell ( int32  Hash,
int32  NewDirtyIndex 
)
inline

◆ AddNodesOverlappingLeaves()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::AddNodesOverlappingLeaves ( const TAABBTreeNode< T > &  LeftNode,
const TAABB< T, 3 > &  LeftBounds,
const TAABBTreeNode< T > &  RightNode,
const TAABB< T, 3 > &  RightBounds,
const bool  bDirtyFilter 
)
inline

Recursively add overlapping leaves given 2 nodes in the tree

◆ AddRootOverlappingLeaves()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::AddRootOverlappingLeaves ( const TAABBTreeNode< T > &  TreeNode,
const bool  bDirtyFilter 
)
inline

Recursively add overlapping leaves given a root node in the tree

◆ AllocateInternalNode()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::AllocateInternalNode ( )
inline

◆ AllocateLeafNodeAndLeaf()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
NodeAndLeafIndices Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::AllocateLeafNodeAndLeaf ( const TPayloadType &  Payload,
const TAABB< T, 3 > &  NewBounds 
)
inline

◆ CacheOverlappingLeaves()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::CacheOverlappingLeaves ( )
inlineoverridevirtual

Cache for each leaves all the overlapping leaves

Reimplemented from Chaos::ISpatialAcceleration< TPayloadType, T, d >.

◆ ClearShouldRebuild()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::ClearShouldRebuild ( )
inlineoverridevirtual

◆ ComputeOverlappingCacheFromLeaf()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::ComputeOverlappingCacheFromLeaf ( )
inline

Sequential loop over the leaves to fill the overlapping pairs

◆ ComputeOverlappingCacheFromRoot()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::ComputeOverlappingCacheFromRoot ( const bool  bDirtyFilter)
inline

Simultaneous tree descent to compute the overlapping leaves

◆ Copy()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual TUniquePtr< ISpatialAcceleration< TPayloadType, T, 3 > > Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Copy ( ) const
inlineoverridevirtual

◆ CopyFrom()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::CopyFrom ( const TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits > &  Other)
inline

◆ DeAllocateInternalNode()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DeAllocateInternalNode ( int32  NodeIdx)
inline

◆ DeAllocateLeafNode()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DeAllocateLeafNode ( int32  NodeIdx)
inline

◆ DebugGetElementsCollection()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FElementsCollection Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DebugGetElementsCollection ( ) const
inline

◆ DeleteDirtyParticleEverywhere()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DeleteDirtyParticleEverywhere ( int32  DeleteDirtyParticleIdx,
int32  DeleteDirtyGridOverflowIdx 
)
inline

◆ DeleteDirtyParticleIndexFromGridCell()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DeleteDirtyParticleIndexFromGridCell ( int32  Hash,
int32  DirtyIndex 
)
inline

◆ DirtyElementGridEnabled()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DirtyElementGridEnabled ( ) const
inline

◆ DumpStats()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DumpStats ( ) const
inlineoverridevirtual

◆ DumpStatsTo()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DumpStatsTo ( FOutputDevice Ar) const
inlineoverridevirtual

◆ DynamicTreeDebugStats()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DynamicTreeDebugStats ( ) const
inline

◆ EnoughSpaceInGridCell()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::EnoughSpaceInGridCell ( int32  Hash)
inline

◆ FillPersistentOverlappingPairs()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::FillPersistentOverlappingPairs ( )
inline

Fill the overlapping pairs from the previous persistent and not dirty leaves

◆ FindAllIntersections()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual TArray< TPayloadType > Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::FindAllIntersections ( const FAABB3 Box) const
inlineoverridevirtual

◆ FindBestSibling()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::FindBestSibling ( const TAABB< T, 3 > &  InNewBounds,
bool bOutAddToLeaf 
)
inline

◆ FindOverlappingLeaf()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::FindOverlappingLeaf ( const int32  FirstNode,
const int32  LeafIndex,
TArray< int32 > &  NodeStack 
)
inline

Given a first node and a leaf index find the overlapping leaves and update the node stack

Parameters
FirstNodeFirst node to be added to the stack
LeafIndexLeaf index for which we want to find the overlapping leaves
NodestackNode stack that will be used to traverse the tree and find the overlapping leaves

◆ GetAABBTreeExpensiveStatistics()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
const AABBTreeExpensiveStatistics & Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetAABBTreeExpensiveStatistics ( )
inline

◆ GetAABBTreeStatistics()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
const AABBTreeStatistics & Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetAABBTreeStatistics ( )
inline

◆ GetAsBoundsArray()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetAsBoundsArray ( TArray< TAABB< T, 3 > > &  AllBounds,
int32  NodeIdx,
int32  ParentNode,
TAABB< T, 3 > &  Bounds 
)
inline

◆ GetCVars()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetCVars ( )
inline

◆ GetLeaves()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
const TArray< TLeafType > & Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetLeaves ( ) const
inline

◆ GetNodes()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
const TArray< TAABBTreeNode< T > > & Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetNodes ( ) const
inline

◆ GetSiblingIndex()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetSiblingIndex ( int32  NodeIdx)
inline

◆ GetSubtreeDepth()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
const int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GetSubtreeDepth ( const int32  NodeIdx)
inline

◆ GlobalObjects()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
const TArray< TPayloadBoundsElement< TPayloadType, T > > & Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::GlobalObjects ( ) const
inline

◆ InsertLeaf()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
NodeAndLeafIndices Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::InsertLeaf ( const TPayloadType &  Payload,
const TAABB< T, 3 > &  NewBounds 
)
inline

◆ IsTreeDynamic()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::IsTreeDynamic ( ) const
inlineoverridevirtual

◆ NeedUpdateElement()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::NeedUpdateElement ( const TPayloadType &  Payload,
const TAABB< T, 3 > &  NewBounds 
)
inlineoverridevirtual

◆ NumDirtyElements()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::NumDirtyElements ( ) const
inline

◆ Overlap() [1/2]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Overlap ( const FAABB3 QueryBounds,
ISpatialVisitor< TPayloadType, FReal > &  Visitor 
) const
inlineoverridevirtual

◆ Overlap() [2/2]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename SQVisitor >
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Overlap ( const FAABB3 QueryBounds,
SQVisitor Visitor 
) const
inline

◆ OverlapFast()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename SQVisitor >
bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::OverlapFast ( const FAABB3 QueryBounds,
SQVisitor Visitor 
) const
inline

◆ PrepareCopyTimeSliced()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::PrepareCopyTimeSliced ( const ISpatialAcceleration< TPayloadType, T, 3 > &  InFrom)
inlineoverridevirtual

◆ PrintOverlappingLeaves()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::PrintOverlappingLeaves ( )
inline

Print the overlapping leaves data structure

◆ ProgressAsyncTimeSlicing()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::ProgressAsyncTimeSlicing ( bool  ForceBuildCompletion)
inlineoverridevirtual

◆ ProgressCopyTimeSliced()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::ProgressCopyTimeSliced ( const ISpatialAcceleration< TPayloadType, T, 3 > &  InFrom,
int  MaximumBytesToCopy 
)
inlineoverridevirtual

◆ PropagateLeavesDirtyFlag()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::PropagateLeavesDirtyFlag ( )
inline

Propagates the leaves dirty flag up to the root node

◆ Raycast() [1/2]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Raycast ( const FVec3 Start,
const FVec3 Dir,
const FReal  Length,
ISpatialVisitor< TPayloadType, FReal > &  Visitor 
) const
inlineoverridevirtual

◆ Raycast() [2/2]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename SQVisitor >
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Raycast ( const FVec3 Start,
const FVec3 Dir,
const FReal  Length,
SQVisitor Visitor 
) const
inline

◆ RaycastFast()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename SQVisitor >
bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::RaycastFast ( const FVec3 Start,
FQueryFastData CurData,
SQVisitor Visitor,
const FVec3 Dir,
const FVec3  InvDir,
const bool  bParallel[3] 
) const
inline

◆ Reinitialize()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename ParticleView >
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Reinitialize ( const ParticleView Particles,
int32  InMaxChildrenInLeaf = DefaultMaxChildrenInLeaf,
int32  InMaxTreeDepth = DefaultMaxTreeDepth,
InMaxPayloadBounds = DefaultMaxPayloadBounds,
int32  InMaxNumToProcess = DefaultMaxNumToProcess,
bool  bInDynamicTree = false,
bool  bInbBuildOverlapCache = true 
)
inline

◆ RemoveElement()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::RemoveElement ( const TPayloadType &  Payload)
inlineoverridevirtual

◆ RemoveLeafNode()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::RemoveLeafNode ( int32  LeafNodeIdx,
const TPayloadType &  Payload 
)
inline

◆ Reset()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Reset ( )
inlineoverridevirtual

◆ RotateNode()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::RotateNode ( uint32  NodeIdx,
bool  debugAssert = false 
)
inline

◆ Serialize()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Serialize ( FChaosArchive Ar)
inlineoverridevirtual

◆ SetTreeToDynamic()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::SetTreeToDynamic ( )
inline

◆ ShouldRebuild()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::ShouldRebuild ( )
inlineoverridevirtual

◆ Sweep() [1/2]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Sweep ( const FVec3 Start,
const FVec3 Dir,
const FReal  Length,
const FVec3  QueryHalfExtents,
ISpatialVisitor< TPayloadType, FReal > &  Visitor 
) const
inlineoverridevirtual

◆ Sweep() [2/2]

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename SQVisitor >
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::Sweep ( const FVec3 Start,
const FVec3 Dir,
const FReal  Length,
const FVec3  QueryHalfExtents,
SQVisitor Visitor 
) const
inline

◆ SweepFast()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
template<typename SQVisitor >
bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::SweepFast ( const FVec3 Start,
FQueryFastData CurData,
const FVec3  QueryHalfExtents,
SQVisitor Visitor,
const FVec3 Dir,
const FVec3  InvDir,
const bool  bParallel[3] 
) const
inline

◆ UpdateAncestorBounds()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
void Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::UpdateAncestorBounds ( int32  NodeIdx,
bool  bDoRotation = false 
)
inline

◆ UpdateDirtyElementInGrid()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::UpdateDirtyElementInGrid ( const TAABB< T, 3 > &  NewBounds,
int32  DirtyElementIndex,
int32  DirtyGridOverflowIdx 
)
inline

◆ UpdateElement()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
virtual bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::UpdateElement ( const TPayloadType &  Payload,
const TAABB< T, 3 > &  NewBounds,
bool  bInHasBounds 
)
inlineoverridevirtual

◆ ValidateBounds()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
FORCEINLINE_DEBUGGABLE bool Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::ValidateBounds ( const TAABB< T, 3 > &  Bounds)
inline

◆ WhichChildAmI()

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::WhichChildAmI ( int32  NodeIdx)
inline

Member Data Documentation

◆ D

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
constexpr int Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::D = 3
staticconstexpr

◆ DefaultMaxChildrenInLeaf

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
constexpr int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DefaultMaxChildrenInLeaf = 12
staticconstexpr

◆ DefaultMaxNumToProcess

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
constexpr int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DefaultMaxNumToProcess = 0
staticconstexpr

◆ DefaultMaxPayloadBounds

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
constexpr T Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DefaultMaxPayloadBounds = 100000
staticconstexpr

◆ DefaultMaxTreeDepth

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
constexpr int32 Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::DefaultMaxTreeDepth = 16
staticconstexpr

◆ StaticType

template<typename TPayloadType , typename TLeafType , bool bMutable = true, typename T = FReal, typename StorageTraits = TDefaultAABBTreeStorageTraits<TPayloadType>>
constexpr ESpatialAcceleration Chaos::TAABBTree< TPayloadType, TLeafType, bMutable, T, StorageTraits >::StaticType
staticconstexpr
Initial value:
= std::is_same_v<TAABBTreeLeafArray<TPayloadType>, TLeafType> ? ESpatialAcceleration::AABBTree :
(std::is_same_v<TBoundingVolume<TPayloadType>, TLeafType> ? ESpatialAcceleration::AABBTreeBV : ESpatialAcceleration::Unknown)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127

The documentation for this class was generated from the following file: