Choose your operating system:
Windows
macOS
Linux
 FSparseDynamicOctree3

Module 

Header 
/Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/DynamicMeshOctree3.h 
Include 
#include "DynamicMesh/DynamicMeshOctree3.h" 
class FDynamicMeshOctree3 : public UE::Geometry::FSparseDynamicOctree3
FDynamicMeshOctree3 is an extension of FSparseDynamicOctree3 for the triangles of a FDynamicMesh3 instance. This extension does several things: 1) provides a simplified API based on triangle IDs to various Octree functions 2) tracks ModifiedBounds box of modified areas 3) support for computing/updating/querying a "Cut" of the octree, ie a set of cells which are roots of subbranches that partition the tree. This is useful for splitting up mesh processing/rendering into spatiallycoherent chunks. (This functionality should probably be extracted into a separate class...)
Name  Description  


const FDynamicM... 
Mesh 
Potential optimizations: 

ModifiedBounds 
Bounding box of triangles that have been inserted/removed since last clear 
Name  Description  


BuildLevelCutSet ( 


CheckValidity ( 
Check that the Octree is internally valid 


CollectRootTriangles ( 
Call TriangleFunc for all triangles in the octree "above" the CutSet (ie at tree cells that are not children of any cut cells) 


CollectSpillTriangles ( 
Call TriangleFunc for any triangles in the spill set (ie not contained in any Root cell) 


CollectTriangles ( 
Call TriangleFunc on any triangles in the branch of the tree starting at CellRef 


FindNearestHitObject ( 
Find the nearest triangle of the mesh that is hit by the ray 


FindNearestHitObject ( 
Find the nearest triangle of the mesh that is hit by the ray 


Initialize ( 
Add all triangles of MeshIn to the octree 


InsertTriangle ( 
Insert a triangle into the tree 


InsertTriangles ( 
Insert a set of triangles into the tree 


InsertTriangles ( 
Insert a list of triangles into the tree 


NotifyPendingModification ( 
Include the current bounds of a set of triangles in the ModifiedBounds box 


NotifyPendingModification ( 
Include the current bounds of a triangle in the ModifiedBounds box 


ReinsertTriangles ( 
Reinsert a set of triangles into the tree 


ReinsertTrianglesParallel 
Reinsert a set of triangles into the tree. 


RemoveTriangle ( 
Remove a triangle from the tree 


RemoveTriangles ( 
Remove a set of triangles into the tree 


ResetModifiedBounds() 
Reset the internal ModifiedBounds box that tracks modified triangle bounds 


TestCellIntersection ( 


UpdateLevelCutSet ( 
For a fixedlevel cut set created by BuildLevelCutSet, check that all current cells at that level are in the cut set (call this after adding/removing to the tree to make sure the CutSet is up to date) 
Name 
Description 



FCellReference 
Support for building "cuts" of the octree, which are sets of internal nodes which can be used to decompose the tree (eg into spatiallycoherent chunks of triangles, for example)FCellReference is a handle to an internal cell of the octree 

FTreeCutSet 
FTreeCutSet is a cut of the tree, ie a set of internal cells which are "parents" of separate branches 