docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SweepLineRectUtils

    Utility class that computes the total rect area via a sweep-line.

    Inheritance
    object
    SweepLineRectUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)