Method GenerateTriangleColors
GenerateTriangleColors(Span<int>, ReadOnlySpan<int>, out int, Allocator)
Generates triangle colors using the provided halfedges.
Triangles that share a common edge are assigned the same color index.
The resulting colors contains values in the range [0, colorsCount).
Check the documentation for further details.
Declaration
public static void GenerateTriangleColors(Span<int> colors, ReadOnlySpan<int> halfedges, out int colorsCount, Allocator allocator)
Parameters
| Type | Name | Description |
|---|---|---|
| Span<int> | colors | A buffer that will be populated with triangle colors. Its length must be three times smaller than |
| ReadOnlySpan<int> | halfedges | The halfedge data used for generating colors. |
| int | colorsCount | The total number of unique colors assigned. |
| Allocator | allocator | The allocator to use for temporary data. |