Class SweepLineRectUtils
Utility class that computes the total rect area via a sweep-line.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public static class SweepLineRectUtils
Methods
CalculateRectUnionArea(List<Rect>)
Computes the total covered area (union) of a set of axis-aligned rectangles, counting overlaps only once.
Declaration
public static float CalculateRectUnionArea(List<Rect> rects)
Parameters
| Type | Name | Description |
|---|---|---|
| List<Rect> | rects | List of rects to compute. |
Returns
| Type | Description |
|---|---|
| float | The normalized union area in [0,1], with overlaps counted once. |