void CombineFaces( IReadOnlyList<FaceHandle> faces )

book_4_sparkGenerated
code_blocksInput

Description

The CombineFaces method in the PolygonMesh class is used to merge multiple faces into a single face within a polygon mesh. This operation is useful when you want to simplify the mesh by reducing the number of faces, which can be beneficial for performance or aesthetic reasons.

Usage

To use the CombineFaces method, you need to provide a list of face handles that you wish to combine. These face handles should be part of the same mesh and should be adjacent to each other to form a valid combined face.

Ensure that the faces you are combining are coplanar or can be reasonably merged into a single face without causing geometric issues.

Example

// Example usage of CombineFaces
var polygonMesh = new PolygonMesh();

// Assume faceHandles is a list of FaceHandle objects that are adjacent and can be combined
IReadOnlyList<HalfEdgeMesh.FaceHandle> faceHandles = GetAdjacentFaces();

// Combine the faces into a single face
polygonMesh.CombineFaces(faceHandles);