code: static boolean overlapPolyPoly2D(float[] polya, int npolya, float[] polyb, int npolyb) {
  
          for (int i = 0, j = npolya - 1; i < npolya; j = i++) {
              int va = j * 3;
              int vb = i * 3;
  
              float[] n = new float[] { polya[vb + 2] - polya[va + 2], 0, -(polya[vb + 0] - polya[va + 0]) };
  
              float[] aminmax = projectPoly(n, polya, npolya);
              float[] bminmax = projectPoly(n, polyb, npolyb);
              if (!overlapRange(aminmax[0], aminmax[1], bminmax[0], bminmax[1], eps)) {
                  // Found separating axis
                  return false;
              }
          }
          for (int i = 0, j = npolyb - 1; i < npolyb; j = i++) {
              int va = j * 3;
              int vb = i * 3;
  
              float[] n = new float[] { polyb[vb + 2] - polyb[va + 2], 0, -(polyb[vb + 0] - polyb[va + 0]) };
  
              float[] aminmax = projectPoly(n, polya, npolya);
              float[] bminmax = projectPoly(n, polyb, npolyb);
              if (!overlapRange(aminmax[0], aminmax[1], bminmax[0], bminmax[1], eps)) {
                  // Found separating axis
                  return false;
              }
          }
          return true;
      }
docs: / All vertices are projected onto the xz-plane, so the y-values are ignored.