X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=DanUtil.pde;h=44478befa3c5c8c6173bc1fe864d39497a65af9e;hb=7d60f6f6ea82fd5c9794524ce11d40e7d6c00bf7;hp=382cf975c8a36740b4f15079783f657a52e720f1;hpb=09f7f5dff86f1b54a789e39b4f6ab24ed072c17d;p=SugarCubes.git diff --git a/DanUtil.pde b/DanUtil.pde index 382cf97..44478be 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -124,8 +124,8 @@ public class DPat extends SCPattern updateLights(); } - DPat(GLucose glucose) { - super(glucose); + DPat(LX lx) { + super(lx); pSpark = addParam("Sprk", 0); pWave = addParam("Wave", 0); @@ -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);