Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/Polygroups
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Polygroups/PolygroupsGenerator.h |
| Include | #include "Polygroups/PolygroupsGenerator.h" |
Syntax
class FPolygroupsGenerator
Remarks
FPolygroupsGenerator generates (face/tri/poly)groups for an input mesh based on the geometry and attributes of the input mesh. The various FindPolygroupsFromX() are the driving functions, each performs the full computation.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bApplyPostProcessing | If true, then groups will be post-processed to optimize them, based on parmeters below | |
| bool | bCopyToMesh | If true, after groups are computed they will be copied to the output mesh | |
| TArray< TArray< int > > | FoundPolygroups | Lists of triangle IDs, each list defines a polygroup/polygon | |
| int32 | InitialGroupID | Start at this GroupID when assigning new groups | |
| FDynamicMesh3 * | Mesh | Source mesh | |
| int32 | MinGroupSize | If > 1, groups with a triangle count smaller than this will be merged with a neighbouring group | |
| TArray< int > | PolygroupEdges | List of edge IDs of mesh edges that are on polygroup borders |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FPolygroupsGenerator
(
FDynamicMesh3* MeshIn |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Copy the computed Polygroups to the input Mesh. | ||
| void | CopyPolygroupsToPolygroupSet
(
FPolygroupSet& Polygroups, |
Copy the computed Polygroups to the given PolygroupSet and Mesh | |
| bool | Initialize the PolygroupEdges output member by finding all the mesh edges that are on polygroup borders. | ||
| bool | FindPolygroupsFromAreaDensityPointSampling
(
int32 NumPoints, |
Similar to the technique used in FindPolygroupsFromFurthestPointSampling, except this algorithm attempts to select sample points in connected mesh regions based on the rough area of each region, granting more initial points to larger regions and fewer points to smaller regions, minium of one. | |
| bool | Find Polygroups based on mesh connectivity, ie each connected-component becomes a Polygroup | ||
| bool | FindPolygroupsFromFaceNormals
(
double OneMinusCosAngleTolerance, |
Find Polygroups by randomly picking initial seed triangles and then flood-filling outwards, stopping when the opening angle at an edge is larger than the angle defined by the OneMinusCosAngleTolerance. | |
| bool | FindPolygroupsFromFurthestPointSampling
(
int32 NumPoints, |
Incrementally compute approximate-geodesic-based furthest-point sampling of the mesh until NumPoints samples have been found, then compute local geodesic patches (eg approximate surface voronoi diagaram). | |
| bool | Find Polygroups based on Seams in UV Overlay | ||
| bool | FindPolygroupsFromUVIslands
(
int32 UVLayer |
Find Polygroups based on UV Islands, ie each UV Island becomes a Polygroup | |
| bool | FindSourceMeshPolygonPolygroups
(
bool bRespectUVSeams, |
Find Polygroups by trying to invert triangluation of a polygon mesh | |
| void | GetSeamConstraintEdges
(
bool bUVSeams, |
||
| void | OptimizePolygroups
(
TFunctionRef< bool(int32, int32)> TrisConnectedPredicate |
||
| void | PostProcessPolygroups
(
bool bApplyMerging, |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EWeightingType | Weight potions for algorithms below |