Module |
|
Header |
/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Spatial/MeshSpatialSort.h |
Include |
#include "Spatial/MeshSpatialSort.h" |
template<class TriangleMeshType>
class TMeshSpatialSort
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:
If NestingMethod is InSmallestParent, the output will be: Nest 1: Outer: A, Inner: B, Parent: Invalid Nest 2: Outer; C, Inner: D, Parent: B Nest 1 conceptually corresponds to the outer and inner walls of the first doll, and Nest 2 the same of the second doll. (
if the orientation-related booleans are set to true, this would only hold if the mesh orientations are also alternating)
If NestingMethod is InLargestParent, the output will be: Nest 1: Outer: A; Inner: B, C, D; Parent: Invalid In this case Nest 1 conceptually corresponds to there being a single outer structure, and the inner structure is left unsorted (
for InLargestParent mode, you typically want bOnlyNestNegativeVolumes to be false) For similar functionality in 2D, see the TPlanarComplex class
Name | Description | ||
---|---|---|---|
|
bOnlyCheckSingleVertexForNesting |
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 |
|
|
bOnlyNestNegativeVolumes |
If true, only negative-volume meshes can be nested (i.e., can be included in an FMeshNesting InnerIndices array) |
|
|
bOnlyParentPostiveVolumes |
If true, only positive-volume meshes can be assigned the "OuterIndex" of an FMeshNesting Leads to more logical nesting, but |
|
|
TArrayView< con... |
InputMeshes |
Meshes to be spatially sorted |
|
MeshBounds |
Optional array of bounding boxes for each mesh |
|
|
NestingMethod |
Which algorithm is used to determine nesting |
|
|
Nests |
Computed nests |
|
|
TArray< int > |
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 |
Name | Description | |
---|---|---|
|
TMeshSpatialSort() |
|
|
TMeshSpatialSort ( |
Name |
Description |
|
---|---|---|
|
FMeshNesting |
Outputs. |
Name |
Description |
|
---|---|---|
|
ENestingMethod |