Description
The FindEdgeIslands
method is a member of the PolygonMesh
class in the Sandbox namespace. This method is used to identify and group connected edges into separate islands. An edge island is a set of edges that are connected to each other but not connected to any other edges outside the island.
Usage
To use the FindEdgeIslands
method, you need to provide a list of edges as input. The method will output a list of edge islands, where each island is a list of connected edges.
Parameters:
edgeList
: A read-only list of HalfEdgeMesh.HalfEdgeHandle
representing the edges to be analyzed.
outEdgeList
: An output parameter that will contain a list of lists, where each inner list represents an edge island.
Example
// Example usage of FindEdgeIslands
PolygonMesh polygonMesh = new PolygonMesh();
IReadOnlyList<HalfEdgeMesh.HalfEdgeHandle> edgeList = GetEdges(); // Assume this method retrieves a list of edges
List<List<HalfEdgeMesh.HalfEdgeHandle>> edgeIslands = new List<List<HalfEdgeMesh.HalfEdgeHandle>>();
polygonMesh.FindEdgeIslands(edgeList, out edgeIslands);
// edgeIslands now contains the grouped edge islands