FPolygroupSet

Polygroup sets can be stored in multiple places.

Choose your operating system:

Windows

macOS

Linux

References

Module

DynamicMesh

Header

/Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Polygroups/PolygroupSet.h

Include

#include "Polygroups/PolygroupSet.h"

Syntax

struct FPolygroupSet

Remarks

Polygroup sets can be stored in multiple places. The default location is in the per-triangle group integer stored directly on a FDynamicMesh3. Additional layers may be stored in the FDynamicMeshAttributeSet. Future iterations could store packed polygroups in other places, store them in separate arrays, and so on. FPolygroupSet can be used to abstract these different cases, by providing a standard Polygroup Get/Set API.

To support unique Polygroup ID allocation, FPolygroupSet calculates the maximum GroupID on creation, and updates this maximum across SetGroup() calls. AllocateNewGroupID() can be used to provide new unused GroupIDs. For consistency with FDynamicMesh3, MaxGroupID is set such that all GroupIDs are less than MaxGroupID

Variables

Name Description

Public variable

int32

 

GroupLayerIndex

Public variable

int32

 

MaxGroupID

Public variable

const FDynamicM...

 

Mesh

Public variable

const FDynamicM...

 

PolygroupAttrib

Constructors

Name Description

Public function

FPolygroupSet

(
    const FDynamicMesh3* MeshIn
)

Initialize a PolygroupSet for the given Mesh, and standard triangle group layer

Public function

FPolygroupSet

(
    const FPolygroupSet* CopyIn
)

Initialize a PolygroupSet by copying an existing PolygroupSet

Public function

FPolygroupSet

(
    const FDynamicMesh3* MeshIn,
    FPolygroupLayer GroupLayer
)

Initialize a PolygroupSet for the given Mesh, and standard triangle group layer

Public function

FPolygroupSet

(
    const FDynamicMesh3* MeshIn,
    const FDynamicMeshPolygroupAttribut...
)

Initialize a PolygroupSet for given Mesh and specific Polygroup attribute layer

Public function

FPolygroupSet

(
    const FDynamicMesh3* MeshIn,
    int32 PolygroupLayerIndex
)

Initialize a PolygroupSet for given Mesh and specific Polygroup attribute layer, found by index.

Public function

FPolygroupSet

(
    const FDynamicMesh3* MeshIn,
    FName AttribName
)

Initialize a PolygroupSet for given Mesh and specific Polygroup attribute layer, found by name.

Functions

Name Description

Public function

int32

 

AllocateNewGroupID()

Allocate a new unused PolygroupID by incrementing the MaxGroupID member

Public function Const

int32

 

GetGroup

(
    int32 TriangleID
)

Public function

const FDynam...

 

GetMesh()

Public function

const FDynam...

 

GetPolygroup()

Public function Const

int32

 

GetPolygroupIndex()

Public function Const

int32

 

GetTriangleGroup

(
    int32 TriangleID
)

Public function

void

 

RecalculateMaxGroupID()

Calculate the current maximum PolygroupID used in the active set and store in MaxGroupID member

Public function

void

 

SetGroup

(
    int32 TriangleID,
    int32 NewGroupID,
    FDynamicMesh3& WritableMesh
)

Set the PolygroupID for a TriangleID