non-gon
    Preparing search index...

    Class ProximityQuery2D

    Index

    Constructors

    Methods

    • Checks if two axis-aligned bounding boxes (AABBs) overlap in 2D.

      Parameters

      • positionAABB1: Vector2

        Top-left position of the first AABB.

      • positionAABB2: Vector2

        Top-left position of the second AABB.

      • length1: number

        Width of the first AABB.

      • length2: number

        Width of the second AABB.

      • height1: number

        Height of the first AABB.

      • height2: number

        Height of the second AABB.

      Returns boolean

      True if the AABBs intersect, false otherwise.

    • Computes the characteristic polynomial representing two ellipses for collision testing.

      Parameters

      • Ellipse1: Ellipse

        The first ellipse.

      • Ellipse2: Ellipse

        The second ellipse.

      Returns number[]

      Array of polynomial coefficients [a3, a2, a1, a0].

    • Determines if two ellipses intersect using the Alberich method based on polynomial discriminants.

      Parameters

      • Ellipse1: Ellipse

        The first ellipse.

      • Ellipse2: Ellipse

        The second ellipse.

      Returns boolean

      True if the ellipses intersect, false otherwise.

    • Determines if two ellipses intersect using the Caravantes method based on the sign of a specific scalar.

      Parameters

      • Ellipse1: Ellipse

        The first ellipse.

      • Ellipse2: Ellipse

        The second ellipse.

      Returns boolean

      True if the ellipses intersect, false otherwise.

    • Checks if two oriented bounding boxes (OBBs) intersect using the Separating Axis Theorem (SAT).

      Parameters

      • normals1: Vector3[]

        Normals (axes) of the first OBB.

      • normals2: Vector3[]

        Normals (axes) of the second OBB.

      • corners1: Vector3[]

        Corner points of the first OBB.

      • corners2: Vector3[]

        Corner points of the second OBB.

      Returns boolean

      True if the OBBs intersect, false otherwise.