FGroupTopology

Given a per-triangle integer ("group"), [FGroupTopology](API\Plugins\DynamicMesh\FGroupTopology) extracts a group-level topological graph from an input Mesh.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

DynamicMesh

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/GroupTopology.h

Include

#include "GroupTopology.h"

Syntax

class FGroupTopology

Remarks

Given a per-triangle integer ("group"), FGroupTopology extracts a group-level topological graph from an input Mesh. The graph consists of three elements: Corners: there is a corner at each vertex where 3 or more groups meet (ie 3 or more groups in one-ring) Edges: a group edge is a list of one or more connected edges that have the same pair of different groups on either side Group: a group is a set of connected faces with the same GroupID

By default, the triangle group attribute of the input Mesh is used. You can override GetGroupID to provide your own grouping.

Various query functions are provided to allow group topology to be interrogated. Note that these functions refer to "GroupID", "CornerID", and "GroupEdgeID", these are simply indices into the internal .Groups, .Corners, and .Edges arrays

Variables

Name Description

Public variable

TArray< FCorner...

 

Corners

List of Corners in the topology graph (ie these are the nodes/vertices of the graph)

Protected variable

TBitArray

 

CornerVerticesFlags

Public variable

TArray< FGroupE...

 

Edges

List of Edges in the topology graph (each edge connects two corners/nodes)

Protected variable

TArray< int >

 

EmptyArray

Protected variable

TArray< int >

 

GroupIDToGroupIndexMap

Public variable

TArray< FGroup ...

 

Groups

List of Groups in the topology graph (ie faces)

Protected variable

const FDynamicM...

 

Mesh

Protected variable

TMap< int32, in...

 

VertexIDToCornerIDMap

Constructors

Name Description

Public function

FGroupTopology()

Public function

FGroupTopology

(
    const FDynamicMesh3* Mesh,
    bool bAutoBuild
)

Destructors

Name Description

Public function Virtual

~FGroupTopology()

Functions

Name Description

Public function Const

void

 

CollectGroupBoundaryVertices

(
    int GroupID,
    TSet< int >& Vertices
)

Add all the group boundary vertices of the given GroupID to the Vertices set

Public function Const

void

 

CollectGroupVertices

(
    int GroupID,
    TSet< int >& Vertices
)

Add all the vertices of the given GroupID to the Vertices set

Protected function

void

 

ExtractGroupEdges

(
    FGroup& Group
)

Public function Const

void

 

FindCornerNbrGroups

(
    int CornerID,
    TArray< int >& GroupsOut
)

Add all the groups connected to the given Corner to the GroupsOut list

Public function Const

void

 

FindCornerNbrGroups

(
    const TArray< int >& CornerIDs,
    TArray< int >& GroupsOut
)

Add all the groups connected to the given Corners to the GroupsOut list

Public function Const

void

 

FindEdgeNbrGroups

(
    int GroupEdgeID,
    TArray< int >& GroupsOut
)

Add the groups connected to the given GroupEdgeID to the GroupsOut list.

Public function Const

void

 

FindEdgeNbrGroups

(
    const TArray< int >& GroupEdgeIDs,
    TArray< int >& GroupsOut
)

Add the groups connected to all the GroupEdgeIDs to the GroupsOut list.

Protected function

int

 

FindExistingGroupEdge

(
    int GroupID,
    int OtherGroupID,
    int FirstVertexID
)

Public function Const

const FGroup...

 

FindGroupByID

(
    int GroupID
)

Public function Const

int

 

FindGroupEdgeID

(
    int MeshEdgeID
)

Public function Const

void

 

FindVertexNbrGroups

(
    const TArray< int >& VertexIDs,
    TArray< int >& GroupsOut
)

Add all the groups connected to the given Mesh Vertices to the GroupsOut list

Public function Const

void

 

FindVertexNbrGroups

(
    int VertexID,
    TArray< int >& GroupsOut
)

Add all the groups connected to the given Mesh Vertex to the GroupsOut list

Public function Const

void

 

ForGroupEdges

(
    int GroupID,
    const TFunction< void...
)

Call EdgeFunc for each boundary edge of the given Group (no order defined)

Public function Const

void

 

ForGroupSetEdges

(
    const TArray< int >& GroupIDs,
    const TFunction< void...
)

Call EdgeFunc for each boundary edge of each of the given Groups (no order defined)

Protected function Const

void

 

GetAllVertexGroups

(
    int32 VertexID,
    TArray< int32 >& GroupsOut
)

Public function Const

int32

 

GetCornerIDFromVertexID

(
    int32 VertexID
)

Public function Const

int

 

GetCornerVertexID

(
    int CornerID
)

Public function Const

double

 

GetEdgeArcLength

(
    int32 GroupEdgeID,
    TArray< double >* PerVertexLen...
)

Public function Const

FVector3d

 

GetEdgeMidpoint

(
    int32 GroupEdgeID,
    double* ArcLengthOut,
    TArray< double >* PerVertexLen...
)

Public function Const

const TArray...

 

GetGroupEdgeEdges

(
    int GroupEdgeID
)

Public function Const

bool

 

GetGroupEdgeTangent

(
    int GroupEdgeID,
    FVector3d& TangentOut
)

Calculate tangent of group edge, as direction from start to end endpoints

Public function Const

const TArray...

 

GetGroupEdgeVertices

(
    int GroupEdgeID
)

Public function Const

const TArray...

 

GetGroupFaces

(
    int GroupID
)

Public function Const

FFrame3d

 

GetGroupFrame

(
    int32 GroupID
)

Public function Virtual Const

int

 

GetGroupID

(
    int TriangleID
)

Adjacency of Per-Triangle integers are what define the triangle groups.

Public function Const

const TArray...

 

GetGroupNbrGroups

(
    int GroupID
)

Public function Const

const TArray...

 

GetGroupTriangles

(
    int GroupID
)

Public function Const

void

 

GetSelectedTriangles

(
    const FGroupTopologySelection& Sel...,
    TArray< int32 >& Triangles
)

Get the set of selected triangles for a given GroupTopologySelection

Public function Const

FFrame3d

 

GetSelectionFrame

(
    const FGroupTopologySelection& Sel...,
    FFrame3d* InitialLocalFrame
)

Public function Const

bool

 

IsBoundaryEdge

(
    int32 GroupEdgeID
)

Protected function Virtual Const

bool

 

IsCornerVertex

(
    int VertexID
)

Public function Const

bool

 

IsIsolatedLoop

(
    int32 GroupEdgeID
)

Public function Const

bool

 

IsSimpleGroupEdge

(
    int32 GroupEdgeID
)

Protected function Const

FIndex2i

 

MakeEdgeID

(
    int MeshEdgeID
)

Protected function Const

FIndex2i

 

MakeEdgeID

(
    int Group1,
    int Group2
)

Public function Virtual

void

 

RebuildTopology()

Build the group topology graph.

Classes

Name

Description

Public struct

FCorner

FCorner is a "corner" in the group topology, IE a vertex where 3+ groups meet.

Public struct

FGroup

FGroup is a set of connected triangles with the same GroupID

Public struct

FGroupBoundary

A Group is bounded by closed loops of FGroupEdge elements.

Public struct

FGroupEdge

FGroupEdge is a sequence of group-boundary-edges where the two groups on either side of each edge are the same.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss