Navigation
API > API/Runtime > API/Runtime/Engine
| Name | TQuadTree |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/GenericQuadTree.h |
| Include Path | #include "GenericQuadTree.h" |
Syntax
template<typename ElementType, int32 NodeCapacity>
class TQuadTree
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| GenericQuadTree.h | |||
TQuadTree () |
DO NOT USE. This constructor is for internal usage only for hot-reload purposes. | GenericQuadTree.h | |
TQuadTree
(
const FBox2D& InBox, |
GenericQuadTree.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TQuadTree() |
GenericQuadTree.h |
Structs
| Name | Remarks |
|---|---|
| FNode | Node used to hold the element and its corresponding 2D box |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TreeType | TQuadTree< ElementType, NodeCapacity > | GenericQuadTree.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInternal | bool | Whether this is a leaf or an internal sub-tree | GenericQuadTree.h | |
| MinimumQuadSize | float | The smallest size of a quad allowed in the tree | GenericQuadTree.h | |
| Nodes | TArray< FNode > | Contains the actual elements this tree is responsible for. | GenericQuadTree.h | |
| Position | FVector2D | Center position of the tree | GenericQuadTree.h | |
| SubTrees | TreeType * | The sub-trees of this tree | GenericQuadTree.h | |
| TreeBox | FBox2D | AABB of the tree | GenericQuadTree.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Does a deep copy of the tree by going through and re-creating the internal data. | GenericQuadTree.h | ||
void Empty() |
Removes all elements of the tree | GenericQuadTree.h | |
void GetElements
(
const FBox2D& Box, |
Given a 2D box, iterates over intersecting elements and execute the callback for each. | GenericQuadTree.h | |
void GetElements
(
const FBox2D& Box, |
Given a 2D box, returns an array of elements within the box. | GenericQuadTree.h | |
const FBox2D & GetTreeBox() |
Gets the TreeBox so systems can test insertions before trying to do so with invalid regions | GenericQuadTree.h | |
void Insert
(
const ElementType& Element, |
Inserts an object of type ElementType with an associated 2D box of size Box (log n). | GenericQuadTree.h | |
bool Remove
(
const ElementType& Instance, |
Removes an object of type ElementType with an associated 2D box of size Box (log n). | GenericQuadTree.h | |
void Serialize
(
FArchive& Ar |
GenericQuadTree.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| GenericQuadTree.h |