Model is now in processing, not glucose
[SugarCubes.git] / DanUtil.pde
index 382cf975c8a36740b4f15079783f657a52e720f1..78dc6d717c4c5b2d9535ea0cc3e8e3c39768c8fe 100644 (file)
@@ -287,7 +287,7 @@ class dLattice {
        dPixel getClosest(PVector p) {
                dVertex v = null; int pos=0; float d = 500;
 
-               for (Strip s : glucose.model.strips) {
+               for (Strip s : model.strips) {
                        float nd = pd2(s.points.get(0),p.x,p.y,p.z); if (nd < d) { v=v0(s); d=nd; pos=0; }
                        if (nd > 30) continue;
                        for (int k=0; k<=15; k++) {
@@ -300,13 +300,13 @@ class dLattice {
        dLattice() {
                lattice=this;
 
-               for (Strip s  : glucose.model.strips) {
+               for (Strip s  : model.strips) {
                        dVertex vrtx0 = new dVertex(s,s.points.get(0 )); s.obj1=vrtx0;
                        dVertex vrtx1 = new dVertex(s,s.points.get(15)); s.obj2=vrtx1;
                        vrtx0.setOpp(vrtx1); vrtx1.setOpp(vrtx0);
                }
 
-               for (Strip s1 : glucose.model.strips) { for (Strip s2 : glucose.model.strips) {
+               for (Strip s1 : model.strips) { for (Strip s2 : model.strips) {
                        if (s1.points.get(0).index < s2.points.get(0).index) continue;
                        int c=0;
                        if (sameSame(s1,s2))    {       v0(s1).same = v0(s2); v1(s1).same = v1(s2);