navcat docs
    Preparing search index...

    Function overlapPolyPoly2D

    • Tests if two convex polygons overlap in 2D (XZ plane). Uses the separating axis theorem - matches the C++ dtOverlapPolyPoly2D implementation. All vertices are projected onto the xz-plane, so the y-values are ignored.

      Parameters

      • vertsA: number[]

        Vertices of the first polygon [x,y,z,x,y,z,...]

      • nvertsA: number

        Number of vertices in the first polygon

      • vertsB: number[]

        Vertices of the second polygon [x,y,z,x,y,z,...]

      • nvertsB: number

        Number of vertices in the second polygon

      Returns boolean

      True if the polygons overlap