FPolygroupsGenerator

[FPolygroupsGenerator](API\Plugins\DynamicMesh\Polygroups\FPolygroupsGenerator) generates (face/tri/poly)groups for an input mesh based on the geometry and attributes of the input mesh.

Choose your operating system:

Windows

macOS

Linux

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

Name Description

Public variable

bool

 

bApplyPostProcessing

If true, then groups will be post-processed to optimize them, based on parmeters below

Public variable

bool

 

bCopyToMesh

If true, after groups are computed they will be copied to the output mesh

Public variable

TArray< TArray<...

 

FoundPolygroups

Lists of triangle IDs, each list defines a polygroup/polygon

Public variable

FDynamicMesh3 &...

 

Mesh

Source mesh

Public variable

int32

 

MinGroupSize

If > 1, groups with a triangle count smaller than this will be merged with a neighbouring group

Public variable

TArray< int >

 

PolygroupEdges

List of edge IDs of mesh edges that are on polygroup borders

Constructors

Name Description

Public function

FPolygroupsGenerator()

Public function

FPolygroupsGenerator

(
    FDynamicMesh3* MeshIn
)

Functions

Name Description

Public function

void

 

CopyPolygroupsToMesh()

Copy the computed Polygroups to the input Mesh.

Public function

void

 

CopyPolygroupsToPolygroupSet

(
    FPolygroupSet& Polygroups,
    FDynamicMesh3& TargetMesh
)

Copy the computed Polygroups to the given PolygroupSet and Mesh

Public function

bool

 

FindPolygroupEdges()

Initialize the PolygroupEdges output member by finding all the mesh edges that are on polygroup borders.

Public function

bool

 

FindPolygroupsFromConnectedTris()

Find Polygroups based on mesh connectivity, ie each connected-component becomes a Polygroup

Public function

bool

 

FindPolygroupsFromFaceNormals

(
    double DotTolerance
)

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 DotTolerance.

Public function

bool

 

FindPolygroupsFromFurthestPointSampling

(
    int32 NumPoints,
    EWeightingType WeightingType,
    FVector3d WeightingCoeffs,
    FPolygroupSet* StartingGroups
)

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).

Public function

bool

 

FindPolygroupsFromHardNormalSeams()

Find Polygroups based on Seams in UV Overlay

Public function

bool

 

FindPolygroupsFromUVIslands

(
    int32 UVLayer
)

Find Polygroups based on UV Islands, ie each UV Island becomes a Polygroup

Protected function

void

 

OptimizePolygroups()

Protected function

void

 

PostProcessPolygroups

(
    bool bApplyMerging
)

Enums

Name

Description

Public enum

EWeightingType

Weight potions for algorithms below