- public void unApplyQuadricToNeighborAll() {
- HashSet<Vertex> done = new HashSet<Vertex>();
- for(T t : this)
- for(Vertex p : new Vertex[] { t.v1(), t.v2(), t.v3() }) {
- if (done.contains(p)) continue;
- done.add(p);
- p.unApplyQuadricToNeighbor();
- }
- }
- public void recomputeAllFundamentalQuadrics() {
- HashSet<Vertex> done = new HashSet<Vertex>();
- for(T t : this)
- for(Vertex p : new Vertex[] { 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<Vertex> done = new HashSet<Vertex>();
- for(T t : this)
- for(Vertex p : new Vertex[] { t.v1(), t.v2(), t.v3() }) {
- if (done.contains(p)) continue;
- done.add(p);
- p.applyQuadricToNeighbor();
-
- }
- return (float)(dist/num);
- }
-