|
| void | Initialize (const FDynamicMesh3 *MeshIn) |
| |
| void | ResetModifiedBounds () |
| |
| void | InsertTriangle (int32 TriangleID) |
| |
| void | InsertTriangles (const TArray< int > &Triangles) |
| |
| void | InsertTriangles (const TSet< int > &Triangles) |
| |
| bool | RemoveTriangle (int32 TriangleID) |
| |
| template<typename EnumerableType > |
| void | RemoveTriangles (const EnumerableType &Triangles, bool bMarkModifiedBounds=true) |
| |
| template<typename EnumerableType > |
| void | ReinsertTriangles (const EnumerableType &Triangles) |
| |
| void | ReinsertTrianglesParallel (const TArray< int32 > &Triangles, TArray< uint32 > &TempBuffer, TArray< bool > &TempFlagBuffer) |
| |
| void | NotifyPendingModification (int TriangleID) |
| |
| template<typename EnumerableType > |
| void | NotifyPendingModification (const EnumerableType &Triangles) |
| |
| int32 | FindNearestHitObject (const FRay3d &Ray, double MaxDistance=TNumericLimits< double >::Max()) const |
| |
| int32 | FindNearestHitObject (const FRay3d &Ray, TFunctionRef< bool(int)> IncludeTriangleIDFunc, double MaxDistance=TNumericLimits< double >::Max()) const |
| |
| void | CheckValidity (EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check, bool bVerbose=false, bool bFailOnMissingObjects=false) const |
| |
| FTreeCutSet | BuildLevelCutSet (uint32 CutLevel=5) const |
| |
| void | UpdateLevelCutSet (FTreeCutSet &CutSet, TArray< FCellReference > &NewCutCellsOut) const |
| |
| bool | TestCellIntersection (const FCellReference &CellRef, const FAxisAlignedBox3d &Bounds) const |
| |
| void | CollectTriangles (const FCellReference &CellRef, TFunctionRef< void(int)> TriangleFunc) const |
| |
| void | CollectRootTriangles (const FTreeCutSet &CutSet, TFunctionRef< void(int)> TriangleFunc) const |
| |
| void | CollectSpillTriangles (TFunctionRef< void(int)> TriangleFunc) const |
| |
| int | GetMaxTreeDepth () |
| |
| void | SetMaxTreeDepth (int MaxTreeDepthIn) |
| |
| GEOMETRYCORE_API bool | ContainsObject (int32 ObjectID) const |
| |
| GEOMETRYCORE_API void | InsertObject (int32 ObjectID, const FAxisAlignedBox3d &Bounds) |
| |
| GEOMETRYCORE_API bool | RemoveObject (int32 ObjectID) |
| |
| GEOMETRYCORE_API bool | ReinsertObject (int32 ObjectID, const FAxisAlignedBox3d &NewBounds, uint32 CellIDHint=InvalidCellID) |
| |
| GEOMETRYCORE_API bool | CheckIfObjectNeedsReinsert (int32 ObjectID, const FAxisAlignedBox3d &NewBounds, uint32 &CellIDOut) const |
| |
| GEOMETRYCORE_API int32 | FindNearestHitObject (const FRay3d &Ray, TFunctionRef< FAxisAlignedBox3d(int)> GetObjectBoundsFunc, TFunctionRef< double(int, const FRay3d &)> HitObjectDistFunc, double MaxDistance=TNumericLimits< double >::Max()) const |
| |
| GEOMETRYCORE_API void | ContainmentQuery (const FVector3d &Point, TFunctionRef< void(int)> ObjectIDFunc) const |
| |
| GEOMETRYCORE_API bool | ContainmentQueryCancellable (const FVector3d &Point, TFunctionRef< bool(int)> ObjectIDFunc) const |
| |
| GEOMETRYCORE_API void | RangeQuery (const FAxisAlignedBox3d &Bounds, TFunctionRef< void(int)> ObjectIDFunc) const |
| |
| GEOMETRYCORE_API void | RangeQuery (const FAxisAlignedBox3d &Bounds, TArray< int > &ObjectIDsOut) const |
| |
| GEOMETRYCORE_API void | ParallelRangeQuery (const FAxisAlignedBox3d &Bounds, TArray< int > &ObjectIDsOut) const |
| |
| GEOMETRYCORE_API void | ParallelRangeQuery (const FAxisAlignedBox3d &RangeBoundsHint, TFunctionRef< bool(const FAxisAlignedBox3d &CellBounds)> BoundsOverlapFn, TArray< int32 > &ObjectIDs) const |
| |
| GEOMETRYCORE_API int | ParallelOverlapAnyQuery (const FAxisAlignedBox3d &ShapeBounds, TFunctionRef< bool(int32)> ObjectOverlapFn, TFunctionRef< bool(const FAxisAlignedBox3d &)> BoundsOverlapFn) const |
| |
| int | ParallelOverlapAnyQuery (const FAxisAlignedBox3d &ShapeBounds, TFunctionRef< bool(int32)> ObjectOverlapFn) const |
| |
| GEOMETRYCORE_API void | CheckValidity (TFunctionRef< bool(int)> IsValidObjectIDFunc, TFunctionRef< FAxisAlignedBox3d(int)> GetObjectBoundsFunc, EValidityCheckFailMode FailMode=EValidityCheckFailMode::Check, bool bVerbose=false, bool bFailOnMissingObjects=false) const |
| |
| GEOMETRYCORE_API void | ComputeStatistics (FStatistics &StatsOut) const |
| |
|
| static constexpr uint32 | MaxSupportedTreeDepth = 0x1F |
| |
| double | GetCellWidth (uint32 Level) const |
| |
| FAxisAlignedBox3d | GetBox (uint32 Level, const FVector3i &Index, double ExpandFactor) const |
| |
| FAxisAlignedBox3d | GetCellBox (const FSparseOctreeCell &Cell, double ExpandFactor=0) const |
| |
| FVector3d | GetCellCenter (const FSparseOctreeCell &Cell) const |
| |
| FVector3i | PointToIndex (uint32 Level, const FVector3d &Position) const |
| |
| int | ToChildCellIndex (const FSparseOctreeCell &Cell, const FVector3d &Position) const |
| |
| bool | CanFit (const FSparseOctreeCell &Cell, const FAxisAlignedBox3d &Bounds) const |
| |
| uint32 | GetCellForObject (int32 ObjectID) const |
| |
| GEOMETRYCORE_API FSparseOctreeCell | FindCurrentContainingCell (const FAxisAlignedBox3d &Bounds) const |
| |
| GEOMETRYCORE_API void | Insert_Spill (int32 ObjectID, const FAxisAlignedBox3d &Bounds) |
| |
| GEOMETRYCORE_API void | Insert_NewRoot (int32 ObjectID, const FAxisAlignedBox3d &Bounds, FSparseOctreeCell NewRootCell) |
| |
| GEOMETRYCORE_API void | Insert_ToCell (int32 ObjectID, const FAxisAlignedBox3d &Bounds, const FSparseOctreeCell &ExistingCell) |
| |
| GEOMETRYCORE_API void | Insert_NewChildCell (int32 ObjectID, const FAxisAlignedBox3d &Bounds, int ParentCellID, FSparseOctreeCell NewChildCell, int ChildIdx) |
| |
| GEOMETRYCORE_API double | FindNearestRayCellIntersection (const FSparseOctreeCell &Cell, const FRay3d &Ray) const |
| |
| GEOMETRYCORE_API void | BranchRangeQuery (const FSparseOctreeCell *ParentCell, const FAxisAlignedBox3d &Bounds, TArray< int > &ObjectIDs) const |
| |
| int | MaxTreeDepth = 10 |
| |
| FRefCountVector | CellRefCounts |
| |
| TDynamicVector< FSparseOctreeCell > | Cells |
| |
| FSmallListSet | CellObjectLists |
| |
| TSet< int32 > | SpillObjectSet |
| |
| TDynamicVector< uint32 > | ObjectIDToCellMap |
| |
| FDynamicFlagArray | ValidObjectIDs |
| |
| TSparseGrid3< uint32 > | RootCells |
| |
| static constexpr uint32 | InvalidCellID = FSparseOctreeCell::InvalidID |
| |
| static constexpr uint32 | SpillCellID = InvalidCellID - 1 |
| |
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 sub-branches that partition the tree. This is useful for splitting up mesh processing/rendering into spatially-coherent chunks. (This functionality should probably be extracted into a separate class...)