| TDynamicMeshOverlay
|
Module |
|
Header |
/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/DynamicMeshOverlay.h |
Include |
#include "DynamicMeshOverlay.h" |
template<typename RealType, int ElementSize>
class TDynamicMeshOverlay
TDynamicMeshOverlay is an add-on to a FDynamicMesh3 that allows for per-triangle storage of an "element" (eg like a per-triangle UV or normal). However the elements can be shared between triangles because they are stored in a separate indexable list. As a result, the overlay has it's own topology, IE there may be "seam" boundary edges in the overlay topology that are not mesh boundary edges in the associated/parent mesh.
A "seam" edge is one where at least one of the elements of the triangles on either side of the edge is not shared between the two triangles.
The FDynamicMesh3 mesh topology operations (eg split/flip/collapse edge, poke face, etc) can be mirrored to the overlay via OnSplitEdge(), etc.
that although this is a template, many of the functions are defined in the .cpp file. As a result you need to explicitly instantiate and export the instance of the template that you wish to use in the block at the top of DynamicMeshOverlay.cpp
Name | Description | ||
---|---|---|---|
|
TDynamicVector<... |
Elements |
List of element values |
|
ElementsRefCounts |
Reference counts of element indices. Iterate over this to find out which elements are valid. |
|
|
TDynamicVector<... |
ElementTriangles |
List of triangle element-index triplets [Elem0 Elem1 Elem2] |
|
FDynamicMesh3 &... |
ParentMesh |
The parent mesh this overlay belongs to |
|
TDynamicVector<... |
ParentVertices |
List of parent vertex indices, one per element |
Name | Description | |
---|---|---|
|
TDynamicMeshOverlay() |
Create an empty overlay |
|
TDynamicMeshOverlay ( |
Create an overlay for the given parent mesh |
Name | Description | ||
---|---|---|---|
|
int |
AppendElement ( |
Allocate a new element with the given constant value |
|
int |
AppendElement ( |
Allocate a new element with the given value |
|
AreTrianglesConnected ( |
||
|
BeginUnsafeElementsInsert() |
Support for inserting element at specific ID. |
|
|
CheckValidity ( |
Checks that the overlay mesh is well-formed, ie all internal data structures are consistent |
|
|
ClearElements() |
Discard current set of elements, but keep triangles |
|
|
CompactCopy ( |
Copy the Copy overlay to a compact rep, also updating parent references based on the CompactMaps |
|
|
CompactInPlace ( |
Compact overlay and update links to parent based on CompactMaps |
|
|
Copy ( |
Set this overlay to contain the same arrays as the copy overlay |
|
|
int |
CountVertexElements ( |
Count the number of unique elements for a given parent-mesh vertex |
|
CreateFromPredicate ( |
Build overlay topology from a predicate function, e.g. to build topology for sharp normals |
|
|
int |
ElementCount() |
|
|
element_iter... |
ElementIndicesItr() |
|
|
EndUnsafeElementsInsert() |
Call after a set of unsafe InsertVertex() calls to rebuild free list |
|
|
GetElement ( |
Get the element at a given index |
|
|
GetElement ( |
Accessors/QueriesGet the element at a given index |
|
|
GetElementTriangles ( |
Find the triangles connected to an element |
|
|
const FDynam... |
GetParentMesh() |
|
|
FDynamicMesh... |
GetParentMesh() |
|
|
int |
GetParentVertex ( |
Get the parent vertex id for the element at a given index |
|
GetTriangle ( |
Get the element index tuple for a triangle |
|
|
GetTriBaryInterpolate ( |
Compute interpolated parameter value inside triangle using barycentric coordinates |
|
|
GetVertexElements ( |
Find the elements associated with a given parent-mesh vertex |
|
|
HasInteriorSeamEdges() |
||
|
InitializeNewTriangle ( |
Set a triangle's element indices to InvalidID |
|
|
InitializeTriangles ( |
Initialize the triangle list to the given size, and set all triangles to InvalidID |
|
|
InsertElement ( |
Insert element at given index, assuming it is unused. |
|
|
InternalSetTriangle |
Updates the triangles array and optionally the element reference counts |
|
|
IsBowtieInOverlay ( |
Determines whether the base-mesh vertex has "bowtie" topology in the Overlay. |
|
|
IsCompact() |
||
|
IsElement ( |
||
|
IsSeamEdge ( |
Returns true if the parent-mesh edge is a "Seam" in this overlay |
|
|
IsSeamEndEdge ( |
Returns true if the parent-mesh edge is a "Seam End" in this overlay, meaning the adjacent element triangles share one element, not two |
|
|
IsSeamVertex ( |
Returns true if the parent-mesh vertex is connected to any seam edges |
|
|
IsSetTriangle ( |
||
|
int |
MaxElementID() |
|
|
OnCollapseEdge ( |
Update the overlay to reflect an edge collapse in the parent mesh |
|
|
OnFlipEdge ( |
Update the overlay to reflect an edge flip in the parent mesh |
|
|
OnMergeEdges ( |
Update the overlay to reflect an edge merge in the parent mesh |
|
|
OnPokeTriangle ( |
Update the overlay to reflect a face poke in the parent mesh |
|
|
OnRemoveTriangle ( |
Remove a triangle from the overlay |
|
|
OnReverseTriOrientation ( |
Reverse the orientation of a triangle's elements |
|
|
OnSplitEdge ( |
Update the overlay to reflect an edge split in the parent mesh |
|
|
OnSplitVertex ( |
Update the overlay to reflect a vertex split in the parent mesh |
|
|
SetElement ( |
Set the element at a given index |
|
|
SetElement ( |
Set the element at a given index |
|
|
SetElementFromBary ( |
Set the value at an Element to be a barycentric interpolation of three other Elements |
|
|
SetElementFromLerp ( |
Set the value at an Element to be a linear interpolation of two other Elements |
|
|
SetTriangle ( |
Set the triangle to the given Element index tuple, and increment element reference counts |
|
|
SplitBowties() |
Refine an existing overlay topology by splitting any bow ties |
|
|
int |
SplitElement ( |
Create a new copy of ElementID, and update connected triangles in the TrianglesToUpdate array to reference the copy of ElementID where they used to reference ElementID ( This just calls "SplitElementWithNewParent" with the existing element's parent id.) |
|
int |
SplitElementWithNewParent ( |
Create a new copy of ElementID, and update connected triangles in the TrianglesToUpdate array to reference the copy of ElementID where they used to reference ElementID. |
|
SplitVerticesWithPredicate ( |
Refine an existing overlay topology. |
|
|
TriangleHasElement ( |
||
|
UnsetTriangle ( |
Set the triangle to have InvalidID element IDs, decrementing element reference counts if needed. |
Name |
Description |
---|---|
element_iterator |