Project

General

Profile

« Previous | Next » 

Revision ca4a3a68

Added by Leszek Koltunski 12 months ago

Algorithms now have their 'layers' in bitmap form.

We have to update all object JSON files.

View differences:

src/main/java/org/distorted/objectlib/scrambling/ScrambleEdgeGenerator.java
132 132
    int[][] ret = new int[num][3];
133 133
    int index = 0;
134 134

  
135
    for(int i=0; i<numAxis; i++)
135
    for(int a=0; a<numAxis; a++)
136 136
      {
137
      int numLayers = basicAngles[i].length;
137
      int numLayers = basicAngles[a].length;
138 138

  
139
      for(int j=0; j<numLayers; j++)
139
      for(int l=0; l<numLayers; l++)
140 140
        {
141
        int N = basicAngles[i][j];
141
        int N = basicAngles[a][l];
142 142
        int NEG = (1-N)/2;
143 143
        int POS = N/2;
144
        int layerBmp = (1<<l);
144 145

  
145 146
        for(int k=NEG; k<=-1; k++)
146 147
          {
147
          ret[index][0] = i;
148
          ret[index][1] = j;
148
          ret[index][0] = a;
149
          ret[index][1] = layerBmp;
149 150
          ret[index][2] = k;
150 151
          index++;
151 152
          }
152 153

  
153 154
        for(int k=1; k<=POS; k++)
154 155
          {
155
          ret[index][0] = i;
156
          ret[index][1] = j;
156
          ret[index][0] = a;
157
          ret[index][1] = layerBmp;
157 158
          ret[index][2] = k;
158 159
          index++;
159 160
          }
......
194 195
          int N = basicAngles[a][l];
195 196
          int NEG = (1-N)/2;
196 197
          int POS = N/2;
198
          int layerBmp = (1<<l);
197 199

  
198 200
          for(int k=NEG; k<=-1; k++)
199 201
            {
200 202
            ret[index][0] = a;
201
            ret[index][1] = l;
203
            ret[index][1] = layerBmp;
202 204
            ret[index][2] = k;
203 205
            index++;
204 206
            }
......
206 208
          for(int k=1; k<=POS; k++)
207 209
            {
208 210
            ret[index][0] = a;
209
            ret[index][1] = l;
211
            ret[index][1] = layerBmp;
210 212
            ret[index][2] = k;
211 213
            index++;
212 214
            }

Also available in: Unified diff