X-Git-Url: https://git.piment-noir.org/?p=SugarCubes.git;a=blobdiff_plain;f=DanUtil.pde;h=78dc6d717c4c5b2d9535ea0cc3e8e3c39768c8fe;hp=382cf975c8a36740b4f15079783f657a52e720f1;hb=b9b7b3d47ba1edbb5595d749cf0d0a77a3ff7c5b;hpb=e18b4cb735a6e1f2d6cb2e7b1709d4a575cfe795 diff --git a/DanUtil.pde b/DanUtil.pde index 382cf97..78dc6d7 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -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);