Navigation
API > API/Runtime > API/Runtime/AIModule
BVTree - Bounding Volumes Tree
A binary search tree where each node has a Bounding Volume which is either an element (leaf nodes) or a volume encompassing all of its children (non-leaf nodes).
It provides fast gathering of all bounding volumes overlapping a given FBox (see GetOverlapping).
Users are expected to provide an implementation of CalcElementBounds for ElementType: static FBox CalcElementBounds(const FElement& Element) const
| Name | TBVTree |
| Type | struct |
| Header File | /Engine/Source/Runtime/AIModule/Public/BVTree.h |
| Include Path | #include "BVTree.h" |
Syntax
template<typename InElementType, typename InAllocator>
struct TBVTree
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TBVTree () |
BVTree.h | ||
| BVTree.h | |||
| BVTree.h |
Structs
| Name | Remarks |
|---|---|
| FElementBox |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FElement | InElementType | BVTree.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Elements | TArray< FElement > | BVTree.h | ||
| NodeBoundingBoxes | TArray< FBox, InAllocator > | BVTree.h | ||
| Nodes | TArray< int16, InAllocator > | BVTree.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const TArray< FBox, InAllocator > & GetBoundingBoxes() |
BVTree.h | ||
const TArray< FElement > & GetElements () |
BVTree.h | ||
TArray< FElement > & GetElements () |
BVTree.h | ||
const TArray< int16, InAllocator > & GetNodes() |
BVTree.h | ||
void GetOverlapping
(
const FBox& Box, |
BVTree.h | ||
bool IsEmpty() |
BVTree.h | ||
void RecreateTree
(
TArray< FElement >&& InElements |
BVTree.h | ||
void RecreateTree () |
Recreate the tree based on the current content of Elements. | BVTree.h | |
void RecreateTree
(
const TArray< FElement >& InElements |
BVTree.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| BVTree.h | |||
| BVTree.h | |||
void CreateCommonInternal() |
Assumes Elements has been set up | BVTree.h | |
void Reset() |
BVTree.h | ||
void Subdivide
(
TArray< FElementBox >& ElementBBoxes, |
BVTree.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FBox CalcElementBounds
(
const FElement& |
You have to supply this yourself | BVTree.h | |
static FBox CalcNodeBounds
(
const TArray< FElementBox >& ElementBBoxes, |
BVTree.h | ||
static int GetLongestAxis
(
const FBox& NodeBounds |
BVTree.h |