Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/Operations
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/SelectiveTessellate.h |
| Include | #include "Operations/SelectiveTessellate.h" |
Syntax
class FTessellationPattern
Remarks
An abstract class for writing tessellation patterns. You can subclass it and implement its virtual methods to specify a custom tessellation behavior. Original mesh edges and triangles are referred to as edge patches and triangle patches. The edge patch handles all the vertices we are adding along the edge. The triangle patch handles all the vertices we are adding inside of the patch (excluding the edges) and the new triangles we are splitting the patch into.
Patterns describe how individual patches are tessellated. Although you can access mesh data during the tessellation, the patches do not generate actual vertex coordinates or other attribute data. Instead, new vertices are generated in terms of linear or barycentric coefficients with respect to the edge or triangle vertices. The coefficient data can later be used to interpolate the actual mesh data (vertex positions, colors, normals, etc).
Patterns do not need to worry about generating the vertex IDs as those will be provided for each patch during the tessellation and need to simply be referred to when generating triangles.
The job of the tessellation pattern is: - Provide the number of new vertices introduced for an edge or a triangle patch.
-
Provide the number of new triangles introduced for a triangle patch.
-
Given a single edge patch with vertices [v1,v2], provide coordinates of the new vertices [a_i, a_(i+1), ...] inserted along the edge via a linear coeffcient [t_i, t_(i+1), ...] such that a_i = v1 + t_i*(v2-v1).
-
Given a triangle patch with vertices [v1,v2,v3], provide coordinates of the new vertices [b_i, b_(i+1), ...]
inserted inside the triangle patch via barycentric coordinates [(u_i, v_i, w_i), (u_(i+1), v_(i+1), w_(i+1)), ...] such that b_i = u_i*v1 + v_i*v2 + w_i*v3. -
Using the new vertices (along edges and inside the triangle), provide connectivity for a triangle patch by stitching those vertices together and creating triangles.
Variables
| Type | Name | Description | |
|---|---|---|---|
| const FDynamicMesh3 * | Mesh |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FTessellationPattern
(
const FDynamicMesh3* InMesh |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ComputeInnerConcentricTriangle
(
const FVector3d& U, |
Common helper methods used during tessellation of various patterns. | |
| int | GetNumberOfNewVerticesForEdgePatch
(
const int InEdgeID |
||
| int | GetNumberOfNewVerticesForTrianglePatch
(
const int InTriangleID |
||
| int | GetNumberOfPatchTriangles
(
const int InTriangleID |
||
| void | TessellateEdgePatch
(
EdgePatch& EdgePatch |
Tessellate the edge patch by generating linear interpolation coefficients for each new vertex and storing the result in the EdgePatch.LinearCoord. | |
| void | TessellateTriPatch
(
TrianglePatch& TriPatch |
Tessellate the triangle patch by generating new vertices inside the triangle. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| EdgePatch | Represents an abstract edge as a parameterized line segment with two endpoints [v1,v2]. | ||
| TrianglePatch | Represents an abstract triangle patch with corners [u,v,w], s.t. |
Constants
| Name | Description |
|---|---|
| InvalidIndex |