Navigation
Unreal Engine C++ API Reference > Runtime > Chaos > Chaos
Inheritance Hierarchy
- ISpatialAcceleration
- TAABBTree
References
Module | Chaos |
Header | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/AABBTree.h |
Include | #include "Chaos/AABBTree.h" |
Syntax
template<typename TPayloadType, typename TLeafType, bool bMutable, typename T>
class TAABBTree : public Chaos::ISpatialAcceleration< TPayloadType, T, 3 >
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TAABBTree () |
||
![]() |
TAABBTree
(
const TParticles& Particles, |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
~TAABBTree () |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
int32 | AddDirtyElementToGrid
(
const TAABB< T, 3 >& NewBounds, |
|
![]() |
bool | AddNewDirtyParticleIndexToGridCell
(
int32 Hash, |
Returns true if there was enough space in the cell to add the new dirty element index or if the element was already added (This second condition should not happen) |
![]() |
void | AddNodesOverlappingLeaves
(
const TAABBTreeNode< T >& LeftNode, |
Recursively add overlapping leaves given 2 nodes in the tree |
![]() |
void | AddRootOverlappingLeaves
(
const TAABBTreeNode< T >& TreeNode, |
Recursively add overlapping leaves given a root node in the tree |
![]() |
int32 | ||
![]() |
NodeAndLeafIndices | AllocateLeafNodeAndLeaf
(
const TPayloadType& Payload, |
|
![]() |
void | Sequential loop over the leaves to fill the overlapping pairs | |
![]() |
void | ComputeOverlappingCacheFromRoot
(
const bool bDirtyFilter |
Simultaneous tree descent to compute the overlapping leaves |
![]() |
void | ||
![]() |
void | DeAllocateInternalNode
(
int32 NodeIdx |
|
![]() |
void | DeAllocateLeafNode
(
int32 NodeIdx |
|
![]() |
void | DeleteDirtyParticleEverywhere
(
int32 DeleteDirtyParticleIdx, |
|
![]() |
bool | DeleteDirtyParticleIndexFromGridCell
(
int32 Hash, |
Returns true if the dirty particle was in the grid and successfully deleted. |
![]() ![]() |
bool | ||
![]() |
void | Expensive function: Don't call unless debugging. | |
![]() |
bool | EnoughSpaceInGridCell
(
int32 Hash |
|
![]() |
void | Fill the overlapping pairs from the previous persistent and not dirty leaves | |
![]() |
int32 | FindBestSibling
(
const TAABB< T, 3 >& InNewBounds, |
|
![]() |
void | FindOverlappingLeaf
(
const int32 FirstNode, |
Given a first node and a leaf index find the overlapping leaves and update the node stack |
![]() |
const AABBTreeExpensiveStatistics & | ||
![]() |
const AABBTreeStatistics & | Some useful statistics. | |
![]() |
bool | GetAsBoundsArray
(
TArray< TAABB< T, 3 >>& AllBounds, |
|
![]() |
void | GetCVars () |
This is to make sure important parameters are not changed during inopportune times. |
![]() ![]() |
const TArray< TLeafType > & | GetLeaves () |
|
![]() ![]() |
const TArray< TAABBTreeNode< T > > & | GetNodes () |
|
![]() |
int32 | GetSiblingIndex
(
int32 NodeIdx |
Is the input node Child 0 or Child 1? |
![]() |
const int32 | GetSubtreeDepth
(
const int32 NodeIdx |
|
![]() ![]() |
const TArray< TPayloadBoundsElement< TPayloadType, T > > & | ||
![]() |
NodeAndLeafIndices | InsertLeaf
(
const TPayloadType& Payload, |
Returns the inserted node and leaf. |
![]() ![]() |
int32 | ||
![]() ![]() |
void | ||
![]() ![]() |
bool | OverlapFast
(
const FAABB3& QueryBounds, |
|
![]() |
void | Print the overlapping leaves data structure | |
![]() |
void | Propagates the leaves dirty flag up to the root node | |
![]() ![]() |
void | ||
![]() ![]() |
bool | RaycastFast
(
const FVec3& Start, |
|
![]() |
void | Reinitialize
(
const ParticleView& Particles, |
|
![]() |
void | RemoveLeafNode
(
int32 LeafNodeIdx, |
|
![]() |
void | RotateNode
(
uint32 NodeIdx, |
Rotate nodes to decrease tree cost Grandchildren can swap with their aunts |
![]() |
void | ||
![]() ![]() |
void | ||
![]() ![]() |
bool | ||
![]() |
void | UpdateAncestorBounds
(
int32 NodeIdx, |
|
![]() |
int32 | UpdateDirtyElementInGrid
(
const TAABB< T, 3 >& NewBounds, |
|
![]() ![]() |
bool | UpdateElement
(
const TPayloadType& Payload, |
Returns true if element was updated, or false when it was added instead. |
![]() |
bool | ValidateBounds
(
const TAABB< T, 3 >& Bounds |
Returns true if bounds appear valid. Returns false if extremely large values, contains NaN, or is empty. |
![]() |
int32 | WhichChildAmI
(
int32 NodeIdx |
Is the input node Child 0 or Child 1? |
Overridden from ISpatialAcceleration
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Cache for each leaves all the overlapping leaves | |
![]() ![]() |
void | Contract: bShouldRebuild can only ever be cleared by calling the ClearShouldRebuild method, it can be set at will though. | |
![]() ![]() ![]() |
TUniquePtr< ISpatialAcceleration< TPayloadType, T, 3 > > | Copy () |
|
![]() ![]() ![]() |
TArray< TPayloadType > | FindAllIntersections
(
const FAABB3& Box |
IMPORTANT : (LWC) this API should be typed on Freal not T, as we want the query API to be using the highest precision while maintaining arbitrary internal precision for the acceleration structure ( based on T ) |
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
void | Overlap
(
const FAABB3& QueryBounds, |
|
![]() ![]() |
void | PrepareCopyTimeSliced
(
const ISpatialAcceleration< TPayloadType, T, 3 >& InFrom |
|
![]() ![]() |
void | ProgressAsyncTimeSlicing
(
bool ForceBuildCompletion |
|
![]() ![]() |
void | ProgressCopyTimeSliced
(
const ISpatialAcceleration< TPayloadType, T, 3 >& InFrom, |
|
![]() ![]() ![]() |
void | ||
![]() ![]() |
bool | RemoveElement
(
const TPayloadType& Payload |
Returns true if element was removed successfully. |
![]() ![]() |
void | Reset () |
|
![]() ![]() |
void | Serialize
(
FChaosArchive& Ar |
|
![]() ![]() |
bool | ||
![]() ![]() ![]() |
void |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
NodeAndLeafIndices |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
eTimeSlicePhase |
Typedefs
Name | Description |
---|---|
FElement | |
FNode | |
FNodeIndexAndCost | Buffers for calculating the best candidate for tree insertion, reset per-calculation to avoid over allocation Tuple of Node/Index/Cost here avoids cache miss when accessing the node and its cost. |
PayloadType | |
TType |