Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/DynamicMesh
Inheritance Hierarchy
- FSparseDynamicOctree3
- FDynamicMeshOctree3
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/DynamicMesh/DynamicMeshOctree3.h |
| Include | #include "DynamicMesh/DynamicMeshOctree3.h" |
Syntax
class FDynamicMeshOctree3 : public UE::Geometry::FSparseDynamicOctree3
Remarks
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...)
Variables
| Type | Name | Description | |
|---|---|---|---|
| const FDynamicMesh3 * | Mesh | Potential optimizations: | |
| FAxisAlignedBox3d | ModifiedBounds | Bounding box of triangles that have been inserted/removed since last clear |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FTreeCutSet | BuildLevelCutSet
(
uint32 CutLevel |
||
| void | CheckValidity
(
EValidityCheckFailMode FailMode, |
Check that the Octree is internally valid | |
| void | CollectRootTriangles
(
const FTreeCutSet& CutSet, |
Call TriangleFunc for all triangles in the octree "above" the CutSet (ie at tree cells that are not children of any cut cells) | |
| void | CollectSpillTriangles
(
TFunctionRef< void(int)> TriangleFunc |
Call TriangleFunc for any triangles in the spill set (ie not contained in any Root cell) | |
| void | CollectTriangles
(
const FCellReference& CellRef, |
Call TriangleFunc on any triangles in the branch of the tree starting at CellRef | |
| int32 | FindNearestHitObject
(
const FRay3d& Ray, |
Find the nearest triangle of the mesh that is hit by the ray | |
| int32 | FindNearestHitObject
(
const FRay3d& Ray, |
Find the nearest triangle of the mesh that is hit by the ray | |
| void | Initialize
(
const FDynamicMesh3* MeshIn |
Add all triangles of MeshIn to the octree | |
| void | InsertTriangle
(
int32 TriangleID |
Insert a triangle into the tree | |
| void | InsertTriangles
(
const TSet< int >& Triangles |
Insert a set of triangles into the tree | |
| void | InsertTriangles
(
const TArray< int >& Triangles |
Insert a list of triangles into the tree | |
| void | NotifyPendingModification
(
const EnumerableType& Triangles |
Include the current bounds of a set of triangles in the ModifiedBounds box | |
| void | NotifyPendingModification
(
int TriangleID |
Include the current bounds of a triangle in the ModifiedBounds box | |
| void | ReinsertTriangles
(
const EnumerableType& Triangles |
Reinsert a set of triangles into the tree | |
| void | Reinsert a set of triangles into the tree. | ||
| bool | RemoveTriangle
(
int32 TriangleID |
Remove a triangle from the tree | |
| void | RemoveTriangles
(
const EnumerableType& Triangles, |
Remove a set of triangles into the tree | |
| void | Reset the internal ModifiedBounds box that tracks modified triangle bounds | ||
| bool | TestCellIntersection
(
const FCellReference& CellRef, |
||
| void | UpdateLevelCutSet
(
FTreeCutSet& CutSet, |
For a fixed-level 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) |
Classes
| Type | 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 spatially-coherent 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 |