Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/Operations
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/UniformTessellate.h |
| Include | #include "Operations/UniformTessellate.h" |
Syntax
class FUniformTessellate
Remarks
Given an input mesh and a tessellation level, this operator generates a new tessellated mesh where every triangle in the input mesh is uniformly subtriangulated into (TessellationNum + 1)^2 triangles. Per-vertex normals, uvs, colors and extended per-vertex attributes are linearly interpolated to the new vertices. Per-triangle group identifiers/materials and extended triangle attributes for the new triangles are inherited from the corresponding input mesh triangles they replaced.
Note: Currently does not support interpolation of the GenericAttributes besides Skin Weights. o o
/ \ TessellationNum = 2 / \
/ \ / \
/ \ x-----x
/ \ FUniformTessellate / \ / \
/ \ -------------> / \ / \
/ \ x-----*-----x
/ \ / \ / \ / \
/ \ / \ / \ / \ o--------------o o--x--x--o
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bComputeMappings | If true, populate VertexMap, VertexEdgeMap, VertexTriangleMap. | |
| bool | bInPlace | If true, the mesh to tessellate is contained in the ResultMesh and will be overwritten with the tessellation result. | |
| bool | bUseParallel | Should multi-threading be enabled. | |
| const FDynamicMesh3 * | Mesh | Points to either the input mesh to be used to generate the new tessellated mesh or will point to a copy of the mesh we are tessellating inplace. | |
| FProgressCancel * | Progress | Inputs Set this to be able to cancel running operation. | |
| FDynamicMesh3 * | ResultMesh | Input/Output The tessellated mesh. | |
| int | TessellationNum | Determines the number of triangles we generate. | |
| TMap< int32, FIndex2i > | VertexEdgeMap | Map the ID of the vertex inserted along the input mesh edge to the input mesh triangle IDs (t1,t2) that share that edge. | |
| TArray< int32 > | VertexMap | Output Map the vertex ID in the input mesh to the corresponding vertex ID in the output mesh. | |
| TMap< int32, int32 > | VertexTriangleMap | Map the ID of the vertex inserted inside the input mesh triangle to the triangle's ID. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FUniformTessellate
(
FDynamicMesh3* OutMesh |
Tessellate the mesh inplace. | ||
FUniformTessellate
(
const FDynamicMesh3* Mesh, |
Tessellate the mesh and write the result into another mesh. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | Cancelled () |
If this returns true, abort computation. | |
| bool | Compute () |
Generate tessellated geometry. | |
| int32 | ExpectedNumTriangles
(
const FDynamicMesh3& Mesh, |
||
| int32 | ExpectedNumVertices
(
const FDynamicMesh3& Mesh, |
||
| EOperationValidationResult | Validate () |