示例#1
0
  private void addRoof(int startVertex, GeometryBuffer geom, int ipos, int ppos) {
    short[] index = geom.index;
    float[] points = geom.points;

    int len = 0;
    int rings = 0;

    /* get sum of points in polygon */
    for (int i = ipos, n = index.length; i < n && index[i] > 0; i++) {
      len += index[i];
      rings++;
    }

    sumIndices +=
        Tessellator.tessellate(
            points, ppos, len, index, ipos, rings, startVertex + 1, mCurIndices[IND_ROOF]);

    mCurIndices[IND_ROOF] = Inlist.last(mCurIndices[IND_ROOF]);
  }