9#include "Containers/Array.h"
35#define FOREACH_OCTREE_CHILD_NODE(ChildRef) \
36 for(FOctreeChildNodeRef ChildRef(0);!ChildRef.IsNULL();ChildRef.Advance())
62 Box.GetCenterAndExtents(
C,
E);
68 template<
typename TExtent>
111 template<
typename TExtent>
185 return (
Index >> 0) & 1;
190 return (
Index >> 1) & 1;
195 return (
Index >> 2) & 1;
376template<
typename ElementType,
typename OctreeSemantics>
388 uint32 InclusiveNumElements = 0;
426 const int LeftoverSize =
Size % 2;
439 if (FreeList[
Index].Start < NodeIndex)
447 if (
Index < FreeList.
Num() && FreeList[
Index].End + 1 == NodeIndex)
449 FreeList[
Index].End = NodeIndex;
452 if (FreeList[
Index - 1].Start - 1 == NodeIndex)
454 FreeList[
Index - 1].Start = FreeList[
Index].Start;
461 if (FreeList[
Index - 1].Start - 1 == NodeIndex)
463 FreeList[
Index - 1].Start = NodeIndex;
468 FreeList.
Insert(FSpan{ NodeIndex , NodeIndex },
Index);
473 FSpan& Span = FreeList.
Last();
476 if (Span.Start == Span.End)
498 return FreeList.
Num() - 1;
517 FNodeIndex ElementIndex = TreeElements.AddDefaulted(8);
526 for (
int8 i = 0; i < 8; i++)
528 TreeNodes[
Index + i] = FNode();
539 TreeNodes[CurrentNodeIndex].InclusiveNumElements++;
540 if (TreeNodes[CurrentNodeIndex].
IsLeaf())
542 if (TreeElements[CurrentNodeIndex].
Num() + 1 > OctreeSemantics::MaxElementsPerLeaf &&
NodeContext.Bounds.Extent.X > MinLeafExtent)
549 TreeNodes[CurrentNodeIndex].InclusiveNumElements = 0;
563 int ElementIndex = TreeElements[CurrentNodeIndex].Emplace(Element);
574 int ElementIndex = TreeElements[CurrentNodeIndex].Emplace(Element);
591 TreeElements[CurrentNodeIndex].Reset();
593 if (!TreeNodes[CurrentNodeIndex].
IsLeaf())
596 for (
int8 i = 0; i < 8; i++)
602 TreeNodes[CurrentNodeIndex].ChildNodes =
INDEX_NONE;
608 template<
typename PredicateFunc,
typename IterateFunc>
611 if (TreeNodes[CurrentNodeIndex].InclusiveNumElements > 0)
613 if (Predicate(ParentNodeIndex, CurrentNodeIndex,
NodeContext.Bounds))
615 Func(ParentNodeIndex, CurrentNodeIndex,
NodeContext.Bounds);
617 if (!TreeNodes[CurrentNodeIndex].
IsLeaf())
620 for (
int8 i = 0; i < 8; i++)
629 template<
typename IterateFunc>
632 if (TreeNodes[CurrentNodeIndex].InclusiveNumElements > 0)
636 if (Intersect(OctreeSemantics::GetBoundingBox(Element), BoxBounds))
642 if (!TreeNodes[CurrentNodeIndex].
IsLeaf())
646 for (
int8 i = 0; i < 8; i++)
657 template<
typename IterateFunc>
660 if (TreeNodes[CurrentNodeIndex].InclusiveNumElements > 0)
662 for (
int Index = 0;
Index < TreeElements[CurrentNodeIndex].Num();
Index++)
665 if (Intersect(OctreeSemantics::GetBoundingBox(Element), BoxBounds))
674 if (!TreeNodes[CurrentNodeIndex].
IsLeaf())
678 for (
int8 i = 0; i < 8; i++)
696 template<
typename IterateFunc>
699 if (TreeNodes[CurrentNodeIndex].InclusiveNumElements > 0)
701 for (
int Index = 0;
Index < TreeElements[CurrentNodeIndex].Num();
Index++)
703 Func(TreeElements[CurrentNodeIndex][
Index]);
706 if (!TreeNodes[CurrentNodeIndex].
IsLeaf())
722 for (
int8 i = 0; i < 8; i++)
735 return TreeNodes.
Num();
742 template<
typename IterateAllElementsFunc>
759 template<
typename PredicateFunc,
typename IterateFunc>
762 FindNodesWithPredicateInternal(
INDEX_NONE, 0, RootNodeContext, Predicate, Func);
770 template<
typename PredicateFunc,
typename IterateFunc>
777 Func(NodeIndex, Element);
787 template<
typename IterateBoundsFunc>
790 FindElementsWithBoundsTestInternal(0, RootNodeContext, BoxBounds, Func);
799 template<
typename IterateBoundsFunc>
802 return FindFirstElementWithBoundsTestInternal(0, RootNodeContext, BoxBounds, Func);
810 template<
typename IterateBoundsFunc>
837 TreeElements[ElementId.NodeIndex].RemoveAtSwap(ElementId.ElementIndex,
EAllowShrinking::No);
839 if (ElementId.ElementIndex < TreeElements[ElementId.NodeIndex].Num())
842 SetElementId(TreeElements[ElementId.NodeIndex][ElementId.ElementIndex], ElementId);
852 TreeNodes[NodeIndex].InclusiveNumElements--;
853 if (TreeNodes[NodeIndex].InclusiveNumElements < OctreeSemantics::MinInclusiveElementsPerNode)
863 NodeIndex = ParentLinks[(NodeIndex - 1) / 8];
878 for (
int ElementIndex = 0; ElementIndex < TreeElements[
CollapseNodeIndex].Num(); ElementIndex++)
893 TreeElements.Reset(1);
897 TreeElements.AddDefaulted();
903 return TreeElements[ElementId.NodeIndex][ElementId.ElementIndex];
909 return TreeElements[ElementId.NodeIndex][ElementId.ElementIndex];
918 return ElementId.
IsValidId() && ElementId.ElementIndex < TreeElements[ElementId.NodeIndex].Num();
927 return TreeElements[NodeIndex];
935 int32 NumElements = 0;
944 if (TreeNodes[NodeIndex].
IsLeaf())
977 TotalSizeBytes += TreeElements.GetAllocatedSize();
978 TotalSizeBytes += TreeNodes[0].InclusiveNumElements *
sizeof(ElementType);
979 return TotalSizeBytes;
984 const int32 ClampedLevel = FMath::Clamp<uint32>(Level, 0, OctreeSemantics::MaxNodeDepth);
990 return RootNodeContext.
Bounds;
1025 OctreeSemantics::ApplyOffset(Element, InOffset);
1036 TreeElements.AddDefaulted();
1043 TreeElements.AddDefaulted();
1050 struct COctreeSemanticsV2
1052 template<
typename Semantics>
1058 template <
typename Semantics>
1063 Semantics::SetElementId(
static_cast<typename Semantics::FOctree&
>(*
this), Element,
Id);
1067 Semantics::SetElementId(Element,
Id);
1080template<
typename ElementType,
typename OctreeSemantics>
1099 , InclusiveNumElements(0)
1136 return Elements.
Num();
1140 return InclusiveNumElements;
1160 for (
auto& Element : Elements)
1162 OctreeSemantics::ApplyOffset(Element, InOffset);
1183 mutable FNode* Children[8];
1186 mutable uint32 InclusiveNumElements : 31;
1189 mutable uint32 bIsLeaf : 1;
1219 template<
typename StackAllocator = DefaultStackAllocator>
1250 if (NodeStack.Num())
1252 CurrentNode = NodeStack[NodeStack.Num() - 1];
1253 NodeStack.RemoveAt(NodeStack.Num() - 1);
1269 : CurrentNode(
FNodeReference(&Tree.RootNode, Tree.RootNodeContext))
1280 return *CurrentNode.
Node;
1297 template<
typename StackAllocator = DefaultStackAllocator>
1306 AdvanceToNextIntersectingElement();
1312 return NodeIt.HasPendingNodes();
1319 , ElementIt(Tree.RootNode.GetElementIt())
1322 AdvanceToNextIntersectingElement();
1343 void ProcessChildren()
1359 void AdvanceToNextIntersectingElement()
1373 if (Intersect(OctreeSemantics::GetBoundingBox(*
LocalElementIt), IteratorBounds))
1386 if (Intersect(OctreeSemantics::GetBoundingBox(*
LocalElementIt), IteratorBounds))
1416 AddElementToNode(Element, RootNode, RootNodeContext);
1430 ElementIdNode->Elements.RemoveAtSwap(ElementId.ElementIndex);
1432 SetOctreeMemoryUsage(
this, TotalSizeBytes -
sizeof(ElementType));
1445 --Node->InclusiveNumElements;
1446 if (Node->InclusiveNumElements < OctreeSemantics::MinInclusiveElementsPerNode)
1467 for (ElementType& Element :
ChildNode.Elements)
1513 SetOctreeMemoryUsage(
this, 0);
1537 && ElementId.ElementIndex < ((
FNode*)ElementId.Node)->Elements.Num();
1545 int32 NumElements = 0;
1555 if (CurrentNode.IsLeaf())
1571 if (CurrentNode.HasChild(
ChildRef))
1596 return TotalSizeBytes;
1601 const int32 ClampedLevel = FMath::Clamp<uint32>(Level, 0, OctreeSemantics::MaxNodeDepth);
1607 return RootNodeContext.
Bounds;
1630 RootNode =
FNode(
nullptr);
1646 if (CurrentNode.HasChild(
ChildRef))
1652 for (
auto ElementIt = CurrentNode.GetElementIt(); ElementIt; ++ElementIt)
1686 FReal MinLeafExtent;
1692 Octree->TotalSizeBytes = NewSize;
1698 void AddElementToNode(
1710 const bool bIsLeaf = Node.IsLeaf();
1715 Node.InclusiveNumElements++;
1720 if (Node.Elements.Num() + 1 > OctreeSemantics::MaxElementsPerLeaf &&
Context.Bounds.Extent.X > MinLeafExtent)
1725 SetOctreeMemoryUsage(
this, TotalSizeBytes -
ChildElements.Num() *
sizeof(ElementType));
1726 Node.InclusiveNumElements = 0;
1729 Node.bIsLeaf =
false;
1734 AddElementToNode(*ElementIt, Node,
Context);
1738 AddElementToNode(Element, Node,
Context);
1759 if (!Node.Children[
ChildRef.Index])
1762 SetOctreeMemoryUsage(
this, TotalSizeBytes +
sizeof(*Node.Children[
ChildRef.Index]));
1773 new(Node.Elements) ElementType(Element);
1775 SetOctreeMemoryUsage(
this, TotalSizeBytes +
sizeof(ElementType));
1784 TEXT(
"Failed to find an octree node for an element with bounds (%f,%f,%f) +/- (%f,%f,%f)!"),
1795 struct COctreeSemanticsV2
1797 template<
typename Semantics>
1803 template <
typename Semantics>
1808 Semantics::SetElementId(*
this, Element,
Id);
1812 Semantics::SetElementId(Element,
Id);
1824template<
typename ElementType,
typename OctreeSemantics>
#define NULL
Definition oodle2base.h:134
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
void EnsureRetrievingVTablePtrDuringCtor(const TCHAR *CtorSignature)
Definition CoreMisc.cpp:436
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
#define FOREACH_OCTREE_CHILD_NODE(ChildRef)
Definition GenericOctree.h:35
#define FVector
Definition IOSSystemIncludes.h:8
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
#define UE_LOG(CategoryName, Verbosity, Format,...)
Definition LogMacros.h:270
UE::Math::TBox< double > FBox
Definition MathFwd.h:55
UE::Math::TVector4< double > FVector4
Definition MathFwd.h:49
FORCEINLINE VectorRegister4Float VectorSubtract(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:731
FORCEINLINE uint32 VectorAnyGreaterThan(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1917
FORCEINLINE VectorRegister4Float MakeVectorRegister(uint32 X, uint32 Y, uint32 Z, uint32 W)
Definition UnrealMathFPU.h:195
FORCEINLINE VectorRegister4Float VectorSetFloat1(float F)
Definition UnrealMathFPU.h:518
FORCEINLINE VectorRegister4Int VectorIntLoad1(const void *Ptr)
Definition UnrealMathFPU.h:2609
FORCEINLINE VectorRegister4Float VectorMultiply(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:758
FORCEINLINE VectorRegister4Float VectorLoadFloat1(const float *Ptr)
Definition UnrealMathFPU.h:468
VectorRegister4Float VectorLoadAligned(const float *Ptr)
Definition UnrealMathFPU.h:451
FORCEINLINE VectorRegister4Float VectorSelect(const VectorRegister4Float &Mask, const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1105
FORCEINLINE VectorRegister4Int VectorIntCompareEQ(const VectorRegister4Int &A, const VectorRegister4Int &B)
Definition UnrealMathFPU.h:2356
FORCEINLINE VectorRegister4Float VectorSet_W0(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1391
FORCEINLINE VectorRegister4Float VectorAbs(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:661
FORCEINLINE VectorRegister4Float VectorAdd(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:704
void VectorStoreAligned(const VectorRegister4Float &Vec, float *Ptr)
Definition UnrealMathFPU.h:534
FORCEINLINE VectorRegister4Int VectorIntAnd(const VectorRegister4Int &A, const VectorRegister4Int &B)
Definition UnrealMathFPU.h:2308
FORCEINLINE VectorRegister4Float VectorLoadFloat3_W0(const float *Ptr)
VectorLoadFloat3_W0.
Definition UnrealMathVectorCommon.h.inl:129
void Move(T &A, typename TMoveSupportTraits< T >::Copy B)
Definition UnrealTemplate.h:24
UE_REWRITE constexpr void Exchange(T &A, T &B)
Definition UnrealTemplate.h:627
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32 Size
Definition VulkanMemory.cpp:4034
Definition GenericOctree.h:42
friend bool Intersect(const UE::Math::TBoxSphereBounds< FReal, TExtent > &A, const FBoxCenterAndExtent &B)
Definition GenericOctree.h:112
FBox GetBox() const
Definition GenericOctree.h:84
FVector4 Center
Definition GenericOctree.h:46
FVector4 Extent
Definition GenericOctree.h:47
FBoxCenterAndExtent(const FVector &InCenter, const FVector &InExtent)
Definition GenericOctree.h:53
FBoxCenterAndExtent(const UE::Math::TBoxSphereBounds< FReal, TExtent > &BoxSphere)
Definition GenericOctree.h:69
FBoxCenterAndExtent(const float PositionRadius[4])
Definition GenericOctree.h:77
FBoxCenterAndExtent(const FBox &Box)
Definition GenericOctree.h:59
FVector4::FReal FReal
Definition GenericOctree.h:44
friend bool Intersect(const float A[4], const FBoxCenterAndExtent &B)
Definition GenericOctree.h:130
friend bool Intersect(const FBoxCenterAndExtent &A, const FBoxCenterAndExtent &B)
Definition GenericOctree.h:94
FBoxCenterAndExtent()
Definition GenericOctree.h:50
Definition GenericOctree.h:146
UE_FORCEINLINE_HINT void SetNULL()
Definition GenericOctree.h:178
UE_FORCEINLINE_HINT void Advance()
Definition GenericOctree.h:167
FOctreeChildNodeRef(int8 InX, int8 InY, int8 InZ)
Definition GenericOctree.h:151
UE_FORCEINLINE_HINT int32 Y() const
Definition GenericOctree.h:188
int8 Index
Definition GenericOctree.h:148
UE_FORCEINLINE_HINT int32 X() const
Definition GenericOctree.h:183
FOctreeChildNodeRef(int8 InIndex=0)
Definition GenericOctree.h:160
UE_FORCEINLINE_HINT bool IsNULL() const
Definition GenericOctree.h:173
UE_FORCEINLINE_HINT int32 Z() const
Definition GenericOctree.h:193
Definition GenericOctree.h:201
FOctreeChildNodeSubset()
Definition GenericOctree.h:233
uint32 ChildBits
Definition GenericOctree.h:226
bool Contains(FOctreeChildNodeRef ChildRef) const
Definition GenericOctree.inl:20
uint32 PositiveChildBits
Definition GenericOctree.h:219
uint32 NegativeChildBits
Definition GenericOctree.h:222
FOctreeChildNodeSubset(FOctreeChildNodeRef ChildRef)
Definition GenericOctree.h:238
uint32 bPositiveY
Definition GenericOctree.h:209
uint32 bNegativeZ
Definition GenericOctree.h:213
uint32 bNegativeX
Definition GenericOctree.h:211
uint32 AllBits
Definition GenericOctree.h:229
uint32 bPositiveX
Definition GenericOctree.h:208
uint32 bNegativeY
Definition GenericOctree.h:212
uint32 bPositiveZ
Definition GenericOctree.h:210
Definition GenericOctreePublic.h:15
bool IsValidId() const
Definition GenericOctreePublic.h:28
Definition GenericOctreePublic.h:68
bool IsValidId() const
Definition GenericOctreePublic.h:81
Definition GenericOctree.h:252
FOctreeNodeContext(const FBoxCenterAndExtent &InBounds, uint32 InInCullBits, uint32 InOutCullBits)
Definition GenericOctree.h:299
FOctreeNodeContext GetChildContext(FOctreeChildNodeRef ChildRef) const
Definition GenericOctree.h:326
uint32 OutCullBits
Definition GenericOctree.h:273
FOctreeChildNodeRef GetContainingChild(const FBoxCenterAndExtent &BoundingBox) const
Definition GenericOctree.inl:55
FOctreeNodeContext(uint32 InInCullBits, uint32 InOutCullBits)
Definition GenericOctree.h:280
FOctreeNodeContext GetChildContext(FOctreeChildNodeRef ChildRef, uint32 InInCullBits, uint32 InOutCullBits) const
Definition GenericOctree.h:349
FReal ChildCenterOffset
Definition GenericOctree.h:267
FOctreeNodeContext(const FBoxCenterAndExtent &InBounds)
Definition GenericOctree.h:287
void GetChildContext(FOctreeChildNodeRef ChildRef, FOctreeNodeContext *ChildContext) const
Definition GenericOctree.h:336
FOctreeNodeContext()
Definition GenericOctree.h:276
VectorRegister GetChildOffsetVec(int i) const
Definition GenericOctree.h:312
@ LoosenessDenominator
Definition GenericOctree.h:258
FReal ChildExtent
Definition GenericOctree.h:264
FVector4::FReal FReal
Definition GenericOctree.h:255
FBoxCenterAndExtent Bounds
Definition GenericOctree.h:261
uint32 InCullBits
Definition GenericOctree.h:270
FOctreeChildNodeSubset GetIntersectingChildren(const FBoxCenterAndExtent &BoundingBox) const
Definition GenericOctree.inl:27
Definition ContainerAllocationPolicies.h:447
Definition ArrayView.h:139
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType & Last(SizeType IndexFromTheEnd=0) UE_LIFETIMEBOUND
Definition Array.h:1263
void RemoveAt(SizeType Index, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2083
UE_NODEBUG UE_FORCEINLINE_HINT void Push(ElementType &&Item)
Definition Array.h:1224
void Reset(SizeType NewSize=0)
Definition Array.h:2246
SizeType AddDefaulted()
Definition Array.h:2795
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
UE_NODEBUG UE_FORCEINLINE_HINT SIZE_T GetAllocatedSize(void) const
Definition Array.h:1059
ElementType Pop(EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:1196
UE_FORCEINLINE_HINT void Shrink()
Definition Array.h:1278
SizeType Insert(std::initializer_list< ElementType > InitList, const SizeType InIndex)
Definition Array.h:1875
UE_FORCEINLINE_HINT void Reserve(SizeType Number)
Definition Array.h:3016
Definition GenericOctree.h:378
FBoxCenterAndExtent GetRootBounds() const
Definition GenericOctree.h:988
void Destroy()
Definition GenericOctree.h:890
FOctreeElementId2 FindFirstElementWithBoundsTest(const FBoxCenterAndExtent &BoxBounds, const IterateBoundsFunc &Func) const
Definition GenericOctree.h:800
void FindNearbyElements(const FVector &Position, const IterateBoundsFunc &Func) const
Definition GenericOctree.h:811
void FindElementsWithBoundsTest(const FBoxCenterAndExtent &BoxBounds, const IterateBoundsFunc &Func) const
Definition GenericOctree.h:788
void SetElementId(const ElementType &Element, FOctreeElementId2 Id)
Definition GenericOctree.h:1073
TOctree2(const FVector &InOrigin, FVector::FReal InExtent)
Definition GenericOctree.h:1031
void ShrinkElements()
Definition GenericOctree.h:993
ElementType & GetElementById(FOctreeElementId2 ElementId)
Definition GenericOctree.h:901
void AddElement(typename TCallTraits< ElementType >::ConstReference Element)
Definition GenericOctree.h:821
void RemoveElement(FOctreeElementId2 ElementId)
Definition GenericOctree.h:832
bool IsValidElementId(FOctreeElementId2 ElementId) const
Definition GenericOctree.h:916
const ElementType & GetElementById(FOctreeElementId2 ElementId) const
Definition GenericOctree.h:907
TOctree2()
Definition GenericOctree.h:1040
void FindAllElements(const IterateAllElementsFunc &Func) const
Definition GenericOctree.h:743
SIZE_T GetSizeBytes() const
Definition GenericOctree.h:974
FReal GetNodeLevelExtent(int32 Level) const
Definition GenericOctree.h:982
uint32 FNodeIndex
Definition GenericOctree.h:381
void FindElementsWithPredicate(const PredicateFunc &Predicate, const IterateFunc &Func) const
Definition GenericOctree.h:771
int32 GetNumNodes() const
Definition GenericOctree.h:733
void FindNodesWithPredicate(const PredicateFunc &Predicate, const IterateFunc &Func) const
Definition GenericOctree.h:760
void DumpStats() const
Definition GenericOctree.h:931
FVector::FReal FReal
Definition GenericOctree.h:382
void ApplyOffset(const FVector &InOffset, bool bGlobalOctree=false)
Definition GenericOctree.h:1007
TArrayView< const ElementType > GetElementsForNode(FNodeIndex NodeIndex) const
Definition GenericOctree.h:925
Definition GenericOctree.h:1196
FNodeReference()
Definition GenericOctree.h:1203
const FNode * Node
Definition GenericOctree.h:1199
FNodeReference(const FNode *InNode, const FOctreeNodeContext &InContext)
Definition GenericOctree.h:1209
FOctreeNodeContext Context
Definition GenericOctree.h:1200
Definition GenericOctree.h:1091
UE_FORCEINLINE_HINT FNode * GetChild(FOctreeChildNodeRef ChildRef) const
Definition GenericOctree.h:1130
FNode(const FNode *InParent)
Definition GenericOctree.h:1097
UE_FORCEINLINE_HINT bool HasChild(FOctreeChildNodeRef ChildRef) const
Definition GenericOctree.h:1126
UE_FORCEINLINE_HINT int32 GetInclusiveElementCount() const
Definition GenericOctree.h:1138
UE_FORCEINLINE_HINT ElementConstIt GetElementIt() const
Definition GenericOctree.h:1118
~FNode()
Definition GenericOctree.h:1109
UE_FORCEINLINE_HINT const ElementArrayType & GetElements() const
Definition GenericOctree.h:1142
UE_FORCEINLINE_HINT bool IsLeaf() const
Definition GenericOctree.h:1122
void ShrinkElements()
Definition GenericOctree.h:1146
void ApplyOffset(const FVector &InOffset)
Definition GenericOctree.h:1158
UE_FORCEINLINE_HINT int32 GetElementCount() const
Definition GenericOctree.h:1134
Definition GenericOctree.h:1299
const ElementType & GetCurrentElement() const
Definition GenericOctree.h:1326
bool HasPendingElements() const
Definition GenericOctree.h:1310
TConstElementBoxIterator(const TOctree_DEPRECATED &Tree, const FBoxCenterAndExtent &InBoundingBox)
Definition GenericOctree.h:1316
void Advance()
Definition GenericOctree.h:1303
Definition GenericOctree.h:1221
void Advance()
Definition GenericOctree.h:1248
const FOctreeNodeContext & GetCurrentContext() const
Definition GenericOctree.h:1282
TConstIterator(const TOctree_DEPRECATED &Tree)
Definition GenericOctree.h:1268
TConstIterator(const FNode &Node, const FOctreeNodeContext &Context)
Definition GenericOctree.h:1273
void PushChild(FOctreeChildNodeRef ChildRef)
Definition GenericOctree.h:1225
void PushChild(FOctreeChildNodeRef ChildRef, const FOctreeNodeContext &Context)
Definition GenericOctree.h:1241
const FNode & GetCurrentNode() const
Definition GenericOctree.h:1278
bool HasPendingNodes() const
Definition GenericOctree.h:1262
void PushChild(FOctreeChildNodeRef ChildRef, uint32 FullyInsideView, uint32 FullyOutsideView)
Definition GenericOctree.h:1232
Definition GenericOctree.h:1082
FVector4::FReal FReal
Definition GenericOctree.h:1085
TOctree_DEPRECATED(const FVector &InOrigin, FReal InExtent)
Definition GenericOctree.h:1663
ElementType & GetElementById(FOctreeElementId ElementId)
Definition GenericOctree.h:1517
FReal GetNodeLevelExtent(int32 Level) const
Definition GenericOctree.h:1599
SIZE_T GetSizeBytes() const
Definition GenericOctree.h:1594
FBoxCenterAndExtent GetRootBounds() const
Definition GenericOctree.h:1605
const ElementType & GetElementById(FOctreeElementId ElementId) const
Definition GenericOctree.h:1525
void Destroy()
Definition GenericOctree.h:1505
void ShrinkElements()
Definition GenericOctree.h:1610
void RemoveElement(FOctreeElementId ElementId)
Definition GenericOctree.h:1423
void ApplyOffset(const FVector &InOffset, bool bGlobalOctree)
Definition GenericOctree.h:1621
bool IsValidElementId(FOctreeElementId ElementId) const
Definition GenericOctree.h:1533
void DumpStats() const
Definition GenericOctree.h:1541
ElementArrayType::TConstIterator ElementConstIt
Definition GenericOctree.h:1087
TArray< ElementType, typename OctreeSemantics::ElementAllocator > ElementArrayType
Definition GenericOctree.h:1086
void SetElementId(const ElementType &Element, FOctreeElementId Id)
Definition GenericOctree.h:1818
TOctree_DEPRECATED()
Definition GenericOctree.h:1672
void AddElement(typename TTypeTraits< ElementType >::ConstInitType Element)
Definition GenericOctree.h:1414
Definition ContainerAllocationPolicies.h:894
@ Element
Definition Visu.h:18
float v
Definition radaudio_mdct.cpp:62
U16 Index
Definition radfft.cpp:71
Definition UnrealMathUtility.h:270
const T & ConstReference
Definition UnrealTypeTraits.h:274
TCallTraits< T >::ParamType ConstInitType
Definition UnrealTypeTraits.h:336
Definition BoxSphereBounds.h:25
T W
Definition Vector4.h:52
T X
Definition Vector4.h:43
double FReal
Definition Vector4.h:36
static CORE_API const TVector< double > ZeroVector
Definition Vector.h:79
double FReal
Definition Vector.h:55
Definition UnrealMathFPU.h:42
Definition UnrealMathFPU.h:20
Definition UnrealMathFPU.h:28