Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math
Inheritance Hierarchy
- TOctree2
- FSmartObjectOctree
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/GenericOctree.h |
| Include | #include "Math/GenericOctree.h" |
Syntax
template<typename ElementType, typename OctreeSemantics>
class TOctree2
Remarks
An octree.
Constructors
| Type | Name | Description | |
|---|---|---|---|
TOctree2 () |
DO NOT USE. This constructor is for internal usage only for hot-reload purposes. | ||
TOctree2
(
const FVector& InOrigin, |
Initialization constructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddElement
(
typename TCallTraits< ElementType >::ConstReference Element |
Adds an element to the octree. | |
| void | ApplyOffset
(
const FVector& InOffset, |
Apply an arbitrary offset to all elements in the tree InOffset - offset to apply bGlobalOctree - hint that this octree is used as a boundless global volume, so only content will be shifted but not origin of the octree | |
| void | Destroy () |
This function resets the octree to empty. | |
| void | DumpStats () |
Writes stats for the octree to the log. | |
| void | FindAllElements
(
const IterateAllElementsFunc& Func |
This function will call the passed in function for all elements in the Octree in node by node in no specified order. | |
| void | FindElementsWithBoundsTest
(
const FBoxCenterAndExtent& BoxBounds, |
This function will traverse the Octree using a fast box-box intersection this should be the preferred way of traversing the tree. | |
| void | FindElementsWithPredicate
(
const PredicateFunc& Predicate, |
This function will traverse the Octree starting from the root in depth first order and the predicate can be used to implement custom culling for each node. | |
| void | FindFirstElementWithBoundsTest
(
const FBoxCenterAndExtent& BoxBounds, |
This function will traverse the Octree using a fast box-box intersection and aborts traversal as soon as the Element function returns false. | |
| void | FindNearbyElements
(
const FVector& Position, |
This function will traverse the Octree using a tryint to find nearby nodes that contain any elements. | |
| void | FindNodesWithPredicate
(
const PredicateFunc& Predicate, |
This function will traverse the Octree starting from the root in depth first order and the predicate can be used to implement custom culling for each node. | |
| const ElementType & | GetElementById
(
FOctreeElementId2 ElementId |
Accesses an octree element by ID. | |
| ElementType & | GetElementById
(
FOctreeElementId2 ElementId |
Accesses an octree element by ID. | |
| TArrayView< const ElementType > | GetElementsForNode
(
FNodeIndex NodeIndex |
Return all elements for a given node. | |
| FReal | GetNodeLevelExtent
(
int32 Level |
||
| int32 | GetNumNodes () |
||
| FBoxCenterAndExtent | |||
| SIZE_T | GetSizeBytes () |
||
| bool | IsValidElementId
(
FOctreeElementId2 ElementId |
Check if a FOctreeElementId2 is valid. | |
| void | RemoveElement
(
FOctreeElementId2 ElementId |
Removes an element from the octree. | |
| void | SetElementId
(
const ElementType& Element, |
Redirects SetElementId call to the proper implementation | |
| void |
Typedefs
| Name | Description |
|---|---|
| ElementArrayType | |
| FNodeIndex | |
| FReal |