- public void unApplyQuadricToNeighborAll() {
- HashSet<Vert> done = new HashSet<Vert>();
- for(T t : this)
- for(Vert p : new Vert[] { t.v1(), t.v2(), t.v3() }) {
- if (done.contains(p)) continue;
- done.add(p);
- p.unApplyQuadricToNeighbor();
- }
- }
- public void recomputeAllFundamentalQuadrics() {
- HashSet<Vert> done = new HashSet<Vert>();
- for(T t : this)
- for(Vert p : new Vert[] { t.v1(), t.v2(), t.v3() }) {
- if (done.contains(p)) continue;
- done.add(p);
- p.recomputeFundamentalQuadric();
- }
- }
- public float applyQuadricToNeighborAll() {
- int num = 0;
- double dist = 0;
- HashSet<Vert> done = new HashSet<Vert>();
- for(T t : this)
- for(Vert p : new Vert[] { t.v1(), t.v2(), t.v3() }) {
- if (done.contains(p)) continue;
- done.add(p);
- p.applyQuadricToNeighbor();
-
- }
- return (float)(dist/num);
- }
-