code: public static void clearUnwalkableTriangles(Context ctx, float walkableSlopeAngle, float[] verts, int nv,
              int[] tris, int nt, int[] areas) {
          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] = RC_NULL_AREA;
          }
      }
docs: / @see rcHeightfield, rcClearUnwalkableTriangles, rcRasterizeTriangles