Method RemoveDegenerateTriangles
RemoveDegenerateTriangles(ProBuilderMesh, List<int>)
Iterates through all faces in a mesh and removes any triangles with an area less than float.Epsilon
, or with
indices that point to the same vertex. This function also enforces the rule that a face must contain no
coincident vertices.
Declaration
public static bool RemoveDegenerateTriangles(ProBuilderMesh mesh, List<int> removed = null)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The source mesh. |
List<int> | removed | An optional list to be populated with the removed indices. If no degenerate triangles are found, this list contains no elements. |
Returns
Type | Description |
---|---|
bool | True if degenerate triangles were found and removed; false if no degenerate triangles were found. |