X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TestPatterns.pde;h=80754a6f1a9a4c21846da78226fdf00cbedcce02;hb=e037f60f518373c3bb952f79a2ae66950e55a52f;hp=62a1956ba9bad5c6ff6c50ba56a6af6f08efeb21;hpb=2bb5682284f70c5788cbfcb9cba3c7bf66a104b6;p=SugarCubes.git diff --git a/TestPatterns.pde b/TestPatterns.pde index 62a1956..80754a6 100644 --- a/TestPatterns.pde +++ b/TestPatterns.pde @@ -229,13 +229,13 @@ class TestTowerPattern extends TestPattern { */ class TestProjectionPattern extends TestPattern { - private final Projection projection; + private final LXProjection projection; private final SawLFO angle = new SawLFO(0, TWO_PI, 9000); private final SinLFO yPos = new SinLFO(-20, 40, 5000); public TestProjectionPattern(GLucose glucose) { super(glucose); - projection = new Projection(model); + projection = new LXProjection(model); addModulator(angle).trigger(); addModulator(yPos).trigger(); } @@ -256,7 +256,7 @@ class TestProjectionPattern extends TestPattern { .scale(1, 1.5, 1); float hv = lx.getBaseHuef(); - for (Coord c : projection) { + for (LXVector c : projection) { float d = sqrt(c.x*c.x + c.y*c.y + c.z*c.z); // distance from origin // d = abs(d-60) + max(0, abs(c.z) - 20); // life saver / ring thing d = max(0, abs(c.y) - 10 + .1*abs(c.z) + .02*abs(c.x)); // plane / spear thing @@ -314,15 +314,11 @@ class MappingTool extends TestPattern { public boolean channelModeBlue = false; private final int numChannels; - - private final PandaMapping[] pandaMappings; - private PandaMapping activePanda; - private ChannelMapping activeChannel; - - MappingTool(GLucose glucose, PandaMapping[] pandaMappings) { + + MappingTool(GLucose glucose) { super(glucose); - this.pandaMappings = pandaMappings; - numChannels = pandaMappings.length * PandaMapping.CHANNELS_PER_BOARD; + // TODO(mcslee): port channels to grizzly + numChannels = 0; setChannel(); } @@ -331,21 +327,12 @@ class MappingTool extends TestPattern { } private void setChannel() { - activePanda = pandaMappings[channelIndex / PandaMapping.CHANNELS_PER_BOARD]; - activeChannel = activePanda.channelList[channelIndex % PandaMapping.CHANNELS_PER_BOARD]; + // TODO(mcslee): port to grizzly } private int indexOfCubeInChannel(Cube c) { - if (activeChannel.mode == ChannelMapping.MODE_CUBES) { - int i = 1; - for (int index : activeChannel.objectIndices) { - if ((index >= 0) && (c == model.getCubeByRawIndex(index))) { - return i; - } - ++i; - } - } - return 0; + // TODO(mcslee): port to grizzly + return -1; } private void printInfo() { @@ -440,7 +427,9 @@ class MappingTool extends TestPattern { } public void setChannel(int index) { - channelIndex = index % numChannels; + if (numChannels > 0) { + channelIndex = index % numChannels; + } setChannel(); }