code: public static int[] markWalkableTriangles(Context ctx, float walkableSlopeAngle, float[] verts, int[] tris, int nt,
              AreaModification areaMod) {
          int[] areas = new int[nt];
          float walkableThr = (float) Math.cos(walkableSlopeAngle / 180.0f * Math.PI);
          float norm[] = new float[3];
          for (int i = 0; i < nt; ++i) {
              int tri = i * 3;
              calcTriNormal(verts, tris[tri], tris[tri + 1], tris[tri + 2], norm);
              // Check if the face is walkable.
              if (norm[1] > walkableThr)
                  areas[i] = areaMod.apply(areas[i]);
          }
          return areas;
      }
docs: / @see rcHeightfield, rcClearUnwalkableTriangles, rcRasterizeTriangles