Description
The QuadSliceFaces
method is used to subdivide a set of polygonal faces into smaller quadrilateral faces. This is achieved by specifying the number of cuts along the X and Y axes, as well as a minimum corner angle to ensure the quality of the resulting quads. The method outputs a list of new face handles representing the subdivided faces.
Usage
To use the QuadSliceFaces
method, you need to provide the following parameters:
faces
: A read-only list of HalfEdgeMesh.FaceHandle
representing the faces to be subdivided.
cutsX
: An integer specifying the number of cuts along the X axis.
cutsY
: An integer specifying the number of cuts along the Y axis.
minCornerAngleDegrees
: A float representing the minimum corner angle in degrees to maintain the quality of the quads.
outNewFaceList
: A list of HalfEdgeMesh.FaceHandle
that will be populated with the new face handles created by the subdivision.
Example
// Example usage of QuadSliceFaces
var polygonMesh = new PolygonMesh();
var facesToSlice = new List<HalfEdgeMesh.FaceHandle> { /* Add face handles here */ };
int cutsX = 2;
int cutsY = 2;
float minCornerAngle = 30.0f;
var newFaces = new List<HalfEdgeMesh.FaceHandle>();
polygonMesh.QuadSliceFaces(facesToSlice, cutsX, cutsY, minCornerAngle, newFaces);
// newFaces now contains the handles to the newly created quadrilateral faces.