Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/FQuadGridPatch
Description
In cases like assigning UVs or Normals to a QuadGridPatch, we want to assign a unique element to each of the vertices in the grid, and then generate "element triangles" that index into those new elements. To do this we need to know the (row,column) pair ("Vertex Span Index") for each triangle vertex. This function returns a 3-tuple of vertex span indices for a given quad triangle. The function EncodeRowColumnIndex() is used to map the (row,column) to a single integer, and callers can use DecodeRowColumnIndex() to recover the (row,column)
| Name | GetQuadTriMappedToSpanIndices |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Selections/QuadGridPatch.h |
| Include Path | #include "Selections/QuadGridPatch.h" |
| Source | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Private/Selections/QuadGridPatch.cpp |
FIndex3i GetQuadTriMappedToSpanIndices
(
const FDynamicMesh3 & Mesh,
int QuadRow,
int QuadIndex,
int TriIndex
) const
tuple of encoded (row,column) vertex span indices, in the same ordering as the identified triangle
Parameters
| Name | Remarks |
|---|---|
| QuadRow | the row of quads the requested triangle is in |
| QuadIndex | the "column" index of the quad containing the request triangle |
| TriIndex | the index of the triangle in the quad, only 0 and 1 are valid |