Ark Server API (ASA) - Wiki
|
#include <GenericOctree.h>
Classes | |
struct | COctreeSemanticsV2 |
class | FFreeList |
struct | FNode |
Public Types | |
using | FNodeIndex = uint32 |
using | FReal = FVector::FReal |
Protected Member Functions | |
void | SetElementId (const ElementType &Element, FOctreeElementId2 Id) |
Private Types | |
using | ElementArrayType = TArray<ElementType, typename OctreeSemantics::ElementAllocator> |
Private Attributes | |
FOctreeNodeContext | RootNodeContext |
TArray< FNode > | TreeNodes |
TArray< FNodeIndex > | ParentLinks |
TArray< ElementArrayType, TAlignedHeapAllocator< alignof(ElementArrayType)> > | TreeElements |
TArray< FNodeIndex > | FreeList |
FVector::FReal | MinLeafExtent |
An octree.
Definition at line 382 of file GenericOctree.h.
|
private |
Definition at line 384 of file GenericOctree.h.
using TOctree2< ElementType, OctreeSemantics >::FNodeIndex = uint32 |
Definition at line 386 of file GenericOctree.h.
using TOctree2< ElementType, OctreeSemantics >::FReal = FVector::FReal |
Definition at line 387 of file GenericOctree.h.
|
inline |
Initialization constructor.
Definition at line 1022 of file GenericOctree.h.
|
inline |
DO NOT USE. This constructor is for internal usage only for hot-reload purposes.
Definition at line 1031 of file GenericOctree.h.
|
inline |
Adds an element to the octree.
Element | - The element to add. |
Definition at line 809 of file GenericOctree.h.
|
inlineprivate |
Definition at line 541 of file GenericOctree.h.
|
inlineprivate |
Definition at line 511 of file GenericOctree.h.
|
inline |
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
Definition at line 998 of file GenericOctree.h.
|
inlineprivate |
Definition at line 593 of file GenericOctree.h.
|
inline |
this function resets the octree to empty.
Definition at line 881 of file GenericOctree.h.
|
inline |
Writes stats for the octree to the log.
Definition at line 922 of file GenericOctree.h.
|
inline |
this function will call the passed in function for all elements in the Octree in node by node in no specified order.
Func | - Function to call with each Element. |
Definition at line 731 of file GenericOctree.h.
|
inline |
this function will traverse the Octree using a fast box-box intersection this should be the preferred way of traversing the tree.
BoxBounds | - the bounds to test if a node is traversed or skipped. |
Func | - Function to call with each Element for nodes that passed bounds test. |
Definition at line 776 of file GenericOctree.h.
|
inlineprivate |
Definition at line 631 of file GenericOctree.h.
|
inline |
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.
Predicate | - a Function when given the bounds of the currently traversed node that returns true if traversal should continue or false to skip that branch. |
Func | - Function to call with each Element for nodes that passed the predicate. |
Definition at line 759 of file GenericOctree.h.
|
inline |
this function will traverse the Octree using a fast box-box intersection and aborts traversal as soon as the Element function returns false.
BoxBounds | - the bounds to test if a node is traversed or skipped. |
Func | - Function to call with each Element for nodes that passed bounds test. |
Definition at line 787 of file GenericOctree.h.
|
inlineprivate |
Definition at line 659 of file GenericOctree.h.
|
inline |
this function will traverse the Octree using a tryint to find nearby nodes that contain any elements.
Position | - the position to look nearby. |
Func | - Function to call with each Element for nodes that passed bounds test. |
Definition at line 799 of file GenericOctree.h.
|
inlineprivate |
Definition at line 688 of file GenericOctree.h.
|
inline |
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.
Predicate | - a Function when given the bounds of the currently traversed node that returns true if traversal should continue or false to skip that branch. |
Func | - Function that will receive the node ID which can be stored and later used to get the elements using GetElementsForNode for all nodes that passed the predicate. |
Definition at line 748 of file GenericOctree.h.
|
inlineprivate |
Definition at line 610 of file GenericOctree.h.
|
inlineprivate |
Definition at line 528 of file GenericOctree.h.
|
inline |
Accesses an octree element by ID.
Definition at line 892 of file GenericOctree.h.
|
inline |
Accesses an octree element by ID.
Definition at line 898 of file GenericOctree.h.
|
inline |
return all elements for a given node.
NodeIndex | - The the index of the node can be obtained using FindNodesWithPredicate. |
Definition at line 916 of file GenericOctree.h.
|
inline |
Definition at line 973 of file GenericOctree.h.
|
inline |
Definition at line 724 of file GenericOctree.h.
|
inline |
Definition at line 979 of file GenericOctree.h.
|
inline |
Definition at line 965 of file GenericOctree.h.
|
inline |
check if a FOctreeElementId2 is valid.
ElementId | - The ElementId to check. |
Definition at line 907 of file GenericOctree.h.
|
inline |
Removes an element from the octree.
ElementId | - The element to remove from the octree. |
Definition at line 820 of file GenericOctree.h.
|
inlineprotected |
Definition at line 1062 of file GenericOctree.h.
|
inlineprivate |
Definition at line 1050 of file GenericOctree.h.
|
inlineprivate |
Definition at line 1055 of file GenericOctree.h.
|
inline |
Definition at line 984 of file GenericOctree.h.
|
private |
Definition at line 507 of file GenericOctree.h.
|
private |
The extent of a leaf at the maximum allowed depth of the tree.
Definition at line 509 of file GenericOctree.h.
|
private |
Definition at line 403 of file GenericOctree.h.
|
private |
Definition at line 401 of file GenericOctree.h.
|
private |
Definition at line 404 of file GenericOctree.h.
|
private |
Definition at line 402 of file GenericOctree.h.