FGroupTopologyDeformer

[FGroupTopologyDeformer](API\Plugins\DynamicMesh\Operations\FGroupTopologyDeformer) supports deforming a Mesh based on an overlaid [FGroupTopology](API\Plugins\DynamicMesh\FGroupTopology).

Windows
MacOS
Linux

Inheritance Hierarchy

FGroupTopologyDeformer

FGroupTopologyLaplacianDeformer

References

Module

DynamicMesh

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/Operations/GroupTopologyDeformer.h

Include

#include "Operations/GroupTopologyDeformer.h"

Syntax

class FGroupTopologyDeformer

Remarks

FGroupTopologyDeformer supports deforming a Mesh based on an overlaid FGroupTopology. First the client defines a set of "Handle" elements (Faces/Corners/Edges) using SetActiveHandleX(). The client will provide new vertex positions for the vertices of these elements via the HandleVertexDeformFunc argument to UpdateSolution(). Once the Handle vertices have been updated, the deformer solves for updated vertex positions in the GroupTopology Faces that are adjacent to the handles. This region is referred to as the "ROI" (Region-of-Interest)

The default deformation is to first solve for the updated edges, and then solve for updated faces. This is done via linear encoding of the edge and face vertices relative to their boundaries (edge boundary is endpoint corners, face boundary is edges).

Various functions can be overrided to customize behavior.

Variables

Name Description

Protected variable

TArray< FEdgeEn...

 

EdgeEncodings

Protected variable

TSet< int >

 

FaceBoundaryVertsTemp

Protected variable

TArray< FFaceEn...

 

FaceEncodings

Protected variable

TSet< int >

 

FaceVertsTemp

Protected variable

TSet< int >

 

FixedBoundaryVertices

Protected variable

TSet< int >

 

HandleBoundaryVertices

Protected variable

TSet< int >

 

HandleVertices

Protected variable

FVertexPosition...

 

InitialPositions

Protected variable

const FDynamicM...

 

Mesh

Protected variable

TSet< int >

 

ModifiedOverlayNormals

Protected variable

TSet< int >

 

ModifiedVertices

Protected variable

TArray< FROIEdg...

 

ROIEdges

Protected variable

TSet< int >

 

ROIEdgeVertices

Protected variable

TArray< FROIFac...

 

ROIFaces

Protected variable

const FGroupTop...

 

Topology

Destructors

Name Description

Public function Virtual

~FGroupTopologyDeformer()

Functions

Name Description

Protected function Virtual

void

 

CalculateROI

(
    const TArray< int >& HandleGroups,
    const TArray< int >& ROIGroups
)

Populate the internal ROI data structures based on the given HandleGroups and ROIGroups.

Public function Virtual

void

 

ClearSolution

(
    FDynamicMesh3* TargetMesh
)

Restore the Handle and ROI vertex positions to their initial state

Protected function Virtual

void

 

ComputeEncoding()

Precompute the representation of the ROI vertices at the initial positions.

Public function Const

const TSet< ...

 

GetHandleVertices()

Public function Const

const FDynam...

 

GetMesh()

Public function Const

const TSet< ...

 

GetModifiedOverlayNormals()

Public function Const

const TSet< ...

 

GetModifiedVertices()

Public function Const

const FGroup...

 

GetTopology()

Public function

void

 

Initialize

(
    const FDynamicMesh3* Mesh,
    const FGroupTopology* Topology
)

Set the Mesh and Topology to use for the deformation

Protected function Virtual

void

 

Reset()

These are functions that subclasses may wish to overridereset all internal data structures, eg when changing handle

Protected function Virtual

void

 

SaveInitialPositions()

Save the positions of all vertices that will be modified

Public function Virtual

void

 

SetActiveHandleCorners

(
    const TArray< int >& TopologyCorne...
)

Set the active handle to the given Corners

Public function Virtual

void

 

SetActiveHandleEdges

(
    const TArray< int >& TopologyEdgeI...
)

Set the active handle to the given Edges

Public function Virtual

void

 

SetActiveHandleFaces

(
    const TArray< int >& FaceGroupIDs
)

Handle setup/configuraiton Set the active handle to the given Faces

Public function Virtual

void

 

UpdateSolution

(
    FDynamicMesh3* TargetMesh,
    const TFunction< FVector3d...
)

Solving Update TargetMesh by first calling HandleVertexDeformFunc() to get new handle vertex positions, then solving for new ROI vertex positions.

Classes

Name

Description

Protected struct

FEdgeEncoding

Protected struct

FEdgeVertexEncoding

Deformation strategy (should be in subclass?)

Protected struct

FFaceEncoding

Protected struct

FFaceVertexEncoding

Protected struct

FROIEdge

Protected struct

FROIFace

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