Navigation
API > API/Plugins > API/Plugins/DynamicMesh
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.
| Name | FGroupTopologyDeformer |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/GroupTopologyDeformer.h |
| Include Path | #include "Operations/GroupTopologyDeformer.h" |
Syntax
class FGroupTopologyDeformer
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FGroupTopologyDeformer() |
Operations/GroupTopologyDeformer.h |
Structs
| Name | Remarks |
|---|---|
| FEdgeEncoding | |
| FEdgeVertexEncoding | Deformation strategy (should be in subclass?) |
| FFaceEncoding | |
| FFaceVertexEncoding | |
| FROIEdge | |
| FROIFace |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ClearSolution
(
FDynamicMesh3* TargetMesh |
Restore the Handle and ROI vertex positions to their initial state | Operations/GroupTopologyDeformer.h | |
void EnumerateROIEdges
(
TFunctionRef< void(const FEdgeSpan&EdgeSpan)> EdgeSpanFunc |
Call EdgeSpanFunc for every group FEdgeSpan in the modified-area ROI that will be modified by the solver (does not include edges that are encompassed by the Handle) | Operations/GroupTopologyDeformer.h | |
const TSet< int > & GetHandleVertices() |
Operations/GroupTopologyDeformer.h | ||
const FDynamicMesh3 * GetMesh() |
Operations/GroupTopologyDeformer.h | ||
const TSet< int > & GetModifiedOverlayNormals() |
Operations/GroupTopologyDeformer.h | ||
const TSet< int > & GetModifiedVertices() |
Operations/GroupTopologyDeformer.h | ||
const FGroupTopology * GetTopology() |
Operations/GroupTopologyDeformer.h | ||
void Initialize
(
const FDynamicMesh3* Mesh, |
Set the Mesh and Topology to use for the deformation | Operations/GroupTopologyDeformer.h | |
virtual void SetActiveHandleCorners
(
const TArray< int >& TopologyCornerIDs |
Set the active handle to the given Corners | Operations/GroupTopologyDeformer.h | |
virtual void SetActiveHandleEdges
(
const TArray< int >& TopologyEdgeIDs |
Set the active handle to the given Edges | Operations/GroupTopologyDeformer.h | |
virtual void SetActiveHandleFaces
(
const TArray< int >& FaceGroupIDs |
Handle setup/configuraiton Set the active handle to the given Faces | Operations/GroupTopologyDeformer.h | |
virtual void SetActiveHandleFromSelection
(
const FGeometrySelection& Selection |
Set the active handle from GeometrySelection | Operations/GroupTopologyDeformer.h | |
virtual void UpdateSolution
(
FDynamicMesh3* TargetMesh, |
Solving Update TargetMesh by first calling HandleVertexDeformFunc() to get new handle vertex positions, then solving for new ROI vertex positions. | Operations/GroupTopologyDeformer.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CalculateROI
(
const TArray< int >& HandleGroups, |
Populate the internal ROI data structures based on the given HandleGroups and ROIGroups. | Operations/GroupTopologyDeformer.h | |
virtual void ComputeEncoding() |
Precompute the representation of the ROI vertices at the initial positions. | Operations/GroupTopologyDeformer.h | |
virtual void Reset() |
These are functions that subclasses may wish to override reset all internal data structures, eg when changing handle | Operations/GroupTopologyDeformer.h | |
virtual void SaveInitialPositions() |
Save the positions of all vertices that will be modified | Operations/GroupTopologyDeformer.h |