code: public Result<List<Long>> queryPolygons(float[] center, float[] halfExtents, QueryFilter filter) {
          if (Objects.isNull(center) || !vIsFinite(center) || Objects.isNull(halfExtents) || !vIsFinite(halfExtents)
                  || Objects.isNull(filter)) {
              // return DT_FAILURE | DT_INVALID_PARAM;
          }
          float[] bmin = vSub(center, halfExtents);
          float[] bmax = vAdd(center, halfExtents);
          // Find tiles the query touches.
          int[] minxy = m_nav.calcTileLoc(bmin);
          int minx = minxy[0];
          int miny = minxy[1];
          int[] maxxy = m_nav.calcTileLoc(bmax);
          int maxx = maxxy[0];
          int maxy = maxxy[1];
          List<Long> polys = new ArrayList<>();
          for (int y = miny; y <= maxy; ++y) {
              for (int x = minx; x <= maxx; ++x) {
                  List<MeshTile> neis = m_nav.getTilesAt(x, y);
                  for (int j = 0; j < neis.size(); ++j) {
                      List<Long> polysInTile = queryPolygonsInTile(neis.get(j), bmin, bmax, filter);
                      polys.addAll(polysInTile);
                  }
              }
          }
          return Result.success(polys);
      }
docs: Finds polygons that overlap the search box.
  
  If no polygons are found, the function will return with a polyCount of zero.
  
  @param center
  The center of the search box. [(x, y, z)]
  @param halfExtents
  The search distance along each axis. [(x, y, z)]
  @param filter
  The polygon filter to apply to the query.
  @return The reference ids of the polygons that overlap the query box.