示例#1
0
  private boolean removeAdjacentDuplicates(Face testPoly) {
    float threshold = 0.25f;
    boolean found = false;
    ArrayList<Vertex> newVerts = new ArrayList<Vertex>();
    Vertex compare = testPoly.verts.get(0);

    newVerts.add(compare);

    for (int i = 1; i < testPoly.verts.size(); ++i) {
      if (compare.sub(testPoly.verts.get(i)).len() > threshold) {
        compare = testPoly.verts.get(i);
        newVerts.add(compare);
      } else found = true;
    }

    if (found) testPoly.verts = newVerts;

    return found;
  }