Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/Operations
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/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
| Type | Name | Description | |
|---|---|---|---|
| TArray< FEdgeEncoding > | EdgeEncodings | ||
| TSet< int > | FaceBoundaryVertsTemp | ||
| TArray< FFaceEncoding > | FaceEncodings | ||
| TSet< int > | FaceVertsTemp | ||
| TSet< int > | FixedBoundaryVertices | ||
| TSet< int > | HandleBoundaryVertices | ||
| TSet< int > | HandleVertices | ||
| FVertexPositionCache | InitialPositions | ||
| const FDynamicMesh3 * | Mesh | ||
| TSet< int > | ModifiedOverlayNormals | ||
| TSet< int > | ModifiedVertices | ||
| TArray< FROIEdge > | ROIEdges | ||
| TSet< int > | ROIEdgeVertices | ||
| TArray< FROIFace > | ROIFaces | ||
| const FGroupTopology * | Topology |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CalculateROI
(
const TArray< int >& HandleGroups, |
Populate the internal ROI data structures based on the given HandleGroups and ROIGroups. | |
| void | ClearSolution
(
FDynamicMesh3* TargetMesh |
Restore the Handle and ROI vertex positions to their initial state | |
| void | Precompute the representation of the ROI vertices at the initial positions. | ||
| 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) | |
| const TSet< int > & | |||
| const FDynamicMesh3 * | GetMesh () |
||
| const TSet< int > & | |||
| const TSet< int > & | |||
| const FGroupTopology * | GetTopology () |
||
| void | Initialize
(
const FDynamicMesh3* Mesh, |
Set the Mesh and Topology to use for the deformation | |
| void | Reset () |
These are functions that subclasses may wish to overridereset all internal data structures, eg when changing handle | |
| void | Save the positions of all vertices that will be modified | ||
| void | SetActiveHandleCorners
(
const TArray< int >& TopologyCornerIDs |
Set the active handle to the given Corners | |
| void | SetActiveHandleEdges
(
const TArray< int >& TopologyEdgeIDs |
Set the active handle to the given Edges | |
| void | SetActiveHandleFaces
(
const TArray< int >& FaceGroupIDs |
Handle setup/configuraiton Set the active handle to the given Faces | |
| void | SetActiveHandleFromSelection
(
const FGeometrySelection& Selection |
Set the active handle from GeometrySelection | |
| void | UpdateSolution
(
FDynamicMesh3* TargetMesh, |
Solving Update TargetMesh by first calling HandleVertexDeformFunc() to get new handle vertex positions, then solving for new ROI vertex positions. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FEdgeEncoding | |||
| FEdgeVertexEncoding | Deformation strategy (should be in subclass?) | ||
| FFaceEncoding | |||
| FFaceVertexEncoding | |||
| FROIEdge | |||
| FROIFace |