FZoneGraphBVTree

Quantized BV-Tree

Choose your operating system:

Windows

macOS

Linux

References

Module

ZoneGraph

Header

/Engine/Plugins/Runtime/ZoneGraph/Source/ZoneGraph/Public/ZoneGraphBVTree.h

Include

#include "ZoneGraphBVTree.h"

Syntax

USTRUCT()
struct FZoneGraphBVTree

Remarks

Quantized BV-Tree

Variables

Name Description

Protected variable UProperty

TArray< FZoneGr...

 

Nodes

BV-tree nodes.

Protected variable UProperty

FVector

 

Origin

Quantization range origin

Protected variable UProperty

float

 

QuantizationScale

Scale to convert from world coordinates to quantized range.

Functions

Name Description

Public function

void

 

Build

(
    TStridedView< const FBox > Boxes
)

Build BV-tree from boxes, the index of the box in the array will be the index of the query result.

Public function Const

FZoneGraphBV...

 

CalcNodeBounds

(
    const FBox& Box
)

Public function Const

FBox

 

CalcWorldBounds

(
    const FZoneGraphBVNode& Node
)

Public function Const

TConstArrayV...

 

GetNodes()

Public function Const

int32

 

GetNumNodes()

Public function Const

const FVecto...

 

GetOrigin()

Public function Const

float

 

GetQuantizationScale()

Public function Const

void

 

Query

(
    const FBox& Bounds,
    TFunc&& Function
)

Queries the BV-tree, calls Function on each child node which bounds overlap the query bounds.

Public function Const

void

 

Query

(
    const FBox& Bounds,
    TArray< int32 >& OutItems
)

Queries the BV-tree, return index of overlapping items.

Constants

Name

Description

MaxQuantizedCoord

Max quantized coordinate value during conversion, the scale is truncated to account for the expansion in CalcNodeBounds().