![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MeshSpatialSort.h>
Classes | |
| struct | FMeshNesting |
| Outputs. More... | |
Public Types | |
| enum class | ENestingMethod { InLargestParent , InSmallestParent } |
Public Member Functions | |
| TMeshSpatialSort () | |
| TMeshSpatialSort (TArrayView< const TriangleMeshType > InputMeshes, TArrayView< const FAxisAlignedBox3d > MeshBoundsIn=TArrayView< const FAxisAlignedBox3d >()) | |
| void | Compute () |
Sorts a list meshes into a list of "Nests" where each Nest has an outer shell mesh and a list of contained-inside meshes
For example, if you have a "Russian nesting doll" arrangement of meshes [A,B,C,D] where A holds B holds C holds D:
For similar functionality in 2D, see the TPlanarComplex class
|
strong |
|
inline |
|
inline |
|
inline |
| bool UE::Geometry::TMeshSpatialSort< TriangleMeshType >::bOnlyCheckSingleVertexForNesting = true |
If true, we assume meshes don't intersect, so we can check if a whole mesh is inside another by testing a single vertex If false, we only consider a mesh inside another if every vertex of the smaller is inside the larger
| bool UE::Geometry::TMeshSpatialSort< TriangleMeshType >::bOnlyNestNegativeVolumes = false |
If true, only negative-volume meshes can be nested (i.e., can be included in an FMeshNesting InnerIndices array)
| bool UE::Geometry::TMeshSpatialSort< TriangleMeshType >::bOnlyParentPostiveVolumes = true |
If true, only positive-volume meshes can be assigned the "OuterIndex" of an FMeshNesting Leads to more logical nesting, but note: if true, a negative volume that isn't inside any positive volume mesh will not show up in any nests at all
| TArrayView<const TriangleMeshType> UE::Geometry::TMeshSpatialSort< TriangleMeshType >::InputMeshes |
Meshes to be spatially sorted
| TArray<FAxisAlignedBox3d> UE::Geometry::TMeshSpatialSort< TriangleMeshType >::MeshBounds |
Optional array of bounding boxes for each mesh
| ENestingMethod UE::Geometry::TMeshSpatialSort< TriangleMeshType >::NestingMethod = ENestingMethod::InLargestParent |
Which algorithm is used to determine nesting
| TArray<FMeshNesting> UE::Geometry::TMeshSpatialSort< TriangleMeshType >::Nests |
Computed nests
| TArray<int> UE::Geometry::TMeshSpatialSort< TriangleMeshType >::SkippedMeshIndices |
Indices of meshes that are not included in the "Nests" output, e.g. negative-volume meshes that are not inside any positive-volume mesh if bOnlyParentPostiveVolumes