Navigation
API > API/Runtime > API/Runtime/GeometryCore
Class to support local planar simplification, to reduce excess edges created by plane cuts, edge loop insertions, and similar operations (Note a custom version of this logic also exists on the FMeshBoolean class)
| Name | FLocalPlanarSimplify |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Operations/LocalPlanarSimplify.h |
| Include Path | #include "Operations/LocalPlanarSimplify.h" |
Syntax
class FLocalPlanarSimplify
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bPreserveOverlayUVs | bool | Prevent simplification from distorting overlay UVs | Operations/LocalPlanarSimplify.h | |
| bPreserveTriangleGroups | bool | Prevent simplification from distorting triangle groups | Operations/LocalPlanarSimplify.h | |
| bPreserveVertexNormals | bool | Prevent simplification from distorting vertex normals | Operations/LocalPlanarSimplify.h | |
| bPreserveVertexUVs | bool | Prevent simplification from distorting vertex UVs | Operations/LocalPlanarSimplify.h | |
| NormalDistortTolerance | float | When preserving normals, sets maximum allowed change in normals from collapsing an edge, measured at the removed vertex in degrees | Operations/LocalPlanarSimplify.h | |
| SimplificationAngleTolerance | double | Degrees of deviation from coplanar that we will still simplify | Operations/LocalPlanarSimplify.h | |
| TryToImproveTriQualityThreshold | double | If triangle quality (aspect ratio) is worse than this threshold, only simplify in ways that improve quality. | Operations/LocalPlanarSimplify.h | |
| UVDistortTolerance | float | When preserving UVs, sets maximum allowed change in UV coordinates from collapsing an edge, measured at the removed vertex | Operations/LocalPlanarSimplify.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void SimplifyAlongEdges
(
FDynamicMesh3& Mesh, |
Simplify Mesh along the given edges, and update the edge set accordingly | Operations/LocalPlanarSimplify.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void CollapseDegenerateEdges
(
FDynamicMesh3& Mesh, |
Collapse degenerate edges. | Operations/LocalPlanarSimplify.h | |
static bool CollapseWouldChangeShapeOrUVs
(
const FDynamicMesh3& Mesh, |
Test if a given edge collapse would change the mesh shape, mesh triangle group shape, or UVs unacceptably | Operations/LocalPlanarSimplify.h | |
static bool CollapseWouldHurtTriangleQuality
(
const FDynamicMesh3& Mesh, |
Test if a given edge collapse would cause a triangle flip or other unacceptable decrease in mesh quality Specialized for collapsing at flat triangles Test if a given edge collapse would cause a triangle flip or other unacceptable decrease in mesh quality | Operations/LocalPlanarSimplify.h | |
static bool IsDevelopableAlongEdge
(
const FDynamicMesh3& Mesh, |
Test if the triangles connected to a vertex could be flattened by folding along the given edge | Operations/LocalPlanarSimplify.h | |
static bool IsFlat
(
const FDynamicMesh3& Mesh, |
The below helper functions are used by SimplifyAlongEdges, but also the similar customized versions of the same algorithm in FMeshBoolean and FMeshSelfUnion as well Test if the triangles connected to a vertex are all coplanar | Operations/LocalPlanarSimplify.h |