Navigation
API > API/Plugins > API/Plugins/DynamicMesh
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.
| Name | FPolygroupsGenerator |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Polygroups/PolygroupsGenerator.h |
| Include Path | #include "Polygroups/PolygroupsGenerator.h" |
Syntax
class FPolygroupsGenerator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Polygroups/PolygroupsGenerator.h | |||
FPolygroupsGenerator
(
FDynamicMesh3* MeshIn |
Polygroups/PolygroupsGenerator.h |
Enums
Public
| Name | Remarks |
|---|---|
| EWeightingType | Weight potions for algorithms below |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bApplyPostProcessing | bool | If true, then groups will be post-processed to optimize them, based on parmeters below | Polygroups/PolygroupsGenerator.h | |
| bCopyToMesh | bool | If true, after groups are computed they will be copied to the output mesh | Polygroups/PolygroupsGenerator.h | |
| FoundPolygroups | TArray< TArray< int > > | Lists of triangle IDs, each list defines a polygroup/polygon | Polygroups/PolygroupsGenerator.h | |
| InitialGroupID | int32 | Start at this GroupID when assigning new groups | Polygroups/PolygroupsGenerator.h | |
| Mesh | FDynamicMesh3 * | Source mesh | Polygroups/PolygroupsGenerator.h | |
| MinGroupSize | int32 | If > 1, groups with a triangle count smaller than this will be merged with a neighbouring group | Polygroups/PolygroupsGenerator.h | |
| PolygroupEdges | TArray< int > | List of edge IDs of mesh edges that are on polygroup borders | Polygroups/PolygroupsGenerator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CopyPolygroupsToMesh () |
Copy the computed Polygroups to the input Mesh. | Polygroups/PolygroupsGenerator.h | |
void CopyPolygroupsToPolygroupSet
(
FPolygroupSet& Polygroups, |
Copy the computed Polygroups to the given PolygroupSet and Mesh | Polygroups/PolygroupsGenerator.h | |
bool FindPolygroupEdges () |
Initialize the PolygroupEdges output member by finding all the mesh edges that are on polygroup borders. | Polygroups/PolygroupsGenerator.h | |
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. | Polygroups/PolygroupsGenerator.h | |
bool FindPolygroupsFromConnectedTris
(
TFunction< bool(int32 TriA, int32 TriB)> AreTrisConnected |
Find PolyGroups based on mesh connectivity and optionally a custom indicator function | Polygroups/PolygroupsGenerator.h | |
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. | Polygroups/PolygroupsGenerator.h | |
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). | Polygroups/PolygroupsGenerator.h | |
bool FindPolygroupsFromHardNormalSeams() |
Find Polygroups based on Seams in UV Overlay | Polygroups/PolygroupsGenerator.h | |
bool FindPolygroupsFromMaterialIDs() |
Find PolyGroups based on Material IDs i.e., connected groups of triangles with the same Material ID become a PolyGroup | Polygroups/PolygroupsGenerator.h | |
bool FindPolygroupsFromUVIslands
(
int32 UVLayer |
Find Polygroups based on UV Islands, ie each UV Island becomes a Polygroup | Polygroups/PolygroupsGenerator.h | |
bool FindSourceMeshPolygonPolygroups
(
bool bRespectUVSeams, |
Find Polygroups by trying to invert triangluation of a polygon mesh | Polygroups/PolygroupsGenerator.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GetSeamConstraintEdges
(
bool bUVSeams, |
Polygroups/PolygroupsGenerator.h | ||
void OptimizePolygroups
(
TFunctionRef< bool(int32, int32)> TrisConnectedPredicate |
Polygroups/PolygroupsGenerator.h | ||
void PostProcessPolygroups
(
bool bApplyMerging, |
Polygroups/PolygroupsGenerator.h |