Navigation
API > API/Runtime > API/Runtime/GeometryCore
FDynamicMeshEditor implements low-level mesh editing operations. These operations can be used to construct higher-level operations. For example an Extrude operation could be implemented via DuplicateTriangles() and StitchLoopMinimal().
| Name | FDynamicMeshEditor |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/DynamicMeshEditor.h |
| Include Path | #include "DynamicMeshEditor.h" |
Syntax
class FDynamicMeshEditor
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDynamicMeshEditor
(
FDynamicMesh3* MeshIn |
DynamicMeshEditor.h |
Structs
| Name | Remarks |
|---|---|
| FLoopPairSet | Pair of associated vertex and edge loops. |
Enums
Public
| Name | Remarks |
|---|---|
| EDuplicateTriBehavior | In ReinsertSubmesh, a problem can arise where the mesh we are inserting has duplicate triangles of the base mesh. |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Mesh | FDynamicMesh3 * | The mesh we will be editing | DynamicMeshEditor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AddTriangleFan_OrderedVertexLoop
(
int CenterVertex, |
Fill hole with a triangle fan given an existing (unconnected) center vertex and an ordered loop of boundary vertices on the hole border. | DynamicMeshEditor.h | |
void AppendColors
(
const FDynamicMesh3* AppendMesh, |
Append Colors from one attribute overlay to another. | DynamicMeshEditor.h | |
void AppendElementSubset
(
const FDynamicMesh3* FromMesh, |
Append overlay elements in both ROIs from one overlay to another | DynamicMeshEditor.h | |
void AppendMesh
(
const TTriangleMeshAdapter< double >* AppendMesh, |
Append input mesh to our internal Mesh. | DynamicMeshEditor.h | |
void AppendMesh
(
const FDynamicMesh3* AppendMesh, |
Append input mesh to our internal mesh | DynamicMeshEditor.h | |
void AppendNormals
(
const FDynamicMesh3* AppendMesh, |
Append normals from one attribute overlay to another. | DynamicMeshEditor.h | |
void AppendTriangles
(
const FDynamicMesh3* SourceMesh, |
Append triangles of an existing mesh. | DynamicMeshEditor.h | |
void AppendUVs
(
const FDynamicMesh3* AppendMesh, |
Append UVs from one attribute overlay to another. | DynamicMeshEditor.h | |
FVector3f ComputeAndSetQuadNormal
(
const FIndex2i& QuadTris, |
Calculate and set the per-triangle normals of the two input quads. | DynamicMeshEditor.h | |
void CopyAttributes
(
int FromTriangleID, |
Copy all attribute-layer values from one triangle to another, using the IndexMaps to track and re-use shared attribute values. | DynamicMeshEditor.h | |
void DisconnectTriangles
(
const TArray< int >& Triangles, |
Disconnects triangles (without constructing boundary loops) such that the input Triangles are not connected to any other triangles in the mesh | DynamicMeshEditor.h | |
bool DisconnectTriangles
(
const TSet< int >& TriangleSet, |
Variant of DisconnectTriangles that takes a precomputed set of BoundaryLoops of the triangles, and a TSet of Triangles. | DynamicMeshEditor.h | |
bool DisconnectTriangles
(
const TArray< int >& Triangles, |
Finds boundary loops of connected components of a set of triangles, and duplicates the vertices along the boundary, such that the triangles become disconnected. | DynamicMeshEditor.h | |
bool DisconnectTrianglesAlongEdges
(
const TSet< int32 >& Edges, |
Disconnect triangles along the given Edges, so that all input edges become boundary edges. | DynamicMeshEditor.h | |
void DuplicateTriangles
(
const TArray< int >& Triangles, |
Duplicate triangles of a mesh. | DynamicMeshEditor.h | |
int FindOrCreateDuplicateColor
(
int ElementID, |
Find "new" color for input color element under Index mapping, or create new if missing | DynamicMeshEditor.h | |
int FindOrCreateDuplicateGroup
(
int TriangleID, |
Find "new" group for input group under Index mapping, or create new if missing | DynamicMeshEditor.h | |
int FindOrCreateDuplicateNormal
(
int ElementID, |
Find "new" normal for input normal element under Index mapping, or create new if missing | DynamicMeshEditor.h | |
int FindOrCreateDuplicateUV
(
int ElementID, |
Find "new" UV for input UV element under Index mapping, or create new if missing | DynamicMeshEditor.h | |
int FindOrCreateDuplicateVertex
(
int VertexID, |
Mesh element copying / duplication | DynamicMeshEditor.h | |
void InvertTriangleNormals
(
const TArray< int >& Triangles |
Flip the normals of the given triangles. | DynamicMeshEditor.h | |
bool ReinsertSubmesh
(
const FDynamicSubmesh3& Submesh, |
Update a Base Mesh from a Submesh; See FMeshRegionOperator::BackPropropagate for a usage example. | DynamicMeshEditor.h | |
bool RemoveIsolatedVertices() |
Remove any vertices that are not used by any triangles | DynamicMeshEditor.h | |
int RemoveSmallComponents
(
double MinVolume, |
Remove any connected components with volume or area below the given thresholds | DynamicMeshEditor.h | |
bool RemoveTriangles
(
const TArray< int >& Triangles, |
Remove a list of triangles from the mesh, and optionally any vertices that are now orphaned | DynamicMeshEditor.h | |
bool RemoveTriangles
(
const TArray< int >& Triangles, |
Remove a list of triangles from the mesh, and optionally any vertices that are now orphaned | DynamicMeshEditor.h | |
void RescaleAttributeUVs
(
float UVScale, |
Rescale UVs for the whole mesh, for the given UV attribute layer | DynamicMeshEditor.h | |
void ReverseTriangleOrientations
(
const TArray< int >& Triangles, |
Normal utility functions. | DynamicMeshEditor.h | |
void SetGeneralTubeUVs
(
const TArray< int >& Triangles, |
For triangles connecting loops of corresponded vertices, set UVs in a cylindrical pattern so that the U coordinate starts at 0 for the first corresponded pair of vertices, and cycles around to 1 Assumes Triangles array stores indices of triangles in progressively filling the tube, starting with VertexIDs*[0]. | DynamicMeshEditor.h | |
void SetQuadNormals
(
const FIndex2i& QuadTris, |
Create and set new shared per-triangle normals for a pair of triangles that share one edge (ie a quad) | DynamicMeshEditor.h | |
void SetQuadUVsFromProjection
(
const FIndex2i& QuadTris, |
UV utility functions. | DynamicMeshEditor.h | |
void SetTriangleNormals
(
const TArray< int >& Triangles |
Create and set new shared per-triangle normals for a list of triangles. | DynamicMeshEditor.h | |
void SetTriangleNormals
(
const TArray< int >& Triangles, |
Create and set new shared per-triangle normals for a list of triangles | DynamicMeshEditor.h | |
void SetTriangleUVsFromProjection
(
const TArray< int32 >& Triangles, |
Project triangles onto a plane defined by the ProjectionFrame and use that to create/set new shared per-triangle UVs. | DynamicMeshEditor.h | |
void SetTriangleUVsFromProjection
(
const TArray< int >& Triangles, |
Project triangles onto a plane defined by the ProjectionFrame and use that to create/set new shared per-triangle UVs. | DynamicMeshEditor.h | |
| For a 'tube' of triangles connecting loops of corresponded vertices, set smooth normals such that corresponding vertices have corresponding normals | DynamicMeshEditor.h | ||
void SplitBowties
(
int VertexID, |
Splits any bowties specifically on the given vertex, and (if not null) updates (does not reset!) NewVertices with any added vertices | DynamicMeshEditor.h | |
void SplitBowties
(
FDynamicMeshEditResult& ResultOut |
Splits all bowties across the whole mesh | DynamicMeshEditor.h | |
void SplitBowties
(
int VertexID, |
Splits any bowties specifically on the given vertex, and updates (does not reset!) ResultOut with any added vertices | DynamicMeshEditor.h | |
void SplitBowtiesAtTriangles
(
const TArray< int32 >& TriangleIDs, |
Splits bowties attached to any of the given triangles, and updates (does not reset!) ResultOut with any added vertices | DynamicMeshEditor.h | |
bool StitchSparselyCorrespondedVertexLoops
(
const TArray< int >& VertexIDs1, |
Stitch together two loops of vertices where vertices are only sparsely corresponded | DynamicMeshEditor.h | |
bool StitchVertexLoopsMinimal
(
const TArray< int >& VertexLoop1, |
Create and Remove Triangle Functions. | DynamicMeshEditor.h | |
bool StitchVertexLoopToTriVidPairSequence
(
const TArray< TPair< int32, TPair< int8, int8 > > >& TriVidPairs1, |
Given a sequence of edges in the form given by ConvertLoopToTriVidPairSequence and a loop of vertices, stitch the two together. | DynamicMeshEditor.h | |
| Weld together two loops of vertices. Loops must be oriented (ordered) correctly for your use case. | DynamicMeshEditor.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool ConvertLoopToTriVidPairSequence
(
const FDynamicMesh3& Mesh, |
Converts a loop to a sequence of edge identifiers that are both Vid and Eid independent. | DynamicMeshEditor.h | |
static bool CreateSeamsAtEdges
(
const TSet< int32 >& EidsToMakeIntoSeams, |
Cut existing 3D attribute overlay topology with a set of edges. | DynamicMeshEditor.h | |
static bool CreateSeamsAtEdges
(
const TSet< int32 >& EidsToMakeIntoSeams, |
Cut existing 2D attribute overlay topology with a set of edges. | DynamicMeshEditor.h | |
static bool RemoveSeamsAtEdges
(
const TSet< int32 >& EidsToRemoveAsSeams, |
Merge any seams in the given (3D attribute) Overlay along the given mesh edge IDs | DynamicMeshEditor.h | |
static bool RemoveSeamsAtEdges
(
const TSet< int32 >& EidsToRemoveAsSeams, |
Merge any seams in the given 2D attribute Overlay along the given mesh edge IDs | DynamicMeshEditor.h | |
static bool SplitMesh
(
const FDynamicMesh3* SourceMesh, |
Create multiple meshes out of the source mesh by splitting triangles out. | DynamicMeshEditor.h |