Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/Parameterization
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Parameterization/MeshPlanarSymmetry.h |
| Include | #include "Parameterization/MeshPlanarSymmetry.h" |
Syntax
class FMeshPlanarSymmetry
Remarks
FMeshPlanarSymmetry detects pairwise symmetry relationships between vertices in a mesh, given a symmetry frame. Once those relationships are known, symmetry can be re-enforced after mesh edits.
Vertices within a tolerance band of the symmetry plane do not have a mirror and are considered "on plane" and will be snapped to the symmetry plane when enforcing symmetry after edits.
The Symmetry Plane is specified by a Frame3d where the XY axes define the plane and the Z axis is the plane normal. So references to "Positive" side below are relative to that Z axis/plane
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bCanIgnoreDegenerateSymmetries | If true, symmetry-finding can return false if it detects a symmetry where all points are on the symmetry plane, rather than attempt to fit a symmetry plane in that case. | |
| FVector3d | CachedSymmetryAxis | ||
| FFrame3d | SymmetryFrame | ||
| FDynamicMesh3 * | TargetMesh | ||
| TArray< FSymmetryVertex > | Vertices | List of vertices, size == TargetMesh.MaxVertexID() |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ApplySymmetryPlaneConstraints
(
const TArray< int >& VertexIndices, |
For any vertices in VertexIndices that are on-plane, take the position in VertexPositionsInOut, apply the on-plane constraint, and return the constrained position in VertexPositionsInOut (ie VertexPositionsInOut is updated to new positions) | |
| void | ComputeSymmetryConstrainedPositions
(
const TArray< int >& SourceVertexROI, |
Given the pairing (SourceVertexROI, SourceVertexPositions), compute the symmetry-constrained vertex positions for MirrorVertexROI and store in MirrorVertexPositionsOut. | |
| bool | FindPlaneAndInitialize
(
FDynamicMesh3* Mesh, |
Given a Mesh and its bounding box, find a Symmetry Plane/Frame and detect any pairs of vertices with planar/mirror-symmetry relationships, as well as "on plane" vertices | |
| void | Update all the symmetry vertex positions based on their Positive-side pair vertex. | ||
| FVector3d | GetMirroredAxis
(
const FVector3d& Axis |
||
| FQuaterniond | GetMirroredOrientation
(
const FQuaterniond& Orientation |
||
| FVector3d | GetMirroredPosition
(
const FVector3d& Position |
||
| void | GetMirrorVertexROI
(
const TArray< int >& VertexROI, |
The set of functions below are intended to be used together in situations like 3D sculpting where we want to apply symmetry constraints within a "brush region of interest (ROI)" See UMeshVertexSculptTool for example usage Computes list of vertices that are mirror-constrained to vertices in VertexROI. | |
| FFrame3d | GetPositiveSideFrame
(
FFrame3d FromFrame |
||
| bool | Initialize
(
FDynamicMesh3* Mesh, |
Given a Mesh, an AABBTree, and a Symmetry Plane/Frame, detect any pairs of vertices with planar/mirror-symmetry relationships, as well as "on plane" vertices | |
| bool | Initialize
(
FDynamicMesh3* Mesh, |
Given a Mesh and its bounding box, and a Symmetry Plane/Frame, detect any pairs of vertices with planar/mirror-symmetry relationships, as well as "on plane" vertices | |
| void | UpdatePlaneVertex
(
int32 VertexID |
||
| void | UpdateSourceVertex
(
int32 VertexID |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FSymmetryVertex |
Constants
| Name | Description |
|---|---|
| MatchFeaturesTolerance | Note for features we specify a direct tolerance instead of a factor, as features are already in their own re-scaled space. |
| MatchVertexToleranceFactor | |
| OnPlaneToleranceFactor | Tolerances used for matching / hashing in symmetry-findingPoint must be within this distance from the symmetry plane to be considered "on" the plane. |
| VertexHashCellSizeFactor | Note performance of vertex hashing is much better when VertexHashCellSize is large enough that most hash lookups only need to look at a single cell. |